fix: never replay a client-excluded track in a radio batch
CI / chart (push) Successful in 4s
CI / test (push) Successful in 2m19s
CI / chart-push (push) Successful in 6s
CI / image (push) Successful in 3m24s

This commit is contained in:
TapTap committed 2026-11-15 21:53:23 +00:00
1 parent ef536d1882
commit 61d8b58223
2 files changed
+16 -2

No files matched your search

@@ -99,8 +99,12 @@ class RadioService(
// within one batch.
if (picks.size < limit) {
val pickedIds = picks.map { it.id }.toSet()
val heardCollection = collection.filter { it.id in skip && it.id !in pickedIds }
val heardRecommendations = recommendations.filter { it.id in skip && it.id !in pickedIds }
val heardCollection = collection.filter {
it.id in sessionSongs && it.id !in excluded && it.id !in pickedIds
}
val heardRecommendations = recommendations.filter {
it.id in sessionSongs && it.id !in excluded && it.id !in pickedIds
}
picks += pickMixed(
collectionScored = score(heardCollection, affinity, recent, heard = true),
recommendationScored = score(heardRecommendations, affinity, recent, heard = true),