Skip to content

Commit

Permalink
fix next video problem
Browse files Browse the repository at this point in the history
  • Loading branch information
theScrabi committed Apr 11, 2017
1 parent 6ab3dc8 commit b587d17
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions stream_info/StreamInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -239,18 +239,14 @@ private static StreamInfo extractOptionalData(
streamInfo.addException(e);
}
try {
// get next video
if(streamInfo.next_video != null)
{
StreamInfoItemCollector c = new StreamInfoItemCollector(
extractor.getUrlIdHandler(), extractor.getServiceId());
StreamInfoItemExtractor nextVideo = extractor.getNextVideo();
c.commit(nextVideo);
if(c.getItemList().size() != 0) {
streamInfo.next_video = (StreamInfoItem) c.getItemList().get(0);
}
streamInfo.errors.addAll(c.getErrors());
StreamInfoItemCollector c = new StreamInfoItemCollector(
extractor.getUrlIdHandler(), extractor.getServiceId());
StreamInfoItemExtractor nextVideo = extractor.getNextVideo();
c.commit(nextVideo);
if(c.getItemList().size() != 0) {
streamInfo.next_video = (StreamInfoItem) c.getItemList().get(0);
}
streamInfo.errors.addAll(c.getErrors());
}
catch(Exception e) {
streamInfo.addException(e);
Expand Down

0 comments on commit b587d17

Please sign in to comment.