From 1a1bf02e8a73a3f7a05ced5c850c23fceb2629f0 Mon Sep 17 00:00:00 2001 From: Tony Tam <149837+tonytamsf@users.noreply.github.com> Date: Sun, 6 Mar 2022 07:09:09 -0800 Subject: Support for podcast 2.0 chapters (#5630) --- .../java/de/danoeh/antennapod/model/feed/FeedItem.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'model/src') diff --git a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItem.java b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItem.java index 08f79252a..a8570ea4e 100644 --- a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItem.java +++ b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItem.java @@ -41,6 +41,7 @@ public class FeedItem extends FeedComponent implements Serializable { private transient Feed feed; private long feedId; + private String podcastIndexChapterUrl; private int state; public static final int NEW = -1; @@ -81,7 +82,7 @@ public class FeedItem extends FeedComponent implements Serializable { * */ public FeedItem(long id, String title, String link, Date pubDate, String paymentLink, long feedId, boolean hasChapters, String imageUrl, int state, - String itemIdentifier, long autoDownload) { + String itemIdentifier, long autoDownload, String podcastIndexChapterUrl) { this.id = id; this.title = title; this.link = link; @@ -93,6 +94,7 @@ public class FeedItem extends FeedComponent implements Serializable { this.state = state; this.itemIdentifier = itemIdentifier; this.autoDownload = autoDownload; + this.podcastIndexChapterUrl = podcastIndexChapterUrl; } /** @@ -157,6 +159,9 @@ public class FeedItem extends FeedComponent implements Serializable { chapters = other.chapters; } } + if (other.podcastIndexChapterUrl != null) { + podcastIndexChapterUrl = other.podcastIndexChapterUrl; + } } /** @@ -427,6 +432,14 @@ public class FeedItem extends FeedComponent implements Serializable { tags.remove(tag); } + public String getPodcastIndexChapterUrl() { + return podcastIndexChapterUrl; + } + + public void setPodcastIndexChapterUrl(String url) { + podcastIndexChapterUrl = url; + } + @NonNull @Override public String toString() { -- cgit v1.2.3