soulsync/core/imports
Broque Thomas 99a38a6201 Route imported singles/EPs through album_path template
Discord-reported (winecountrygames + fresh.dumbledore): "Import only
makes Albums folder no singles or eps". Users with a
${albumtype}s/$albumartist/... album_path template saw an "Albums"
folder fill up correctly but never any "Singles" or "EPs" folder.

build_import_album_info detected an album using
``total_tracks > 1`` AND ``album_name != track_title``. Spotify
singles fail both — total_tracks is 1 and the album is usually
named after the song. The result was that staging/auto-import
routed singles through single_path, which doesn't honour
$albumtype, so the user's per-type folder layout never applied.

Now also treats the metadata source's explicit release-type
classification ("single", "ep", "compilation") as evidence that
this is an album-shaped release, so it routes through album_path
and the user's $albumtype substitution runs. The default fallback
value "album" is deliberately excluded from this check so
single-track downloads with no real metadata behave exactly as
before.

Adds 10 regression tests covering the reported scenario, EP and
compilation explicit types, and three guards: normal multi-track
albums still detected, default 'album' type falls through, and
empty/unknown types fall through.
2026-04-30 21:33:09 -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_naming.py Rehome import helpers into core/imports 2026-04-27 19:54:44 +03:00
context.py Route imported singles/EPs through album_path template 2026-04-30 21:33:09 -07:00
file_ops.py Tighten metadata and import safety 2026-04-27 20:28:05 +03:00
filename.py Rehome import helpers into core/imports 2026-04-27 19:54:44 +03:00
guards.py Tighten metadata and import safety 2026-04-27 20:28:05 +03:00
paths.py fix: substitute \$cdnum in download paths and skip auto disc folder when template uses it 2026-04-28 21:32:24 -07:00
pipeline.py Extract wishlist logic into dedicated package 2026-04-28 21:17:24 +03:00
resolution.py Move metadata helpers into package modules 2026-04-29 11:28:42 +03:00
side_effects.py Extract wishlist logic into dedicated package 2026-04-28 21:17:24 +03:00
staging.py Fix single import source handling 2026-04-27 19:54:45 +03:00