diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/search/SearchInfo.java b/extractor/src/main/java/org/schabi/newpipe/extractor/search/SearchInfo.java index 95724112..71f8bc37 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/search/SearchInfo.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/search/SearchInfo.java @@ -23,7 +23,7 @@ public class SearchInfo extends ListInfo { } - public static SearchInfo getInfo(SearchExtractor extractor) { + public static SearchInfo getInfo(SearchExtractor extractor) throws ExtractionException, IOException { final SearchInfo info = new SearchInfo( extractor.getServiceId(), extractor.getUIHandler(), @@ -35,6 +35,9 @@ public class SearchInfo extends ListInfo { info.addError(e); } + info.setRelatedItems(extractor.getInfoItemSearchCollector().getItems()); + info.setNextPageUrl(extractor.getNextPageUrl()); + return info; } diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractorTest.java index 7d8ebfae..ff57344c 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractorTest.java @@ -153,22 +153,22 @@ public class YoutubePlaylistExtractorTest { @Test public void testName() throws Exception { String name = extractor.getName(); - assertTrue(name, name.contains("Important videos")); + assertTrue(name, name.contains("Korrekte Aussprache - Lektion 1")); } @Test public void testId() throws Exception { - assertEquals("PLOy0j9AvlVZPto6IkjKfpu0Scx--7PGTC", extractor.getId()); + assertEquals("PL45xb3ujEhqUexNt53jb9WT2mS-uUaUrn", extractor.getId()); } @Test public void testUrl() throws ParsingException { - assertEquals("https://www.youtube.com/playlist?list=PLOy0j9AvlVZPto6IkjKfpu0Scx--7PGTC", extractor.getUrl()); + assertEquals("https://www.youtube.com/playlist?list=PL45xb3ujEhqUexNt53jb9WT2mS-uUaUrn", extractor.getUrl()); } @Test public void testOriginalUrl() throws ParsingException { - assertEquals("https://www.youtube.com/playlist?list=PLOy0j9AvlVZPto6IkjKfpu0Scx--7PGTC", extractor.getOriginalUrl()); + assertEquals("https://www.youtube.com/watch?v=lH1caqoAGe0&list=PL45xb3ujEhqUexNt53jb9WT2mS-uUaUrn", extractor.getOriginalUrl()); } /*////////////////////////////////////////////////////////////////////////// @@ -216,7 +216,7 @@ public class YoutubePlaylistExtractorTest { @Test public void testUploaderName() throws Exception { - assertEquals("Crazy Horse", extractor.getUploaderName()); + assertEquals("Luksan Wunder", extractor.getUploaderName()); } @Test