fix specifying range (again)

This commit is contained in:
ksyasuda 2021-11-01 19:48:19 -07:00
parent f363d2fca5
commit 2c0921842e

View File

@ -344,7 +344,9 @@ episode_selection() {
# if only one episode was entered, set ep_choice_end to empty string so only selected episode plays # if only one episode was entered, set ep_choice_end to empty string so only selected episode plays
# otherwise plays from ep 1 - ep_choice_start # otherwise plays from ep 1 - ep_choice_start
[ "$ep_choice_start" -eq "$ep_choice_end" ] && ep_choice_end="" if [[ "$ep_choice_start" -eq "$ep_choice_end" ]]; then
ep_choice_end=""
fi
[ "$VERBOSE" -eq 1 ] && printf "%s\n" "START: $ep_choice_start | END: $ep_choice_end" [ "$VERBOSE" -eq 1 ] && printf "%s\n" "START: $ep_choice_start | END: $ep_choice_end"
# read ep_choice_start ep_choice_end # read ep_choice_start ep_choice_end
@ -507,7 +509,7 @@ esac
if [ -n "$ep_choice_end" ]; then if [ -n "$ep_choice_end" ]; then
[ "$ep_choice_end" -eq "$ep_choice_end" ] 2>/dev/null || die "Invalid number entered" [ "$ep_choice_end" -eq "$ep_choice_end" ] 2>/dev/null || die "Invalid number entered"
# create list of episodes to download/watch # create list of episodes to download/watch
episodes=$(seq 1 $ep_choice_end) episodes=$(seq $ep_choice_start $ep_choice_end)
fi fi
} }