Load embedded chapters from local files

This commit is contained in:
Martin Fietz 2016-02-15 15:42:30 +01:00
parent bd3152b737
commit bc0d80759c
1 changed files with 7 additions and 4 deletions

View File

@ -386,11 +386,14 @@ public class FeedMedia extends FeedFile implements Playable {
// check if chapters are stored in db and not loaded yet.
if (item != null && item.hasChapters() && item.getChapters() == null) {
DBReader.loadChaptersOfFeedItem(item);
} else if (item != null && item.getChapters() == null && !localFileAvailable()) {
} else if (item != null && item.getChapters() == null) {
if(localFileAvailable()) {
ChapterUtils.loadChaptersFromFileUrl(this);
} else {
ChapterUtils.loadChaptersFromStreamUrl(this);
}
if (getChapters() != null && item != null) {
DBWriter.setFeedItem(
item);
DBWriter.setFeedItem(item);
}
}
}