After downloading, check downloaded episode for chapters

This commit is contained in:
Martin Fietz 2016-02-15 16:01:21 +01:00
parent bc0d80759c
commit d6498ae50d
1 changed files with 4 additions and 0 deletions

View File

@ -72,6 +72,7 @@ import de.danoeh.antennapod.core.storage.DownloadRequester;
import de.danoeh.antennapod.core.syndication.handler.FeedHandler; import de.danoeh.antennapod.core.syndication.handler.FeedHandler;
import de.danoeh.antennapod.core.syndication.handler.FeedHandlerResult; import de.danoeh.antennapod.core.syndication.handler.FeedHandlerResult;
import de.danoeh.antennapod.core.syndication.handler.UnsupportedFeedtypeException; import de.danoeh.antennapod.core.syndication.handler.UnsupportedFeedtypeException;
import de.danoeh.antennapod.core.util.ChapterUtils;
import de.danoeh.antennapod.core.util.DownloadError; import de.danoeh.antennapod.core.util.DownloadError;
import de.danoeh.antennapod.core.util.InvalidFeedException; import de.danoeh.antennapod.core.util.InvalidFeedException;
import de.greenrobot.event.EventBus; import de.greenrobot.event.EventBus;
@ -1046,6 +1047,9 @@ public class DownloadService extends Service {
media.setFile_url(request.getDestination()); media.setFile_url(request.getDestination());
media.setHasEmbeddedPicture(null); media.setHasEmbeddedPicture(null);
// check if file has chapters
ChapterUtils.loadChaptersFromFileUrl(media);
// Get duration // Get duration
MediaMetadataRetriever mmr = null; MediaMetadataRetriever mmr = null;
try { try {