Skip to content

Commit 8cc0114

Browse files
committed
Add support for Podcasting 2.0 GUID tag. Update http library to 1.1.0 Dart 3 version.
1 parent e98fa56 commit 8cc0114

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
# 1.0.4
4+
5+
* Add support for Podcasting 2.0 GUID tag.
6+
* Update http library to 1.1.0 release.
7+
38
# 1.0.3
49

510
* Add support for Podcasting 2.0 Person tag.

lib/domain/podcast_index/rss_podcast_index.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ import 'package:rss_dart/util/helpers.dart';
55
import 'package:xml/xml.dart';
66

77
class RssPodcastIndex {
8+
final String? guid;
89
final List<RssPodcastIndexFunding?>? funding;
910
final List<RssPodcastIndexPerson?>? persons;
1011
final RssPodcastIndexLocked? locked;
1112

1213
RssPodcastIndex({
14+
this.guid,
1315
this.funding,
1416
this.persons,
1517
this.locked,
@@ -21,6 +23,7 @@ class RssPodcastIndex {
2123
}
2224

2325
return RssPodcastIndex(
26+
guid: findElementOrNull(element, 'podcast:guid')?.innerText,
2427
funding: element.findElements('podcast:funding').map((e) {
2528
return RssPodcastIndexFunding.parse(e);
2629
}).toList(),

pubspec.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name: rss_dart
2-
version: 1.0.3
2+
version: 1.0.4
33
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).
4-
homepage: https://github.com/sudame/dart-rss
4+
homepage: https://github.com/ubuntu-flutter-community/rss.dart
5+
56
environment:
67
sdk: ">=3.0.0 <4.0.0"
78
dependencies:
89
xml: ^6.3.0
9-
http: ^0.13.0
10+
http: ^1.1.0
1011
intl: ^0.18.0
1112

1213
dev_dependencies:

test/rss_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void main() {
9797

9898
expect(
9999
feed.items.first.content!.value,
100-
'<img width=\"1000\" height=\"690\" src=\"https://test.com/image_link\"/> Test content<br />',
100+
'<img alt="unit test image" width=\"1000\" height=\"690\" src=\"https://test.com/image_link\"/> Test content<br />',
101101
);
102102
expect(
103103
feed.items.first.content!.images.first,
@@ -421,6 +421,7 @@ void main() {
421421
expect(feed.generator, 'Freedom Controller');
422422
expect(feed.webMaster, 'support@example.com (Tech Support)');
423423

424+
expect(feed.podcastIndex!.guid, '20a14457-0993-49b8-a37a-18384e7f91f8');
424425
expect(feed.podcastIndex!.locked!.locked, true);
425426
expect(feed.podcastIndex!.locked!.owner, 'podcastowner@example.com');
426427
expect(feed.podcastIndex!.funding![0]!.url, 'https://example.com/donate');

test/xml/RSS-PodcastIndex-R1.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<link>https://example.com/show</link>
1818
</image>
1919

20+
<podcast:guid>20a14457-0993-49b8-a37a-18384e7f91f8</podcast:guid>
2021
<podcast:locked owner="podcastowner@example.com">yes</podcast:locked>
2122
<podcast:funding url="https://example.com/donate">Support the show!</podcast:funding>
2223
<podcast:funding url="https://example.com/member">Become a member!</podcast:funding>

test/xml/RSS.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<author>alice@foo.bar.news</author>
4848
<source url="https://foo.bar.news/1?source">Foo Bar</source>
4949
<comments>https://foo.bar.news/1/comments</comments>
50-
<content:encoded><![CDATA[<img width="1000" height="690" src="https://test.com/image_link"/> Test content<br />]]></content:encoded>
50+
<content:encoded><![CDATA[<img alt="unit test image" width="1000" height="690" src="https://test.com/image_link"/> Test content<br />]]></content:encoded>
5151
<enclosure url="http://www.scripting.com/mp3s/weatherReportSuite.mp3" length="12216320" type="audio/mpeg" />
5252
</item>
5353
<item>

0 commit comments

Comments
 (0)