Playlist page shows Recommendations from Sources #99

Closed
opened 2026-10-22 20:56:33 +02:00 by SBDeveloper · 1 comment
Owner

What to build

A Playlist page shows Recommendations: Tracks a Source proposes from the Tracks already in the Playlist (ADR 0024, glossary term Recommendation).

A Source opts in through a new optional recommendations export in the plugin contract (seed TrackRefs in, Tracks out), documented next to continuation. The host samples up to about 25 seeds per Source from that Source's own Tracks in the Playlist, asks every Source that holds seeds and exports it, ranks by how many seeds agree, interleaves, dedupes, and drops Tracks already in the Playlist (Library Tracks are kept). The Deezer plugin implements the export. The Playlist page shows about 20 under the Tracks.

Each row has Play, Add (the normal add path, so it writes through on a Linked Playlist, ADR 0004) and Dismiss (remembered per Playlist on the Device, not synced). A Refresh button asks again with a new sample. The list is cached per Playlist on the Device and dropped when the Playlist changes; adding a Recommendation only removes its row. Hidden in Offline mode (ADR 0019). A Playlist with no Source Tracks shows nothing.

Acceptance criteria

  • Plugin contract documents the recommendations export; a Source without it is skipped without error
  • Host seeds per Source, ranks by seed agreement, dedupes across Sources, excludes Tracks already in the Playlist
  • Deezer plugin implements the export
  • Playlist page lists about 20 Recommendations with Play, Add, Dismiss and Refresh
  • Dismissed Tracks stay hidden for that Playlist across restarts; cache dropped on Playlist change
  • Section hidden in Offline mode
  • Core integration test covers seeding, ranking, dedupe and exclusion with a fixture plugin

Blocked by

None (can start immediately)

## What to build A Playlist page shows Recommendations: Tracks a Source proposes from the Tracks already in the Playlist (ADR 0024, glossary term **Recommendation**). A Source opts in through a new optional `recommendations` export in the plugin contract (seed TrackRefs in, Tracks out), documented next to `continuation`. The host samples up to about 25 seeds per Source from that Source's own Tracks in the Playlist, asks every Source that holds seeds and exports it, ranks by how many seeds agree, interleaves, dedupes, and drops Tracks already in the Playlist (Library Tracks are kept). The Deezer plugin implements the export. The Playlist page shows about 20 under the Tracks. Each row has Play, Add (the normal add path, so it writes through on a Linked Playlist, ADR 0004) and Dismiss (remembered per Playlist on the Device, not synced). A Refresh button asks again with a new sample. The list is cached per Playlist on the Device and dropped when the Playlist changes; adding a Recommendation only removes its row. Hidden in Offline mode (ADR 0019). A Playlist with no Source Tracks shows nothing. ## Acceptance criteria - [ ] Plugin contract documents the `recommendations` export; a Source without it is skipped without error - [ ] Host seeds per Source, ranks by seed agreement, dedupes across Sources, excludes Tracks already in the Playlist - [ ] Deezer plugin implements the export - [ ] Playlist page lists about 20 Recommendations with Play, Add, Dismiss and Refresh - [ ] Dismissed Tracks stay hidden for that Playlist across restarts; cache dropped on Playlist change - [ ] Section hidden in Offline mode - [ ] Core integration test covers seeding, ranking, dedupe and exclusion with a fixture plugin ## Blocked by None (can start immediately)
Author
Owner

Implemented in fb10594, 74fdfc2 and 8c88358 (not pushed yet). Recommendations export in the plugin contract, host seeding/ranking/dedupe/exclusion, Deezer implementation, Playlist page section with Play/Add/Dismiss/Refresh, per-Playlist dismissals and cache, hidden offline. Core integration tests in crates/core/tests/recommendations.rs plus unit tests. Not covered: the local-file opt-in setting from ADR 0024 (out of scope here).

Implemented in fb10594, 74fdfc2 and 8c88358 (not pushed yet). Recommendations export in the plugin contract, host seeding/ranking/dedupe/exclusion, Deezer implementation, Playlist page section with Play/Add/Dismiss/Refresh, per-Playlist dismissals and cache, hidden offline. Core integration tests in crates/core/tests/recommendations.rs plus unit tests. Not covered: the local-file opt-in setting from ADR 0024 (out of scope here).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
SBDeveloper/medley#99
No description provided.