This commit is contained in:
2024-12-30 18:18:18 +02:00
parent c1ce7bc516
commit d23ee98114

View File

@@ -96,14 +96,15 @@ function getMovieStreamUrl {
function play { function play {
if [[ "$player" == "mpv" ]]; then if [[ "$player" == "mpv" ]]; then
MPV_OPTS="--vo=gpu \ MPV_OPTS='--vo=gpu \
--gpu-api=opengl \ --gpu-api=opengl \
--opengl-es=yes \ --opengl-es=yes \
--really-quiet \ --really-quiet \
--msg-level=all=no \ --msg-level=all=no \
--no-load-scripts \ --no-load-scripts \
--profile=sw-fast \ --profile=sw-fast \
--no-ytdl" --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)" MPVPID="$(pidof mpv | cut -d' ' -f1)"
[[ -n "$MPVPID" ]] && kill -s SIGTERM "$MPVPID" [[ -n "$MPVPID" ]] && kill -s SIGTERM "$MPVPID"
player="mpv --save-position-on-quit --fs ${MPV_OPTS}" player="mpv --save-position-on-quit --fs ${MPV_OPTS}"
@@ -237,14 +238,15 @@ function resumeUnfinishedEpisode {
sourceData sourceData
streamurl="$lastEpisodePlayedURL" streamurl="$lastEpisodePlayedURL"
if [[ "$player" == "mpv" ]]; then if [[ "$player" == "mpv" ]]; then
MPV_OPTS="--vo=gpu \ MPV_OPTS='--vo=gpu \
--gpu-api=opengl \ --gpu-api=opengl \
--opengl-es=yes \ --opengl-es=yes \
--really-quiet \
--msg-level=all=no \ --msg-level=all=no \
--really-quiet \
--no-load-scripts \ --no-load-scripts \
--profile=sw-fast \ --profile=sw-fast \
--no-ytdl" --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)" MPVPID="$(pidof mpv | cut -d' ' -f1)"
[[ -n "$MPVPID" ]] && kill -s SIGTERM "$MPVPID" [[ -n "$MPVPID" ]] && kill -s SIGTERM "$MPVPID"
player="mpv --resume-playback --fs ${MPV_OPTS}" player="mpv --resume-playback --fs ${MPV_OPTS}"