feat(subsonic): support more podcast metadata and podcast bookmarks (#569)
* Migrate podcast episodes database entries. * Expose album, artist, and image for podcast episodes. * Update bookmarks to show podcast episodes. * Fix lint error. * Remove OriginalImageURL field.
This commit is contained in:
No files matched your search
@@ -48,6 +48,18 @@ func (c *Controller) ServeGetBookmarks(r *http.Request) *spec.Response {
|
||||
return spec.NewError(10, "finding entry: %v", err)
|
||||
}
|
||||
respBookmark.Entry = spec.NewTrackByTags(&track, track.Album)
|
||||
case specid.PodcastEpisode:
|
||||
var podcastEpisode db.PodcastEpisode
|
||||
err := c.dbc.
|
||||
Preload("Podcast").
|
||||
Find(&podcastEpisode, "id=?", bookmark.EntryID).
|
||||
Error
|
||||
if err != nil {
|
||||
return spec.NewError(10, "finding entry: %v", err)
|
||||
}
|
||||
respBookmark.Entry = spec.NewTCPodcastEpisode(&podcastEpisode)
|
||||
default:
|
||||
continue
|
||||
}
|
||||
|
||||
sub.Bookmarks.List = append(sub.Bookmarks.List, respBookmark)
|
||||
|
||||
Reference in New Issue
Block a user