don't scrobble podcast episodes
This commit is contained in:
@@ -88,15 +88,15 @@ func (c *Controller) ServeScrobble(r *http.Request) *spec.Response {
|
|||||||
return spec.NewError(0, "error finding podcast episode: %v", err)
|
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 {
|
if err := scrobbleStatsUpdatePodcastEpisode(c.dbc, id.Value); err != nil {
|
||||||
return spec.NewError(0, "error updating stats: %v", err)
|
return spec.NewError(0, "error updating stats: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if scrobbleTrack.Track == "" {
|
||||||
|
return spec.NewResponse()
|
||||||
|
}
|
||||||
|
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
|
|
||||||
scrobbleErrs := make([]error, len(c.scrobblers))
|
scrobbleErrs := make([]error, len(c.scrobblers))
|
||||||
|
|||||||
Reference in New Issue
Block a user