Casvt / Kapowarr

Kapowarr is a software to build and manage a comic book library, fitting in the *arr suite of software.
https://casvt.github.io/Kapowarr/
GNU General Public License v3.0
446 stars 17 forks source link

Issue search runs infinitely when there are no results #62

Closed Colin1224 closed 1 year ago

Colin1224 commented 1 year ago

Description of the bug When searching for issues, sometimes an issue with no results will appear and the search will continue infinitely. When manually searching, the search can be canceled, but with auto search the search will continue until Kapowarr is restarted.

The reason for this seems to be a difference in year between ComicVine and GetComics. For example, The Cover Date of Action Comics 1049 is January 2023, but the In Store Date was November 22nd, 2022. So Kapowarr will search for "Action Comics 1049 (2023)" because the Cover Date is in 2023, but GetComics has this issue listed as "Action Comics 1049 (2022)" because the In Store Date was in 2022. The same problem happens with Action Comics 1050 because the cover date is also in 2023, but the in store date was in 2022. Issues with Cover dates and in-store dates in the same year are found without problem.

To Reproduce

  1. Add volume Action Comics V3 (2016)
  2. Navigate to new Action Comics listing in "Volumes"
  3. Click manual search for Action Comics 1049 or 1050
  4. See infinite manual search
  5. Cancel search
  6. Click Auto Search for Action Comics 1049 or 1050
  7. See that search will continue infinitely until Kapowarr is restarted

Expected behavior Kapowarr should be able to find the issue in GetComics even if the In-Store year and Cover year are different.

Considering that GetComics organizes based on in-store date, the manual and automatic search functionality should use the in-store date for searching GetComics, instead of the cover date. The in-store date can be retrieved from the ComicVine api via "store_date".

In the event that the issue actually doesn't exist in GetComics, then Kapowarr should just say "No issues found" instead of continuing until cancel or restart.

Version info Kapowarr version: v1.0.0-beta-1 Python version: 3.8.16.final.0 Database version: 6 OS: Windows 11 Browser: Firefox 114.0.2 Docker

Casvt commented 1 year ago

I can not reproduce the "infinite" search. To start with, it's most likely not an infinite search but instead the search erroring out, so the code to announce that the search is complete never runs, making it look in the UI as if it's running infinitely. Please check the console for any errors when you do the search, because as I said I can't reproduce.

Aside from the "infinite" search, you also mention a second problem: GC using in-store dates instead of cover dates. Are you 100% sure that GetComics uses the in-store date for all releases? That means for issue releases, TPB's, issue ranges, etc. Does GetComics use the in-store date for all titles containing a year? Because then, Kapowarr should just use the in-store date for all searches instead of the cover date.

Casvt commented 1 year ago

@Colin1224 Please respond

Casvt commented 1 year ago

@Colin1224 I'm going to close the issue until you respond