soulsync/tests/downloads
Broque Thomas 6a75d656fa Cin-2: Generic accessors on orchestrator + singleton factory
Cin's review feedback: external callers reach per-source clients
via attribute access (orch.hifi.reload_instances()) — needs
generic accessors so the registry IS the single source of truth.

Adds:
- orch.client(name) — public accessor for a per-source client.
  Resolves canonical names (deezer) AND legacy aliases (deezer_dl).
- orch.configured_clients() — returns {name: client} for every
  initialized AND is_configured() == True source. Replaces the
  6+ if/hasattr/is_configured chain Cin called out:
    if hasattr(orch, 'soulseek') and orch.soulseek and \
       orch.soulseek.is_configured(): ...
- orch.reload_instances(source=None) — generic dispatch for
  source-specific reload calls. Replaces orch.hifi.reload_instances()
  with orch.reload_instances('hifi').
- get_download_orchestrator() / set_download_orchestrator()
  singleton factory matching Cin's get_metadata_engine pattern in
  PR #498. web_server.py can install the orchestrator it builds
  at boot so future callers grab via the factory instead of
  importing the legacy `soulseek_client` global.

Phase Cin-3/Cin-4 will replace existing call sites; this commit
just provides the surface so those migrations are mechanical.

Suite still green (335 download tests + 6 new generic-accessor
tests).
2026-05-04 22:35:45 -07:00
..
__init__.py PR4a: lift sync history recording to core/downloads/history.py 2026-04-27 20:37:16 -07:00
test_background_download_worker.py Self-review fixes before opening PR 2026-05-04 16:24:13 -07:00
test_deezer_pinning.py C6: Migrate Deezer to engine.worker 2026-05-04 14:02:03 -07:00
test_download_engine.py Self-review fixes before opening PR 2026-05-04 16:24:13 -07:00
test_download_orchestrator.py Cin-2: Generic accessors on orchestrator + singleton factory 2026-05-04 22:35:45 -07:00
test_downloads_cancel.py PR4b: lift cancel + clear download routes to core/downloads/cancel.py 2026-04-27 21:41:35 -07:00
test_downloads_candidates.py PR6: lift _attempt_download_with_candidates to core/downloads/candidates.py 2026-04-28 22:06:33 -07:00
test_downloads_cleanup.py PR4c: lift _automatic_wishlist_cleanup_after_db_update to core/downloads/cleanup.py 2026-04-27 22:23:41 -07:00
test_downloads_history.py PR4a: lift sync history recording to core/downloads/history.py 2026-04-27 20:37:16 -07:00
test_downloads_lifecycle.py Rename wishlist lifecycle helper 2026-04-30 08:06:02 +03:00
test_downloads_master.py PR4h: lift _run_full_missing_tracks_process to core/downloads/master.py 2026-04-28 10:34:13 -07:00
test_downloads_post_processing.py Trim slow retry from post-processing test 2026-04-28 21:27:01 +03:00
test_downloads_staging.py Lift _try_staging_match to core/downloads/staging.py 2026-04-28 23:26:15 -07:00
test_downloads_status.py PR4e: lift status helpers + 3 routes to core/downloads/status.py 2026-04-27 23:26:26 -07:00
test_downloads_task_worker.py PR4f: lift _download_track_worker to core/downloads/task_worker.py 2026-04-28 07:50:01 -07:00
test_hifi_pinning.py C5: Migrate HiFi to engine.worker 2026-05-04 13:57:01 -07:00
test_lidarr_pinning.py A8: Pin LidarrDownloadClient download lifecycle behavior 2026-05-04 12:10:49 -07:00
test_qobuz_pinning.py C4: Migrate Qobuz to engine.worker 2026-05-04 13:52:55 -07:00
test_rate_limit_policy.py E1: Add RateLimitPolicy declaration mechanism 2026-05-04 14:38:20 -07:00
test_soulseek_pinning.py A1: Pin SoulseekClient download lifecycle behavior 2026-05-04 11:45:44 -07:00
test_soundcloud_pinning.py C7: Migrate SoundCloud to engine.worker 2026-05-04 14:24:50 -07:00
test_tidal_pinning.py C3: Migrate Tidal to engine.worker 2026-05-04 13:49:36 -07:00
test_youtube_pinning.py E2: Migrate YouTube to declared rate-limit policy 2026-05-04 14:45:52 -07:00