diff --git a/CHANGELOG.md b/CHANGELOG.md index 1296b95..534d6c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +# 1.0.4 + +* Add support for Podcasting 2.0 GUID tag. +* Update http library to 1.1.0 release. + # 1.0.3 * Add support for Podcasting 2.0 Person tag. diff --git a/lib/domain/podcast_index/rss_podcast_index.dart b/lib/domain/podcast_index/rss_podcast_index.dart index 3e2afb4..57d45b3 100644 --- a/lib/domain/podcast_index/rss_podcast_index.dart +++ b/lib/domain/podcast_index/rss_podcast_index.dart @@ -5,11 +5,13 @@ import 'package:rss_dart/util/helpers.dart'; import 'package:xml/xml.dart'; class RssPodcastIndex { + final String? guid; final List? funding; final List? persons; final RssPodcastIndexLocked? locked; RssPodcastIndex({ + this.guid, this.funding, this.persons, this.locked, @@ -21,6 +23,7 @@ class RssPodcastIndex { } return RssPodcastIndex( + guid: findElementOrNull(element, 'podcast:guid')?.innerText, funding: element.findElements('podcast:funding').map((e) { return RssPodcastIndexFunding.parse(e); }).toList(), diff --git a/pubspec.yaml b/pubspec.yaml index 38857c2..c09ac20 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,12 +1,13 @@ name: rss_dart -version: 1.0.3 +version: 1.0.4 description: dart-rss is a rss parser for RSS1.0/RSS2.0/Atom. It also support Dublin-Core, Content, Syndication additional modules. This libary is forked from webfeed(https://github.com/witochandra/webfeed). -homepage: https://github.com/sudame/dart-rss +homepage: https://github.com/ubuntu-flutter-community/rss.dart + environment: sdk: ">=3.0.0 <4.0.0" dependencies: xml: ^6.3.0 - http: ^0.13.0 + http: ^1.1.0 intl: ^0.18.0 dev_dependencies: diff --git a/test/rss_test.dart b/test/rss_test.dart index 58fdeb9..ff955df 100644 --- a/test/rss_test.dart +++ b/test/rss_test.dart @@ -97,7 +97,7 @@ void main() { expect( feed.items.first.content!.value, - ' Test content
', + 'unit test image Test content
', ); expect( feed.items.first.content!.images.first, @@ -421,6 +421,7 @@ void main() { expect(feed.generator, 'Freedom Controller'); expect(feed.webMaster, 'support@example.com (Tech Support)'); + expect(feed.podcastIndex!.guid, '20a14457-0993-49b8-a37a-18384e7f91f8'); expect(feed.podcastIndex!.locked!.locked, true); expect(feed.podcastIndex!.locked!.owner, 'podcastowner@example.com'); expect(feed.podcastIndex!.funding![0]!.url, 'https://example.com/donate'); diff --git a/test/xml/RSS-PodcastIndex-R1.xml b/test/xml/RSS-PodcastIndex-R1.xml index fef40c8..b316ee1 100644 --- a/test/xml/RSS-PodcastIndex-R1.xml +++ b/test/xml/RSS-PodcastIndex-R1.xml @@ -17,6 +17,7 @@ https://example.com/show + 20a14457-0993-49b8-a37a-18384e7f91f8 yes Support the show! Become a member! diff --git a/test/xml/RSS.xml b/test/xml/RSS.xml index 07d80ae..c6a8807 100644 --- a/test/xml/RSS.xml +++ b/test/xml/RSS.xml @@ -47,7 +47,7 @@ alice@foo.bar.news Foo Bar https://foo.bar.news/1/comments - Test content
]]>
+ Test content
]]>