diff --git a/namespace_podcast.go b/namespace_podcast.go index 72ad4e9..013f847 100644 --- a/namespace_podcast.go +++ b/namespace_podcast.go @@ -265,6 +265,18 @@ var ( PodcastMediumAudioBook PodcastMedium = "audiobook" PodcastMediumNewsletter PodcastMedium = "newsletter" PodcastMediumBlog PodcastMedium = "blog" + + PodcastMediumPublisher PodcastMedium = "publisher" + + PodcastMediumPodcastList PodcastMedium = "podcastL" + PodcastMediumMusicList PodcastMedium = "musicL" + PodcastMediumVideoList PodcastMedium = "videoL" + PodcastMediumFilmList PodcastMedium = "filmL" + PodcastMediumAudioBookList PodcastMedium = "audiobookL" + PodcastMediumNewsletterList PodcastMedium = "newsletterL" + PodcastMediumBlogList PodcastMedium = "blogL" + PodcastMediumPublisherList PodcastMedium = "publisherL" + PodcastMediumMixedList PodcastMedium = "mixed" ) // PodcastTXT is intended for free-form text and is modeled after the DNS "TXT" @@ -291,6 +303,14 @@ type PodcastPodping struct { UsesPodping *bool `xml:"usesPodping,attr"` } +// PodcastPublisher allows a podcast feed to link to it's "publisher feed" parent. +// Read more at +// https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#publisher +type PodcastPublisher struct { + XMLName xml.Name `xml:"podcast:publisher"` + RemoteItems []PodcastRemoteItem +} + // PodcastAlternateEnclosure provides different versions of, or companion media to the main `` file. // Read more at // https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#alternate-enclosure diff --git a/types.go b/types.go index 55d1ec5..765d2f4 100644 --- a/types.go +++ b/types.go @@ -75,6 +75,7 @@ type Channel struct { PodcastMedium *PodcastMedium `xml:"podcast:medium"` PodcastPersons []PodcastPerson PodcastPodping *PodcastPodping + PodcastPublisher *PodcastPublisher PodcastRemoteItems []PodcastRemoteItem PodcastSingleItem *PodcastSingleItem PodcastTXTs []PodcastTXT diff --git a/types_test.go b/types_test.go index 4bd2c2b..1e2b8a1 100644 --- a/types_test.go +++ b/types_test.go @@ -71,6 +71,15 @@ func TestMarshal(t *testing.T) { Caption: "Support “Bookworm Podcast”", }, }, + PodcastPublisher: &types.PodcastPublisher{ + RemoteItems: []types.PodcastRemoteItem{ + { + FeedGUID: uuid.MustParse("003af0a0-6a45-55cf-b765-68e3d349551a"), + FeedURL: pointer("https://agilesetmedia.com/assets/static/feeds/publisher.xml"), + Medium: pointer(types.PodcastMediumPublisher), + }, + }, + }, PodcastSingleItem: &types.PodcastSingleItem{ Value: false, }, @@ -436,6 +445,9 @@ func TestMarshal(t *testing.T) { podcast John Smith + + + false naj3eEZaWVVY9a38uhX8FekACyhtqP4JN S6lpp-7ZCn8-dZfGc-OoyaG