fix(subsonic): one listen is one play, and a daily mix played in a Subsonic app is credited to it
release / web (push) Successful in 1m23s
release / go (push) Successful in 1m55s
release / govulncheck (push) Successful in 19s
release / integration (push) Successful in 4m16s
release / android (push) Successful in 4m50s
release / Build signed APK (push) Successful in 5m29s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 17s
release / Verify release artifacts (tag releases only) (push) Skipped
release / web (push) Successful in 1m23s
release / go (push) Successful in 1m55s
release / govulncheck (push) Successful in 19s
release / integration (push) Successful in 4m16s
release / android (push) Successful in 4m50s
release / Build signed APK (push) Successful in 5m29s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 17s
release / Verify release artifacts (tag releases only) (push) Skipped
A Subsonic app reports "now playing" when a song starts and "played" when it ends. The played report used to close the now-playing row as a play of its own and write a second one, so every listen counted twice, and as a skip when the app sent the song's start time. The report now completes the app's own row for that song. A late report for an earlier song no longer cuts short the song playing now. Subsonic's scrobble doesn't say where a song was played from, so Minstrel remembers, per user and app, the daily mix the app last opened (for six hours). A play of a song in that mix is credited to it: the mix's metrics count it and its rotation moves on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -286,7 +286,7 @@ func TestRecordPlaySkipped_AlwaysSkipFlagAndSkipEventRow(t *testing.T) {
|
||||
func TestRecordSyntheticCompletedPlay_WritesBothRows(t *testing.T) {
|
||||
f := newFixture(t, 200_000)
|
||||
now := time.Now().UTC()
|
||||
if err := f.w.RecordSyntheticCompletedPlay(context.Background(), f.user, f.track, "feishin", now); err != nil {
|
||||
if err := f.w.RecordSyntheticCompletedPlay(context.Background(), f.user, f.track, "feishin", "", now); err != nil {
|
||||
t.Fatalf("synthetic: %v", err)
|
||||
}
|
||||
rows, _ := f.pool.Query(context.Background(),
|
||||
|
||||
Reference in New Issue
Block a user