Skip to content

Commit bfaad1d

Browse files
committed
Add support for Podcasting 2.0 GUID tag.
1 parent e0d03bc commit bfaad1d

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.2
2+
3+
- Add support for Podcasting 2.0 GUID tag.
4+
15
## 0.6.1
26

37
- Publication date is now optional.

lib/src/model/podcast.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ import 'package:podcast_search/src/utils/utils.dart';
2121
/// This class represents a podcast and its episodes. The Podcast is instantiated with a feed URL which is
2222
/// then parsed and the episode list generated.
2323
class Podcast {
24+
/// The Podcasting 2.0 GUID value (optional).
25+
/// https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid
26+
final String? guid;
27+
2428
/// The URL of the podcast. Contained within the enclosure RSS tag.
2529
final String? url;
2630

@@ -53,6 +57,7 @@ class Podcast {
5357
final List<Episode> episodes;
5458

5559
Podcast._({
60+
this.guid,
5661
this.url,
5762
this.link,
5863
this.title,
@@ -161,6 +166,8 @@ class Podcast {
161166
var funding = <Funding>[];
162167
var persons = <Person>[];
163168

169+
var guid = rssFeed.podcastIndex?.guid;
170+
164171
if (rssFeed.podcastIndex != null) {
165172
if (rssFeed.podcastIndex!.funding != null) {
166173
for (var f in rssFeed.podcastIndex!.funding!) {
@@ -186,6 +193,7 @@ class Podcast {
186193
_loadEpisodes(rssFeed, episodes);
187194

188195
return Podcast._(
196+
guid: guid,
189197
url: url,
190198
link: rssFeed.link,
191199
title: rssFeed.title,

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: podcast_search
22
description: A library for searching for podcasts, parsing podcast RSS feeds and obtaining episodes details. Supports searching via iTunes and PodcastIndex (preview).
33

4-
version: 0.6.1
4+
version: 0.6.2
55
homepage: https://github.com/amugofjava/podcast_search
66

77
environment:
@@ -12,7 +12,7 @@ dependencies:
1212
convert: ^3.0.1
1313
crypto: ^3.0.1
1414
dio: ^5.2.1+1
15-
rss_dart: ^1.0.3
15+
rss_dart: ^1.0.4
1616
meta: ^1.8.0
1717

1818
dev_dependencies:

0 commit comments

Comments
 (0)