add getInfo without need for search extractor to searchinfo
This commit is contained in:
parent
35b46900c1
commit
53f0bc9d8d
1 changed files with 7 additions and 0 deletions
|
@ -5,6 +5,7 @@ import org.schabi.newpipe.extractor.ListExtractor;
|
|||
import org.schabi.newpipe.extractor.ListInfo;
|
||||
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 java.io.IOException;
|
||||
|
@ -23,6 +24,12 @@ public class SearchInfo extends ListInfo<InfoItem> {
|
|||
}
|
||||
|
||||
|
||||
public static SearchInfo getInfo(StreamingService service, SearchQIHandler searchQuery, String contentCountry) throws ExtractionException, IOException {
|
||||
SearchExtractor extractor = service.getSearchExtractor(searchQuery, contentCountry);
|
||||
extractor.fetchPage();
|
||||
return getInfo(extractor);
|
||||
}
|
||||
|
||||
public static SearchInfo getInfo(SearchExtractor extractor) throws ExtractionException, IOException {
|
||||
final SearchInfo info = new SearchInfo(
|
||||
extractor.getServiceId(),
|
||||
|
|
Loading…
Reference in a new issue