|
36 | 36 | import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSubscriptionExtractor; |
37 | 37 | import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSuggestionExtractor; |
38 | 38 | import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeTrendingExtractor; |
| 39 | +import org.schabi.newpipe.extractor.services.youtube.extractors.kiosk.YoutubeLiveExtractor; |
39 | 40 | import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeChannelLinkHandlerFactory; |
40 | 41 | import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeChannelTabLinkHandlerFactory; |
41 | 42 | import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeCommentsLinkHandlerFactory; |
| 43 | +import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeLiveLinkHandlerFactory; |
42 | 44 | import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubePlaylistLinkHandlerFactory; |
43 | 45 | import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeSearchQueryHandlerFactory; |
44 | 46 | import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeStreamLinkHandlerFactory; |
@@ -154,17 +156,26 @@ public SuggestionExtractor getSuggestionExtractor() { |
154 | 156 | @Override |
155 | 157 | public KioskList getKioskList() throws ExtractionException { |
156 | 158 | final KioskList list = new KioskList(this); |
157 | | - final ListLinkHandlerFactory h = YoutubeTrendingLinkHandlerFactory.getInstance(); |
| 159 | + final ListLinkHandlerFactory trendingLHF = YoutubeTrendingLinkHandlerFactory.getInstance(); |
| 160 | + final ListLinkHandlerFactory runningLivesLHF = |
| 161 | + YoutubeLiveLinkHandlerFactory.INSTANCE; |
158 | 162 |
|
159 | | - // add kiosks here e.g.: |
160 | 163 | try { |
| 164 | + list.addKioskEntry( |
| 165 | + (streamingService, url, id) -> new YoutubeLiveExtractor( |
| 166 | + YoutubeService.this, |
| 167 | + runningLivesLHF.fromUrl(url), |
| 168 | + id), |
| 169 | + runningLivesLHF, |
| 170 | + YoutubeLiveLinkHandlerFactory.KIOSK_ID |
| 171 | + ); |
161 | 172 | list.addKioskEntry( |
162 | 173 | (streamingService, url, id) -> new YoutubeTrendingExtractor( |
163 | 174 | YoutubeService.this, |
164 | | - h.fromUrl(url), |
| 175 | + trendingLHF.fromUrl(url), |
165 | 176 | id |
166 | 177 | ), |
167 | | - h, |
| 178 | + trendingLHF, |
168 | 179 | YoutubeTrendingExtractor.KIOSK_ID |
169 | 180 | ); |
170 | 181 | list.setDefaultKiosk(YoutubeTrendingExtractor.KIOSK_ID); |
|
0 commit comments