mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-28 07:50:34 +05:30
set default kiosk for youtube
This commit is contained in:
parent
78d461ed89
commit
b37b24511f
@ -30,11 +30,15 @@ import java.io.IOException;
|
|||||||
public class KioskInfo extends ListInfo {
|
public class KioskInfo extends ListInfo {
|
||||||
public String type;
|
public String type;
|
||||||
|
|
||||||
public static ListExtractor.NextItemsResult getMoreItems(ServiceList serviceItem, String url, String nextStreamsUrl) throws IOException, ExtractionException {
|
public static ListExtractor.NextItemsResult getMoreItems(ServiceList serviceItem,
|
||||||
|
String url,
|
||||||
|
String nextStreamsUrl) throws IOException, ExtractionException {
|
||||||
return getMoreItems(serviceItem.getService(), url, nextStreamsUrl);
|
return getMoreItems(serviceItem.getService(), url, nextStreamsUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ListExtractor.NextItemsResult getMoreItems(StreamingService service, String url, String nextStreamsUrl) throws IOException, ExtractionException {
|
public static ListExtractor.NextItemsResult getMoreItems(StreamingService service,
|
||||||
|
String url,
|
||||||
|
String nextStreamsUrl) throws IOException, ExtractionException {
|
||||||
KioskList kl = service.getKioskList();
|
KioskList kl = service.getKioskList();
|
||||||
KioskExtractor extractor = kl.getExtryctorByUrl(url, nextStreamsUrl);
|
KioskExtractor extractor = kl.getExtryctorByUrl(url, nextStreamsUrl);
|
||||||
return extractor.getNextStreams();
|
return extractor.getNextStreams();
|
||||||
|
@ -67,6 +67,10 @@ public class KioskList {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDefaultKioskType() {
|
||||||
|
return defaultKiosk;
|
||||||
|
}
|
||||||
|
|
||||||
public KioskExtractor getExtractorByType(String kioskType, String nextStreamsUrl)
|
public KioskExtractor getExtractorByType(String kioskType, String nextStreamsUrl)
|
||||||
throws ExtractionException, IOException {
|
throws ExtractionException, IOException {
|
||||||
KioskEntry ke = kioskList.get(kioskType);
|
KioskEntry ke = kioskList.get(kioskType);
|
||||||
|
@ -95,6 +95,7 @@ public class YoutubeService extends StreamingService {
|
|||||||
return new YoutubeTrendingExtractor(YoutubeService.this, url, nextStreamUrl);
|
return new YoutubeTrendingExtractor(YoutubeService.this, url, nextStreamUrl);
|
||||||
}
|
}
|
||||||
}, new YoutubeTrendingUrlIdHandler());
|
}, new YoutubeTrendingUrlIdHandler());
|
||||||
|
list.setDefaultKiosk("Trending");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ExtractionException(e);
|
throw new ExtractionException(e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user