don't scrobble podcast episodes

This commit is contained in:
sentriz
2023-10-25 10:42:23 +01:00
parent c947404923
commit 48eadd05e3

View File

@@ -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))