Support for podcast 2.0 chapters (#5630)

This commit is contained in:
Tony Tam
2022-03-06 07:09:09 -08:00
committed by GitHub
parent dad4e405d4
commit 1a1bf02e8a
8 changed files with 103 additions and 8 deletions

View File

@ -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() {