Skip to content

Commit b37b245

Browse files
committed
set default kiosk for youtube
1 parent 78d461e commit b37b245

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/main/java/org/schabi/newpipe/extractor/kiosk/KioskInfo.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@
3030
public class KioskInfo extends ListInfo {
3131
public String type;
3232

33-
public static ListExtractor.NextItemsResult getMoreItems(ServiceList serviceItem, String url, String nextStreamsUrl) throws IOException, ExtractionException {
33+
public static ListExtractor.NextItemsResult getMoreItems(ServiceList serviceItem,
34+
String url,
35+
String nextStreamsUrl) throws IOException, ExtractionException {
3436
return getMoreItems(serviceItem.getService(), url, nextStreamsUrl);
3537
}
3638

37-
public static ListExtractor.NextItemsResult getMoreItems(StreamingService service, String url, String nextStreamsUrl) throws IOException, ExtractionException {
39+
public static ListExtractor.NextItemsResult getMoreItems(StreamingService service,
40+
String url,
41+
String nextStreamsUrl) throws IOException, ExtractionException {
3842
KioskList kl = service.getKioskList();
3943
KioskExtractor extractor = kl.getExtryctorByUrl(url, nextStreamsUrl);
4044
return extractor.getNextStreams();

src/main/java/org/schabi/newpipe/extractor/kiosk/KioskList.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ public KioskExtractor getDefaultKioskExtractor(String nextStreamUrl)
6767
}
6868
}
6969

70+
public String getDefaultKioskType() {
71+
return defaultKiosk;
72+
}
73+
7074
public KioskExtractor getExtractorByType(String kioskType, String nextStreamsUrl)
7175
throws ExtractionException, IOException {
7276
KioskEntry ke = kioskList.get(kioskType);

src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public KioskExtractor createNewKiosk(StreamingService streamingService, String u
9595
return new YoutubeTrendingExtractor(YoutubeService.this, url, nextStreamUrl);
9696
}
9797
}, new YoutubeTrendingUrlIdHandler());
98+
list.setDefaultKiosk("Trending");
9899
} catch (Exception e) {
99100
throw new ExtractionException(e);
100101
}

0 commit comments

Comments
 (0)