feat(subsonic): wire contextual_likes capture/soft-delete into star/unstar
handleStar's track branch calls playevents.CaptureContextualLikeIfPlaying when the underlying LikeTrack actually inserted a row. handleUnstar calls SoftDeleteContextualLikes after every track-id unstar. Same helpers as the api surface — single source of truth. mediaHandlers struct gains a logger field threaded through Mount.
This commit is contained in:
@@ -57,7 +57,7 @@ func testScrobblePool(t *testing.T) (*pgxpool.Pool, dbq.User, dbq.Track) {
|
||||
func newScrobbleHandlers(pool *pgxpool.Pool) *mediaHandlers {
|
||||
logger := slog.New(slog.NewTextHandler(io.Discard, nil))
|
||||
w := playevents.NewWriter(pool, logger, 30*time.Minute, 0.5, 30000)
|
||||
return newMediaHandlers(pool, w)
|
||||
return newMediaHandlers(pool, w, logger)
|
||||
}
|
||||
|
||||
func TestHandleScrobble_SubmissionFalseInsertsOpenPlayEvent(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user