feat(subsonic): gracefully handle missing podcast episode paths when returning playlists
fixes #345 * fix return playlist if file not found and do not add to playlist not downloaded podcast --------- Co-authored-by: sentriz <senan@senan.xyz>
This commit is contained in:
@@ -27,7 +27,7 @@ func Locate(dbc *db.DB, podcastsPath string, id specid.ID) (Result, error) {
|
||||
}
|
||||
case specid.PodcastEpisode:
|
||||
var pe db.PodcastEpisode
|
||||
if err := dbc.Where("id=?", id.Value).Find(&pe).Error; err == nil {
|
||||
if err := dbc.Where("id=? AND status=?", id.Value, db.PodcastEpisodeStatusCompleted).Find(&pe).Error; err == nil {
|
||||
pe.AbsP = filepath.Join(podcastsPath, pe.Path)
|
||||
return &pe, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user