soulsync/tests/library
BoulderBadgeDad 2fb142dded jellyfin scan: page the bulk fetch so the no-progress watchdog can't false-stall
Discord (DXP4800 NAS, 7148 tracks): library updates kept dying with "Update appears stuck — no
progress for 300s (last phase: Fetching all tracks in bulk...)". not actually hung.

root cause: the bulk track/album fetch used a single 10000-item page, so a whole library came
back in ONE request that emitted NO progress while in flight. the watchdog (database_update_health)
kills a job with no progress for 300s — so on a slow server that one silent request tripped it even
though it was alive, not stuck. raising the timeout cap only buys the silent request more rope; a
bigger library or slower disk just needs a higher number. the per-batch progress line also only ran
when there was a NEXT page, so a sub-page-size library reported nothing at all.

fix: extract a pure paginate_all_items seam (core/library/bulk_paginate.py) that pages in 1000s and
reports progress after EVERY page — so the watchdog is fed on a cadence set by page size, not library
size, and can't starve mid-fetch no matter how big the library. both Jellyfin bulk loops (tracks +
albums, same defect) now route through it. preserves the failure-shrink resilience (halve to a floor,
then give up). does NOT change what's fetched — same query, fields, items.

note: changes nothing about WHICH tracks come back; only how they're paged + that every page reports.
keep the raised cap on dev as a margin — this is the actual fix. Plex/Navidrome don't share the
pattern (checked). 9 seam tests incl. the watchdog-feed invariant (progress count scales with
N/page_size, never one call for the whole library) + the sub-page regression + failure-shrink.
467 jellyfin/library tests green, ruff clean.
2026-06-28 13:41:38 -07:00
..
__init__.py Lift _execute_retag to core/library/retag.py 2026-04-29 09:03:42 -07:00
test_artist_image.py Drop platform-biased trailing-backslash test for derive_artist_folder 2026-05-13 11:52:04 -07:00
test_bulk_paginate.py jellyfin scan: page the bulk fetch so the no-progress watchdog can't false-stall 2026-06-28 13:41:38 -07:00
test_direct_id_match.py Manual match: paste a MusicBrainz ID/URL to match directly (Ashh) 2026-06-07 13:04:17 -07:00
test_embedded_id_reconcile.py Auto-reconcile embedded IDs for new tracks on library scans 2026-06-05 18:31:11 -07:00
test_expired_cleanup.py Expired Download Cleaner: retention-based cleanup of watchlist/playlist downloads (Boulder) 2026-06-07 22:06:56 -07:00
test_file_tags.py Add per-download Audit Trail modal to Library History 2026-05-13 09:50:24 -07:00
test_missing_track_import.py #917: 'I have this' reuses the album's existing folder year instead of dropping it 2026-06-23 16:18:00 -07:00
test_path_resolver.py fix(path-resolve): try full relative path first in shared resolver 2026-06-15 11:40:18 +02:00
test_redownload_album_data.py #915: redownload pulls full album_data from the primary source for iTunes/Deezer too 2026-06-23 19:21:50 -07:00
test_residual_files.py #891: clear dead folders left with only cover images / .lrc sidecars 2026-06-18 20:07:41 -07:00
test_standalone_scan.py #904: guard standalone Deep Scan against relocating a desynced library 2026-06-22 17:53:49 -07:00