use of de.danoeh.antennapod.parser.media.vorbis.VorbisCommentChapterReader in project AntennaPod by AntennaPod.
the class ChapterUtils method readOggChaptersFromInputStream.
@NonNull
private static List<Chapter> readOggChaptersFromInputStream(InputStream input) throws VorbisCommentReaderException {
VorbisCommentChapterReader reader = new VorbisCommentChapterReader();
reader.readInputStream(input);
List<Chapter> chapters = reader.getChapters();
if (chapters == null) {
return Collections.emptyList();
}
Collections.sort(chapters, new ChapterStartTimeComparator());
enumerateEmptyChapterTitles(chapters);
if (chaptersValid(chapters)) {
return chapters;
}
return Collections.emptyList();
}
Aggregations