Skip to content

Commit a3234ee

Browse files
committed
fix(iina): omit --keep-running when IINA is running; simplify wait; bump version to 4.10.4
1 parent d3ebe20 commit a3234ee

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

ani-cli

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
version_number="4.10.3"
3+
version_number="4.10.4"
44

55
# UI
66

@@ -214,12 +214,10 @@ get_episode_url() {
214214
# generate links into sequential files
215215
cache_dir="$(mktemp -d)"
216216
providers="1 2 3 4"
217-
pids=""
218217
for provider in $providers; do
219218
generate_link "$provider" >"$cache_dir"/"$provider" &
220-
pids="$pids $!"
221219
done
222-
wait "$pids"
220+
wait
223221
# select the link with matching quality
224222
links=$(cat "$cache_dir"/* | sort -g -r -s)
225223
rm -r "$cache_dir"
@@ -327,9 +325,8 @@ play_episode() {
327325
*iina*)
328326
[ -n "$subs_flag" ] && subs_flag="--mpv-${subs_flag#--}"
329327
[ -n "$refr_flag" ] && refr_flag="--mpv-${refr_flag#--}"
330-
# check for existing instance
331328
if pgrep -f "IINA" >/dev/null 2>&1; then
332-
# using IINA instance without --keep-running to prevent hanging
329+
# omit --keep-running when an IINA instance exists to prevent hanging
333330
nohup $player_function --no-stdin --mpv-force-media-title="${allanime_title}Episode ${ep_no}" $subs_flag $refr_flag "$episode" >/dev/null 2>&1 &
334331
else
335332
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 &

0 commit comments

Comments
 (0)