Load embedded chapters from local files
This commit is contained in:
parent
bd3152b737
commit
bc0d80759c
|
@ -386,11 +386,14 @@ public class FeedMedia extends FeedFile implements Playable {
|
||||||
// check if chapters are stored in db and not loaded yet.
|
// check if chapters are stored in db and not loaded yet.
|
||||||
if (item != null && item.hasChapters() && item.getChapters() == null) {
|
if (item != null && item.hasChapters() && item.getChapters() == null) {
|
||||||
DBReader.loadChaptersOfFeedItem(item);
|
DBReader.loadChaptersOfFeedItem(item);
|
||||||
} else if (item != null && item.getChapters() == null && !localFileAvailable()) {
|
} else if (item != null && item.getChapters() == null) {
|
||||||
ChapterUtils.loadChaptersFromStreamUrl(this);
|
if(localFileAvailable()) {
|
||||||
|
ChapterUtils.loadChaptersFromFileUrl(this);
|
||||||
|
} else {
|
||||||
|
ChapterUtils.loadChaptersFromStreamUrl(this);
|
||||||
|
}
|
||||||
if (getChapters() != null && item != null) {
|
if (getChapters() != null && item != null) {
|
||||||
DBWriter.setFeedItem(
|
DBWriter.setFeedItem(item);
|
||||||
item);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue