soulsync/core/imports
BoulderBadgeDad 4c47c01076 #922: import search labelled Spotify Free users' primary source as 'Deezer'
A Spotify Free (no-auth) user saw 'Showing Discogs results - not from your
primary source (Deezer)' on the manual album-import search. Root cause:
get_primary_source() deliberately downgrades an unauthenticated Spotify to the
working fallback (deezer) so client routing always yields a usable client - and
the import payload reused that FUNCTIONAL value for the LABEL. The free source
has no album-name search (SpotifyFreeMetadataClient.search_albums() returns []),
so falling back for results is correct; only the label was wrong.

Fix: get_primary_source_label() preserves the user's configured intent (Spotify
Free reads as 'spotify') without touching client routing or the search chain.
The import album/track/suggestions payloads now return the label; the functional
source still drives the hydrabase-enqueue + fallback chain. Banner now reads
'not from your primary source (Spotify)'.

Tests: seam tests for get_primary_source_label + route regression pinning the
label/functional decoupling; updated 4 existing import-route tests.
2026-06-24 08:43:52 -07:00
..
__init__.py
album.py
album_grouping.py
album_matching.py
album_naming.py
album_position.py
context.py
file_integrity.py
file_ops.py
filename.py
folder_artist.py
guards.py
paths.py
pipeline.py
quarantine.py
rematch_apply.py
rematch_hints.py
rematch_search.py
resolution.py
routes.py
side_effects.py
single_to_album.py
staging.py
tag_policy.py
track_number.py
version_mismatch_fallback.py