diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b25a82..2d85e71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.2 + +- Add support for Podcasting 2.0 GUID tag. + ## 0.6.1 - Publication date is now optional. diff --git a/lib/src/model/podcast.dart b/lib/src/model/podcast.dart index a5bf361..1f554ea 100644 --- a/lib/src/model/podcast.dart +++ b/lib/src/model/podcast.dart @@ -21,6 +21,10 @@ import 'package:podcast_search/src/utils/utils.dart'; /// This class represents a podcast and its episodes. The Podcast is instantiated with a feed URL which is /// then parsed and the episode list generated. class Podcast { + /// The Podcasting 2.0 GUID value (optional). + /// https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid + final String? guid; + /// The URL of the podcast. Contained within the enclosure RSS tag. final String? url; @@ -53,6 +57,7 @@ class Podcast { final List episodes; Podcast._({ + this.guid, this.url, this.link, this.title, @@ -161,6 +166,8 @@ class Podcast { var funding = []; var persons = []; + var guid = rssFeed.podcastIndex?.guid; + if (rssFeed.podcastIndex != null) { if (rssFeed.podcastIndex!.funding != null) { for (var f in rssFeed.podcastIndex!.funding!) { @@ -186,6 +193,7 @@ class Podcast { _loadEpisodes(rssFeed, episodes); return Podcast._( + guid: guid, url: url, link: rssFeed.link, title: rssFeed.title, diff --git a/pubspec.yaml b/pubspec.yaml index d16a5bc..de3e082 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: podcast_search description: A library for searching for podcasts, parsing podcast RSS feeds and obtaining episodes details. Supports searching via iTunes and PodcastIndex (preview). -version: 0.6.1 +version: 0.6.2 homepage: https://github.com/amugofjava/podcast_search environment: @@ -12,7 +12,7 @@ dependencies: convert: ^3.0.1 crypto: ^3.0.1 dio: ^5.2.1+1 - rss_dart: ^1.0.3 + rss_dart: ^1.0.4 meta: ^1.8.0 dev_dependencies: