soulsync/tests/wishlist
BoulderBadgeDad 8633386f00 Wishlist: manual "add to wishlist" now skips already-owned tracks (#825)
The manual album "Add to Wishlist" modal had NO ownership check at any layer —
the album view opened the modal without ownership info, the modal added every
track, and the backend (add_album_track_to_wishlist) added each unconditionally.
So adding an album you (partially) own dumped the owned tracks straight into the
wishlist (carlosjfcasero #825) — and the auto-cleanup doesn't reliably remove
them. The bulk discography path already dedups (full missing-track analysis);
this path didn't.

Backend (the reliable seam): add_album_track_to_wishlist now skips a track that
already exists in the library, gated on the same wishlist.allow_duplicate_tracks
toggle the watchlist scan + cleanup use — OFF → skip owned (returns
{success, skipped:true}), ON → add anyway. Default is ON, so default users are
unaffected; the quality re-download flow uses a different endpoint, so it's
untouched.

Frontend: handleAddToWishlist + addModalTracksToWishlist count skipped tracks
separately so the toast is honest ("Added 3 (5 already owned)" / "All N already
in your library") instead of falsely claiming owned tracks were added.

Tests: skips owned when duplicates off, adds missing when off, adds owned when
on (and doesn't even run the check then). 205 wishlist tests pass.
2026-06-09 10:55:45 -07:00
..
__init__.py Extract wishlist logic into dedicated package 2026-04-28 21:17:24 +03:00
test_album_grouping.py Wishlist: only engage album-bundle when multiple tracks from same album (PR 1/4) 2026-05-27 13:42:04 -07:00
test_automation.py Fix #740: run wishlist album-bundle downloads on a dedicated pool 2026-05-29 14:31:10 -07:00
test_batch_factory.py Wishlist: unify batch-row construction into make_wishlist_batch_row 2026-05-29 16:55:31 -07:00
test_cancelled_payload.py Extract wishlist logic into dedicated package 2026-04-28 21:17:24 +03:00
test_classification.py Coerce wishlist track counts before category checks 2026-04-30 21:42:43 +03:00
test_cleanup.py Extract wishlist logic into dedicated package 2026-04-28 21:17:24 +03:00
test_failed_track_payload.py Extract wishlist logic into dedicated package 2026-04-28 21:17:24 +03:00
test_manual_download.py Wishlist: route the manual flow through the shared engine (manual == auto) 2026-05-29 17:43:40 -07:00
test_payloads.py Wishlist: fix three regressions causing all imports to land as track 01 with no year 2026-05-27 15:39:22 -07:00
test_presence.py Expand wishlist test coverage 2026-04-28 21:17:47 +03:00
test_processing.py Fix organize-by-playlist downloads: library entries, wishlist, and stale Spotify cache 2026-06-03 10:26:32 +02:00
test_reporting.py Extract wishlist logic into dedicated package 2026-04-28 21:17:24 +03:00
test_resolution.py Make wishlist respect configured providers 2026-04-30 07:41:22 +03:00
test_routes.py Wishlist: manual "add to wishlist" now skips already-owned tracks (#825) 2026-06-09 10:55:45 -07:00
test_selection.py Extract wishlist logic into dedicated package 2026-04-28 21:17:24 +03:00
test_service.py Accept wishlist track_data aliases 2026-04-30 07:59:43 +03:00
test_state.py Extract wishlist logic into dedicated package 2026-04-28 21:17:24 +03:00