Skip to content

Commit

Permalink
не показывать потоки с url null
Browse files Browse the repository at this point in the history
  • Loading branch information
sadr0b0t committed Feb 28, 2023
1 parent 954e22b commit 7e676be
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,17 @@ public static StreamHelper.StreamSources fetchOnlineStreams(final VideoItem vide
try {
StreamHelper.StreamSources onlineStreamSources = ContentLoader.getInstance().extractStreams(videoItem.getItemUrl());

allVideoStreams.addAll(onlineStreamSources.getVideoStreams());
allAudioStreams.addAll(onlineStreamSources.getAudioStreams());
// не добавлять потоки с url null
for (final StreamInfo stream : onlineStreamSources.getVideoStreams()) {
if (stream.getUrl() != null) {
allVideoStreams.add(stream);
}
}
for (final StreamInfo stream : onlineStreamSources.getAudioStreams()) {
if (stream.getUrl() != null) {
allAudioStreams.add(stream);
}
}
} catch (ExtractionException | IOException e) {
problems.add(e);
}
Expand Down

0 comments on commit 7e676be

Please # to comment.