soulsync/core/download_plugins
BoulderBadgeDad 95d6ad4bc9 Fix: torrent/usenet album bundle hard-fails on 'no results' instead of falling back
A torrent-first (or usenet-first) hybrid download would freeze at
"Torrent searching for release 0%" and never move to the next source when
Prowlarr returned no results for the album. Reported by Cezar:
  [Album Bundle] torrent flow failed for '...': No torrent results found

Cause: the album-bundle dispatch only returns to the per-track flow (which,
in hybrid mode, tries the next configured source) when the plugin's failure
outcome carries fallback=True; otherwise it marks the batch failed and stops.
Both plugins set fallback=True on their 'results found but none matched the
album' branch, but the adjacent 'no results at all' branch set only an error
and no fallback flag -- so zero results hard-failed while wrong results fell
back. Backwards, and soulseek's plugin already defaults fallback=True for
exactly this reason.

Fix: set fallback=True on the no-results branch in torrent.py and usenet.py.
The dispatch's fallback handling (return False -> per-track flow) was already
correct and is unchanged.

The only consumer of download_album_to_staging is the dispatch, which reads
the result via .get('fallback'), so the change is additive and locally
contained.

Tests: new test_torrent_album_to_staging_no_results_flags_fallback and
test_usenet_album_to_staging_no_results_flags_fallback assert the plugins now
emit fallback=True on an empty search; the existing torrent no-results test is
extended with the same assertion. Existing dispatch tests already pin
fallback=True -> per-track flow. Full downloads/plugins/adapters sweep: 690
passed.
2026-06-01 09:55:59 -07:00
..
__init__.py Cin-1: Make DownloadSourcePlugin inheritance explicit on every client 2026-05-04 22:19:52 -07:00
album_bundle.py Album picker #730: add word-boundary full-phrase bonus (from PR #731 review) 2026-05-30 20:10:22 -07:00
base.py Address Copilot doc-drift review 2026-05-05 15:46:48 -07:00
registry.py feat(downloads): wire torrent + usenet as live download sources 2026-05-20 17:22:19 -07:00
torrent.py Fix: torrent/usenet album bundle hard-fails on 'no results' instead of falling back 2026-06-01 09:55:59 -07:00
types.py Add torrent and usenet release staging support 2026-05-21 14:22:21 -07:00
usenet.py Fix: torrent/usenet album bundle hard-fails on 'no results' instead of falling back 2026-06-01 09:55:59 -07:00