soulsync/core/imports
dev d2abec4a92 feat(quality): unify quality scanner onto the real ranked-target core (strict)
The library quality scanner judged quality by FILE EXTENSION only
(get_quality_tier_from_extension) and read the legacy v2 `qualities` dict —
so every FLAC was "lossless tier 1" regardless of bit depth / sample rate. It
could never flag a 16-bit FLAC as upgradeable under a 24-bit profile, and it
ignored the v3 ranked_targets entirely. Completely inconsistent with the
download guard.

Now both share one core:
- selection.targets_from_profile(profile) — single profile→targets conversion
  (v2→v3 migration), reused by load_profile_targets.
- selection.quality_meets_profile(aq, targets) — strict: meets iff the real
  measured quality satisfies a ranked target (fallback ignored — it's a
  download concession, not a definition of "good enough").
- guards.check_quality_target refactored to use both.
- quality_scanner probes real quality (probe_audio_quality) and checks against
  the v3 targets via quality_meets_profile. Extension tier kept only as a
  fallback label when a file can't be probed.

Result: the scan flags exactly what the download gate would reject — 16-bit
when you want 24-bit, wrong sample rate, MP3 when you want FLAC.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 22:50:01 +02:00
..
__init__.py Rehome import helpers into core/imports 2026-04-27 19:54:44 +03:00
album.py Show MusicBrainz release variants in import 2026-05-24 09:33:19 -07: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 Multi-artist tags: Search → Download Now finally knows its metadata source (Netti93) 2026-06-09 17:20:16 -07:00
file_integrity.py Import: don't duration-quarantine manual imports against a re-resolved release (#804) 2026-06-07 23:02:34 -07:00
file_ops.py feat(ui): show sample rate in the audio quality string (FLAC 24bit/96kHz) 2026-06-14 17:30:06 +02:00
filename.py Fix album-bundle downloads landing every track as track 1 2026-05-26 21:04:27 -07:00
folder_artist.py Use app confirm modal for verification review actions 2026-06-11 01:53:05 +02:00
guards.py feat(quality): unify quality scanner onto the real ranked-target core (strict) 2026-06-14 22:50:01 +02:00
paths.py Playlists: remove dead _playlist_folder_mode routing branches (retired flag, now unreachable) 2026-06-12 18:52:57 -07:00
pipeline.py fix(imports): quality/audio-guard quarantine no longer also marks task completed 2026-06-14 22:18:40 +02:00
quarantine.py Fix import artist override and verification review 2026-06-11 01:28:31 +02:00
resolution.py Surface silent exceptions across remaining modules — ~70 sites 2026-05-07 10:28:58 -07:00
routes.py Import: don't duration-quarantine manual imports against a re-resolved release (#804) 2026-06-07 23:02:34 -07:00
side_effects.py fix(downloads): unverified review actions always load + show real quality on completed 2026-06-14 17:11:17 +02:00
silence.py fix(imports): detect truncated downloads (real audio shorter than container) 2026-06-14 15:14:11 +02:00
staging.py Fix album-bundle downloads landing every track as track 1 2026-05-26 21:04:27 -07:00
tag_policy.py Import: never wipe a clean/matched import's tags when enhancement fails (#804) 2026-06-07 22:44:43 -07:00
track_number.py Wishlist: fix three regressions causing all imports to land as track 01 with no year 2026-05-27 15:39:22 -07:00
version_mismatch_fallback.py Post-merge #801 follow-ups: un-silence the retry engine's logs + register origin-history.js 2026-06-07 00:58:09 -07:00