mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
minor tweaks
This commit is contained in:
parent
8c36d69ca6
commit
6d65ba099d
14
ani-cli
14
ani-cli
@ -209,6 +209,10 @@ fi
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# add anime to history file
|
||||||
|
grep -q -w "${selection_id}" $logfile ||
|
||||||
|
printf "%s\t%d\n" "$selection_id" $((episode+1)) >> $logfile
|
||||||
|
|
||||||
open_episode () {
|
open_episode () {
|
||||||
anime_id=$1
|
anime_id=$1
|
||||||
episode=$2
|
episode=$2
|
||||||
@ -236,13 +240,9 @@ open_episode () {
|
|||||||
|
|
||||||
if [ $is_download -eq 0 ]; then
|
if [ $is_download -eq 0 ]; then
|
||||||
# write anime and episode number
|
# write anime and episode number
|
||||||
if $(grep -w "${selection_id}" $logfile >/dev/null); then
|
sed -E "
|
||||||
sed -E "
|
s/^${selection_id}\t[0-9]+/${selection_id}\t$((episode+1))/
|
||||||
s/^${selection_id}\t[0-9]+/${selection_id}\t$((episode+1))/
|
" $logfile > "${logfile}.new" && mv "${logfile}.new" $logfile
|
||||||
" $logfile > "${logfile}.new" && mv "${logfile}.new" $logfile
|
|
||||||
else
|
|
||||||
printf "%s\t%d\n" "$selection_id" $((episode+1)) >> $logfile
|
|
||||||
fi
|
|
||||||
|
|
||||||
setsid -f $player_fn "$video_url" >/dev/null 2>&1
|
setsid -f $player_fn "$video_url" >/dev/null 2>&1
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user