Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ani-cli
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,11 @@ process_hist_entry() {
latest_ep=$(printf "%s\n" "$ep_list" | tail -n1)
title=$(printf "%s\n" "$title" | sed "s|[0-9]\+ episodes|${latest_ep} episodes|")
ep_no=$(printf "%s" "$ep_list" | sed -n "/^${ep_no}$/{n;p;}") 2>/dev/null
[ -n "$ep_no" ] && printf "%s\t%s - episode %s\n" "$id" "$title" "$ep_no"
if [ -n "$ep_no" ]; then
printf "%s\t%s - episode %s\n" "$id" "$title" "$ep_no"
else
printf "%s\t%s - episode %s (up to date)\n" "$id" "$title" "$latest_ep"
fi
Comment thread
port19x marked this conversation as resolved.
Outdated
}

update_history() {
Expand Down Expand Up @@ -594,6 +598,9 @@ case "$search" in
ep_list=$(episodes_list "$id")
ep_no=$(printf "%s" "$anime_list" | grep "$id" | cut -f2 | sed -nE 's/.*- episode (.+)$/\1/p')
allanime_title="$(printf "%s" "$title" | cut -d'(' -f1 | tr -d '[:punct:]')"
if printf "%s" "$anime_list" | grep "$id" | cut -f2 | grep -q "(up to date)"; then
time_until_next_ep "$allanime_title"
fi
Comment thread
port19x marked this conversation as resolved.
Outdated
;;
*)
if [ "$use_external_menu" = "0" ]; then
Expand Down
Loading