get info from initial page

This commit is contained in:
Christian Schabesberger 2018-07-08 20:49:13 +02:00
parent 53f0bc9d8d
commit a1aaca1bea
1 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.stream.Stream;
import org.schabi.newpipe.extractor.uih.SearchQIHandler;
import org.schabi.newpipe.extractor.utils.ExtractorHelper;
import java.io.IOException;
@ -42,8 +43,9 @@ public class SearchInfo extends ListInfo<InfoItem> {
info.addError(e);
}
info.setRelatedItems(extractor.getInfoItemSearchCollector().getItems());
info.setNextPageUrl(extractor.getNextPageUrl());
ListExtractor.InfoItemsPage<InfoItem> page = ExtractorHelper.getItemsPageOrLogError(info, extractor);
info.setRelatedItems(page.getItems());
info.setNextPageUrl(page.getNextPageUrl());
return info;
}