feat(subsonic): add support for podcast episodes in both playlists and play queues

This commit is contained in:
Brian Doherty
2022-11-11 11:29:27 -06:00
committed by sentriz
parent ae5bc2e149
commit aecee3d2d8
6 changed files with 184 additions and 69 deletions

View File

@@ -95,6 +95,24 @@ func NewTCTrackByFolder(t *db.Track, parent *db.Album) *TrackChild {
return trCh
}
func NewTCPodcastEpisode(pe *db.PodcastEpisode, parent *db.Podcast) *TrackChild {
trCh := &TrackChild{
ID: pe.SID(),
ContentType: pe.MIME(),
Suffix: pe.Ext(),
Size: pe.Size,
Title: pe.Title,
Path: pe.Path,
ParentID: parent.SID(),
Duration: pe.Length,
Bitrate: pe.Bitrate,
IsDir: false,
Type: "podcastepisode",
CreatedAt: pe.CreatedAt,
}
return trCh
}
func NewArtistByFolder(f *db.Album) *Artist {
// the db is structued around "browse by tags", and where
// an album is also a folder. so we're constructing an artist