Skip to content

Commit 35b4690

Browse files
committed
add outcomming items of searchextractor to searchinfo
1 parent 4746a1c commit 35b4690

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/search/SearchInfo.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public SearchInfo(int serviceId,
2323
}
2424

2525

26-
public static SearchInfo getInfo(SearchExtractor extractor) {
26+
public static SearchInfo getInfo(SearchExtractor extractor) throws ExtractionException, IOException {
2727
final SearchInfo info = new SearchInfo(
2828
extractor.getServiceId(),
2929
extractor.getUIHandler(),
@@ -35,6 +35,9 @@ public static SearchInfo getInfo(SearchExtractor extractor) {
3535
info.addError(e);
3636
}
3737

38+
info.setRelatedItems(extractor.getInfoItemSearchCollector().getItems());
39+
info.setNextPageUrl(extractor.getNextPageUrl());
40+
3841
return info;
3942
}
4043

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractorTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,22 +153,22 @@ public void testServiceId() {
153153
@Test
154154
public void testName() throws Exception {
155155
String name = extractor.getName();
156-
assertTrue(name, name.contains("Important videos"));
156+
assertTrue(name, name.contains("Korrekte Aussprache - Lektion 1"));
157157
}
158158

159159
@Test
160160
public void testId() throws Exception {
161-
assertEquals("PLOy0j9AvlVZPto6IkjKfpu0Scx--7PGTC", extractor.getId());
161+
assertEquals("PL45xb3ujEhqUexNt53jb9WT2mS-uUaUrn", extractor.getId());
162162
}
163163

164164
@Test
165165
public void testUrl() throws ParsingException {
166-
assertEquals("https://www.youtube.com/playlist?list=PLOy0j9AvlVZPto6IkjKfpu0Scx--7PGTC", extractor.getUrl());
166+
assertEquals("https://www.youtube.com/playlist?list=PL45xb3ujEhqUexNt53jb9WT2mS-uUaUrn", extractor.getUrl());
167167
}
168168

169169
@Test
170170
public void testOriginalUrl() throws ParsingException {
171-
assertEquals("https://www.youtube.com/playlist?list=PLOy0j9AvlVZPto6IkjKfpu0Scx--7PGTC", extractor.getOriginalUrl());
171+
assertEquals("https://www.youtube.com/watch?v=lH1caqoAGe0&list=PL45xb3ujEhqUexNt53jb9WT2mS-uUaUrn", extractor.getOriginalUrl());
172172
}
173173

174174
/*//////////////////////////////////////////////////////////////////////////
@@ -216,7 +216,7 @@ public void testUploaderUrl() throws Exception {
216216

217217
@Test
218218
public void testUploaderName() throws Exception {
219-
assertEquals("Crazy Horse", extractor.getUploaderName());
219+
assertEquals("Luksan Wunder", extractor.getUploaderName());
220220
}
221221

222222
@Test

0 commit comments

Comments
 (0)