Skip to content

Commit

Permalink
fix: no-detach detatching (#1274)
Browse files Browse the repository at this point in the history
  • Loading branch information
port19x authored Mar 22, 2024
1 parent 0bf639c commit 63b7b9e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ani-cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

version_number="4.8.1"
version_number="4.8.2"

# UI

Expand Down Expand Up @@ -247,7 +247,13 @@ play_episode() {
[ -z "$ANI_CLI_NON_INTERACTIVE" ] && printf "All links:\n%s\nSelected link:\n" "$links"
printf "%s\n" "$episode"
;;
mpv*) $([ "$no_detach" = 0 ] && echo "nohup") "$player_function" $skip_flag --force-media-title="${allanime_title}Episode ${ep_no}" "$episode" >/dev/null 2>&1 & ;;
mpv*)
if [ "$no_detach" = 0 ]; then
nohup "$player_function" $skip_flag --force-media-title="${allanime_title}Episode ${ep_no}" "$episode" >/dev/null 2>&1 &
else
"$player_function" $skip_flag --force-media-title="${allanime_title}Episode ${ep_no}" "$episode"
fi
;;
android_mpv) nohup am start --user 0 -a android.intent.action.VIEW -d "$episode" -n is.xyz.mpv/.MPVActivity >/dev/null 2>&1 & ;;
android_vlc) nohup am start --user 0 -a android.intent.action.VIEW -d "$episode" -n org.videolan.vlc/org.videolan.vlc.gui.video.VideoPlayerActivity -e "title" "${allanime_title}Episode ${ep_no}" >/dev/null 2>&1 & ;;
iina) nohup "$player_function" --no-stdin --keep-running --mpv-force-media-title="${allanime_title}Episode ${ep_no}" "$episode" >/dev/null 2>&1 & ;;
Expand Down

0 comments on commit 63b7b9e

Please sign in to comment.