mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-28 16:00:33 +05:30
Make Kiosk IDs accessible if possible
This commit is contained in:
parent
fe27d6a0ec
commit
340095515d
@ -101,7 +101,7 @@ public class MediaCCCService extends StreamingService {
|
|||||||
kioskId
|
kioskId
|
||||||
),
|
),
|
||||||
new MediaCCCConferencesListLinkHandlerFactory(),
|
new MediaCCCConferencesListLinkHandlerFactory(),
|
||||||
"conferences"
|
MediaCCCConferenceKiosk.KIOSK_ID
|
||||||
);
|
);
|
||||||
|
|
||||||
list.addKioskEntry(
|
list.addKioskEntry(
|
||||||
@ -111,7 +111,7 @@ public class MediaCCCService extends StreamingService {
|
|||||||
kioskId
|
kioskId
|
||||||
),
|
),
|
||||||
new MediaCCCRecentListLinkHandlerFactory(),
|
new MediaCCCRecentListLinkHandlerFactory(),
|
||||||
"recent"
|
MediaCCCRecentKiosk.KIOSK_ID
|
||||||
);
|
);
|
||||||
|
|
||||||
list.addKioskEntry(
|
list.addKioskEntry(
|
||||||
@ -121,10 +121,10 @@ public class MediaCCCService extends StreamingService {
|
|||||||
kioskId
|
kioskId
|
||||||
),
|
),
|
||||||
new MediaCCCLiveListLinkHandlerFactory(),
|
new MediaCCCLiveListLinkHandlerFactory(),
|
||||||
"live"
|
MediaCCCLiveStreamKiosk.KIOSK_ID
|
||||||
);
|
);
|
||||||
|
|
||||||
list.setDefaultKiosk("recent");
|
list.setDefaultKiosk(MediaCCCRecentKiosk.KIOSK_ID);
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
throw new ExtractionException(e);
|
throw new ExtractionException(e);
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,8 @@ import java.io.IOException;
|
|||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
public class MediaCCCConferenceKiosk extends KioskExtractor<ChannelInfoItem> {
|
public class MediaCCCConferenceKiosk extends KioskExtractor<ChannelInfoItem> {
|
||||||
|
|
||||||
|
public static final String KIOSK_ID = "conferences";
|
||||||
private JsonObject doc;
|
private JsonObject doc;
|
||||||
|
|
||||||
public MediaCCCConferenceKiosk(final StreamingService streamingService,
|
public MediaCCCConferenceKiosk(final StreamingService streamingService,
|
||||||
|
@ -16,6 +16,8 @@ import javax.annotation.Nonnull;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class MediaCCCLiveStreamKiosk extends KioskExtractor<StreamInfoItem> {
|
public class MediaCCCLiveStreamKiosk extends KioskExtractor<StreamInfoItem> {
|
||||||
|
|
||||||
|
public static final String KIOSK_ID = "live";
|
||||||
private JsonArray doc;
|
private JsonArray doc;
|
||||||
|
|
||||||
public MediaCCCLiveStreamKiosk(final StreamingService streamingService,
|
public MediaCCCLiveStreamKiosk(final StreamingService streamingService,
|
||||||
@ -62,6 +64,6 @@ public class MediaCCCLiveStreamKiosk extends KioskExtractor<StreamInfoItem> {
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public String getName() throws ParsingException {
|
public String getName() throws ParsingException {
|
||||||
return "live";
|
return KIOSK_ID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,8 @@ import javax.annotation.Nonnull;
|
|||||||
|
|
||||||
public class MediaCCCRecentKiosk extends KioskExtractor<StreamInfoItem> {
|
public class MediaCCCRecentKiosk extends KioskExtractor<StreamInfoItem> {
|
||||||
|
|
||||||
|
public static final String KIOSK_ID = "recent";
|
||||||
|
|
||||||
private JsonObject doc;
|
private JsonObject doc;
|
||||||
|
|
||||||
public MediaCCCRecentKiosk(final StreamingService streamingService,
|
public MediaCCCRecentKiosk(final StreamingService streamingService,
|
||||||
@ -77,6 +79,6 @@ public class MediaCCCRecentKiosk extends KioskExtractor<StreamInfoItem> {
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public String getName() throws ParsingException {
|
public String getName() throws ParsingException {
|
||||||
return "recent";
|
return KIOSK_ID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,9 +146,9 @@ public class YoutubeService extends StreamingService {
|
|||||||
id
|
id
|
||||||
),
|
),
|
||||||
new YoutubeTrendingLinkHandlerFactory(),
|
new YoutubeTrendingLinkHandlerFactory(),
|
||||||
"Trending"
|
YoutubeTrendingExtractor.KIOSK_ID
|
||||||
);
|
);
|
||||||
list.setDefaultKiosk("Trending");
|
list.setDefaultKiosk(YoutubeTrendingExtractor.KIOSK_ID);
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
throw new ExtractionException(e);
|
throw new ExtractionException(e);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,9 @@ import java.util.stream.Stream;
|
|||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
public class YoutubeTrendingExtractor extends KioskExtractor<StreamInfoItem> {
|
public class YoutubeTrendingExtractor extends KioskExtractor<StreamInfoItem> {
|
||||||
|
|
||||||
|
public static final String KIOSK_ID = "Trending";
|
||||||
|
|
||||||
private JsonObject initialData;
|
private JsonObject initialData;
|
||||||
|
|
||||||
private static final String VIDEOS_TAB_PARAMS = "4gIOGgxtb3N0X3BvcHVsYXI%3D";
|
private static final String VIDEOS_TAB_PARAMS = "4gIOGgxtb3N0X3BvcHVsYXI%3D";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user