mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
93e7c7b6b7
Every comicvine search probed up to eight candidate volumes one request at a time, each holding a one second rate limiter slot against an endpoint that answers in three to four seconds, so the fifteen second provider budget ran out before the right volume was reached and the search reported an empty result. Rank volumes on the name and issue count already carried by the volume search response, then probe them in concurrent waves, so the runs that can hold the issue are tried first and within budget. Bind the work to a soft deadline that aborts requests still in flight. Reaching it now yields the candidates already found, rather than letting a late detail lookup cross the hard timeout and take everything with it. A probe or detail lookup that fails or is throttled costs its own result only, never its siblings or the candidate it was enriching. Take the series name from a query the user actually typed instead of the stored one, or searching a comic for a different series silently returned the series it was already filed under. Strip the zero padding comic filenames add to issue numbers in the provider rather than only in the search controller, so the background refresh path benefits too. Report a provider that timed out, was throttled, or failed as its own stream event, since all three were indistinguishable from a genuinely empty result. Candidates keep the default event and an unchanged payload, so a client has to read the event name to tell the two apart. Fixes #1039