From 48eadd05e369f8e6ae2120a69c27d6c5558d89c9 Mon Sep 17 00:00:00 2001 From: sentriz Date: Wed, 25 Oct 2023 10:42:23 +0100 Subject: [PATCH] don't scrobble podcast episodes --- server/ctrlsubsonic/handlers_common.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/ctrlsubsonic/handlers_common.go b/server/ctrlsubsonic/handlers_common.go index 12a3689..af837f7 100644 --- a/server/ctrlsubsonic/handlers_common.go +++ b/server/ctrlsubsonic/handlers_common.go @@ -88,15 +88,15 @@ func (c *Controller) ServeScrobble(r *http.Request) *spec.Response { return spec.NewError(0, "error finding podcast episode: %v", err) } - scrobbleTrack.Track = podcastEpisode.Title - scrobbleTrack.Artist = podcastEpisode.Podcast.Title - scrobbleTrack.Duration = time.Second * time.Duration(podcastEpisode.Length) - if err := scrobbleStatsUpdatePodcastEpisode(c.dbc, id.Value); err != nil { return spec.NewError(0, "error updating stats: %v", err) } } + if scrobbleTrack.Track == "" { + return spec.NewResponse() + } + var wg sync.WaitGroup scrobbleErrs := make([]error, len(c.scrobblers))