add support for subsonic podcast api

This commit is contained in:
Alex McGrath
2021-02-03 20:38:01 +00:00
committed by Senan Kelly
parent ce96b9f6fa
commit 9c4286b0e2
21 changed files with 2011 additions and 1000 deletions

View File

@@ -20,10 +20,12 @@ var (
type IDT string
const (
Artist IDT = "ar"
Album IDT = "al"
Track IDT = "tr"
separator = "-"
Artist IDT = "ar"
Album IDT = "al"
Track IDT = "tr"
Podcast IDT = "pd"
PodcastEpisode IDT = "pe"
separator = "-"
)
type ID struct {
@@ -49,6 +51,10 @@ func New(in string) (ID, error) {
return ID{Type: Album, Value: val}, nil
case Track:
return ID{Type: Track, Value: val}, nil
case Podcast:
return ID{Type: Podcast, Value: val}, nil
case PodcastEpisode:
return ID{Type: PodcastEpisode, Value: val}, nil
default:
return ID{}, fmt.Errorf("%q: %w", partType, ErrBadPrefix)
}