Skip to content

Commit

Permalink
Error logic and updated message
Browse files Browse the repository at this point in the history
Checks to see if the episode selected is in the list of scraped episodes
available for that show and season. Updated error message to reflect
result
  • Loading branch information
HirschBerge committed Oct 6, 2024
1 parent 5daa876 commit cde5a60
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ani-cli
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ get_episode_url() {
links=$(cat "$cache_dir"/* | sed 's|^Mp4-||g;/http/!d;/Alt/d' | sort -g -r -s)
rm -r "$cache_dir"
episode=$(select_quality "$quality")
[ -z "$episode" ] && die "Episode not released!"
if echo "$ep_list" | grep -q "^$ep_no$"; then
[ -z "$episode" ] && die "Episode is released, but no valid sources!"
else
[ -z "$episode" ] && die "Episode not released!"
fi
}

# search the query and give results
Expand Down

0 comments on commit cde5a60

Please sign in to comment.