File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- version_number=" 4.10.3 "
3+ version_number=" 4.10.4 "
44
55# UI
66
@@ -325,7 +325,12 @@ play_episode() {
325325 * iina* )
326326 [ -n " $subs_flag " ] && subs_flag=" --mpv-${subs_flag# --} "
327327 [ -n " $refr_flag " ] && refr_flag=" --mpv-${refr_flag# --} "
328- nohup $player_function --no-stdin --keep-running --mpv-force-media-title=" ${allanime_title} Episode ${ep_no} " $subs_flag $refr_flag " $episode " > /dev/null 2>&1 &
328+ if pgrep -f " IINA" > /dev/null 2>&1 ; then
329+ # omit --keep-running when an IINA instance exists to prevent hanging
330+ nohup $player_function --no-stdin --mpv-force-media-title=" ${allanime_title} Episode ${ep_no} " $subs_flag $refr_flag " $episode " > /dev/null 2>&1 &
331+ else
332+ nohup $player_function --no-stdin --keep-running --mpv-force-media-title=" ${allanime_title} Episode ${ep_no} " $subs_flag $refr_flag " $episode " > /dev/null 2>&1 &
333+ fi
329334 ;;
330335 flatpak_mpv) flatpak run io.mpv.Mpv --force-media-title=" ${allanime_title} Episode ${ep_no} " " $episode " $subs_flag $refr_flag > /dev/null 2>&1 & ;;
331336 vlc* ) nohup $player_function --http-referrer=" ${allanime_refr} " --play-and-exit --meta-title=" ${allanime_title} Episode ${ep_no} " " $episode " > /dev/null 2>&1 & ;;
You can’t perform that action at this time.
0 commit comments