soulsync/core/imports
Broque Thomas 8a11a660af Extract manual import route handlers
Move the remaining manual import endpoint logic out of web_server.py and into core.imports.routes behind ImportRouteRuntime. The Flask endpoints now stay as thin compatibility wrappers for album/track search, album match/process, single-file import processing, and batched singles processing.

Keep legacy test patch points intact by re-exporting build_album_import_match_payload from web_server and routing singles_process through an injected process_single_import_file callable. This preserves existing route-level monkeypatch behavior while keeping the extracted helper testable.

Add focused helper coverage for Hydrabase enqueueing, search limit clamping, album match payload forwarding, album import side effects, single-file worker outcomes, malformed manual matches, and singles aggregation/injected-worker behavior.

Verification: py_compile and git diff --check passed locally; bundled-Python smoke covered the extracted helpers. Claude reran the project tests and reported all tests passing.
2026-05-13 21:27:01 -07:00
..
__init__.py Rehome import helpers into core/imports 2026-04-27 19:54:44 +03:00
album.py Rehome import helpers into core/imports 2026-04-27 19:54:44 +03:00
album_matching.py Auto-import matching: fix Deezer source classification + bump tolerance 2026-05-09 15:53:17 -07:00
album_naming.py Rehome import helpers into core/imports 2026-04-27 19:54:44 +03:00
context.py Fix Spotify source ID fallback 2026-05-02 22:02:01 +03:00
file_integrity.py Reject broken downloads before tagging via universal integrity check 2026-05-03 08:21:01 -07:00
file_ops.py Surface silent exceptions across remaining modules — ~70 sites 2026-05-07 10:28:58 -07:00
filename.py Rehome import helpers into core/imports 2026-04-27 19:54:44 +03:00
guards.py Surface silent exceptions across remaining modules — ~70 sites 2026-05-07 10:28:58 -07:00
paths.py Surface silent exceptions across remaining modules — ~70 sites 2026-05-07 10:28:58 -07:00
pipeline.py Surface silent exceptions across remaining modules — ~70 sites 2026-05-07 10:28:58 -07:00
resolution.py Surface silent exceptions across remaining modules — ~70 sites 2026-05-07 10:28:58 -07:00
routes.py Extract manual import route handlers 2026-05-13 21:27:01 -07:00
side_effects.py Auto-import: album duration = album total + conservative re-import UPDATE path 2026-05-09 21:19:35 -07:00
staging.py Fix single import source handling 2026-04-27 19:54:45 +03:00