Use propper structure in KioskExtractors

Made BandCampRadioExtractor a Kiosk which holds StreamInfoItems and not InfoItems.
This commit is contained in:
TobiGr
2021-02-16 21:09:35 +01:00
parent 54b8e54f80
commit 54aa5b3042
4 changed files with 45 additions and 54 deletions

View File

@@ -31,6 +31,7 @@ public class BandcampFeaturedExtractorTest implements BaseListExtractorTest {
NewPipe.init(DownloaderTestImpl.getInstance());
extractor = (BandcampFeaturedExtractor) Bandcamp
.getKioskList().getDefaultKioskExtractor();
extractor.fetchPage();
}
@Test

View File

@@ -5,11 +5,11 @@ package org.schabi.newpipe.extractor.services.bandcamp;
import org.junit.BeforeClass;
import org.junit.Test;
import org.schabi.newpipe.downloader.DownloaderTestImpl;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.services.BaseListExtractorTest;
import org.schabi.newpipe.extractor.services.bandcamp.extractors.BandcampRadioExtractor;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import java.io.IOException;
import java.util.List;
@@ -31,11 +31,12 @@ public class BandcampRadioExtractorTest implements BaseListExtractorTest {
extractor = (BandcampRadioExtractor) Bandcamp
.getKioskList()
.getExtractorById("Radio", null);
extractor.fetchPage();
}
@Test
public void testRadioCount() throws ExtractionException, IOException {
final List<InfoItem> list = Bandcamp.getKioskList().getExtractorById("Radio", null).getInitialPage().getItems();
final List<StreamInfoItem> list = extractor.getInitialPage().getItems();
assertTrue(list.size() > 300);
}