diff --git a/grpoppro b/grpoppro index 4120a2a..f142d71 100755 --- a/grpoppro +++ b/grpoppro @@ -11,6 +11,16 @@ menu="fuzzel -d -p " #menu="fzf -i --prompt=" apiurl="https://coverapi.store" player="mpv" +MPV_OPTS='--vo=gpu \ + --gpu-api=opengl \ + --opengl-es=yes \ + --msg-level=all=no \ + --really-quiet \ + --no-load-scripts \ + --profile=sw-fast \ + --no-ytdl \ + --http-header-fields="User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0" \ + --fs' ## End of definitions function usage { @@ -96,18 +106,9 @@ function getMovieStreamUrl { function play { if [[ "$player" == "mpv" ]]; then - MPV_OPTS='--vo=gpu \ - --gpu-api=opengl \ - --opengl-es=yes \ - --really-quiet \ - --msg-level=all=no \ - --no-load-scripts \ - --profile=sw-fast \ - --no-ytdl \ - --http-header-fields="User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0"' MPVPID="$(pidof mpv | cut -d' ' -f1)" [[ -n "$MPVPID" ]] && kill -s SIGTERM "$MPVPID" - player="mpv --save-position-on-quit --fs ${MPV_OPTS}" + player="mpv --save-position-on-quit ${MPV_OPTS}" fi [[ "$OSTYPE" != "linux-gnu" ]] && INTERACTIVE="off" && streamurl="${streamurl//https/http}" # No setsid -f here because menu function goes from play to resume @@ -236,20 +237,12 @@ function resumeUnfinishedEpisode { exit 0 fi sourceData + message "Continuing $lastSeriesPlayed from $lastSeasonEpisodePlayed" streamurl="$lastEpisodePlayedURL" if [[ "$player" == "mpv" ]]; then - MPV_OPTS='--vo=gpu \ - --gpu-api=opengl \ - --opengl-es=yes \ - --msg-level=all=no \ - --really-quiet \ - --no-load-scripts \ - --profile=sw-fast \ - --no-ytdl \ - --http-header-fields="User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0"' MPVPID="$(pidof mpv | cut -d' ' -f1)" [[ -n "$MPVPID" ]] && kill -s SIGTERM "$MPVPID" - player="mpv --resume-playback --fs ${MPV_OPTS}" + player="mpv --resume-playback ${MPV_OPTS}" fi [[ "$OSTYPE" != "linux-gnu" ]] && INTERACTIVE="off" && streamurl="${streamurl//https/http}" # No setsid -f here because menu function goes from play to resume