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:
Vijay Dubb
2025-03-24 13:43:06 +00:00
committed by GitHub
parent e5f7ef3c86
commit 63a420d2d3
7 changed files with 58 additions and 29 deletions

No files matched your search

+12
View File
@@ -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)