pystardust / ani-cli

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

Unexpected behaviour with search queries with a lot of results #1141

Closed kirill-dudchenko closed 1 year ago

kirill-dudchenko commented 1 year ago

Metadata (please complete the following information) Version: 4.4.0 OS: MacOS Shell: zsh Anime: Nichijou/Code Geass/Yuri Yuri/any query which returns a lot of results

Describe the bug I noticed you cannot play a title if there were a lot of search results before that (I suspect it breaks if there are more than 9 results).

For example, if you search for Code Geass (ani-cli 'code geass') it returns 25 results. After you select any of them, the terminal says 'Checking dependencies...' and stops executing.

I didn't see the code, but maybe it's related to the structure of the search results? It's somewhat weird, because it goes from 1 to 9, then again repeats from 1 to 9 and so on.

Steps To Reproduce

  1. Run ani-cli code geass
  2. Choose any
  3. The process stops executing, the last output in the terminal is 'Checking dependencies...'

Expected behavior User should be forwarded to the menu with the episode selection.

Screenshots (if applicable; you can just drag the image onto github) Screenshot 2023-06-05 at 11 53 34 Screenshot 2023-06-05 at 11 53 44 Screenshot 2023-06-05 at 11 59 01

Additional context There aren't any problems with other titles which have fewer search results. It is not related to the latest patch released today (I've had this issue previously).

Derisis13 commented 1 year ago

Are you sure it's the amount of returned results (highly unlikely in my opinion) and not some other variable in those titles, like a special character (more likely in my opinion) or some other variable that coincides with code geass titles?

kirill-dudchenko commented 1 year ago

I’m certainly not sure that this is the issue, but I couldn’t find any other patterns which lead to this behaviour. It behaves this way every time there’s a huge search result (not only Code Geass, I tried it with Nichijou, Naruto, Yuri Yuri, etc.). And it works normally every time the search result is small.

Is the bug not reproducible?