pystardust / ani-cli

A cli tool to browse and play anime
GNU General Public License v3.0
7.92k stars 544 forks source link

Exception: episode URL parse error if empty string is used after nonexistend/not aired episode #351

Closed ejkozan closed 2 years ago

ejkozan commented 2 years ago

Something found by chance. After trying to play not aired yet episode (or putting number out of range) and then just hitting enter, this is spit out (tested on 40 episode of Shaman king 2021 and on episode of FLCL dub:

Episode out of range
Choose episode [1-39]:
/home/ejkozan/bin/ani-cli: 304: [: Illegal number:
/home/ejkozan/bin/ani-cli: 304: [: Illegal number:
Getting data for episode
parse error: Invalid numeric literal at line 1, column 5

Video URL not found

Probably just some special edge case. As always dash is used as POSIX shell

port19x commented 2 years ago

It says Episode out of range, isn't this expected behaviour?

ejkozan commented 2 years ago

Yes, but I meant second part when script crashes after showing errors. I know this is very special case and I found it only because I was too fast with pressing enter.