Add isUploaderVerified()

This commit is contained in:
TobiGr 2021-02-19 15:51:02 +01:00
parent 91e9309486
commit 02920fafa8
10 changed files with 50 additions and 0 deletions

View File

@ -94,6 +94,11 @@ public class BandcampChannelExtractor extends ChannelExtractor {
return null; return null;
} }
@Override
public boolean isVerified() throws ParsingException {
return false;
}
@Nonnull @Nonnull
@Override @Override
public InfoItemsPage<StreamInfoItem> getInitialPage() throws ParsingException { public InfoItemsPage<StreamInfoItem> getInitialPage() throws ParsingException {

View File

@ -50,4 +50,9 @@ public class BandcampChannelInfoItemExtractor implements ChannelInfoItemExtracto
public long getStreamCount() { public long getStreamCount() {
return -1; return -1;
} }
@Override
public boolean isVerified() throws ParsingException {
return false;
}
} }

View File

@ -100,6 +100,11 @@ public class BandcampPlaylistExtractor extends PlaylistExtractor {
} }
} }
@Override
public boolean isUploaderVerified() throws ParsingException {
return false;
}
@Override @Override
public long getStreamCount() { public long getStreamCount() {
return trackInfo.size(); return trackInfo.size();

View File

@ -78,6 +78,11 @@ public class BandcampRadioInfoItemExtractor implements StreamInfoItemExtractor {
return ""; return "";
} }
@Override
public boolean isUploaderVerified() throws ParsingException {
return false;
}
@Override @Override
public boolean isAd() { public boolean isAd() {
return false; return false;

View File

@ -95,6 +95,11 @@ public class BandcampStreamExtractor extends StreamExtractor {
return albumJson.getString("artist"); return albumJson.getString("artist");
} }
@Override
public boolean isUploaderVerified() throws ParsingException {
return false;
}
@Nullable @Nullable
@Override @Override
public String getTextualUploadDate() { public String getTextualUploadDate() {

View File

@ -18,6 +18,11 @@ public class BandcampDiscographStreamInfoItemExtractor extends BandcampStreamInf
return discograph.getString("band_name"); return discograph.getString("band_name");
} }
@Override
public boolean isUploaderVerified() throws ParsingException {
return false;
}
@Override @Override
public String getName() { public String getName() {
return discograph.getString("title"); return discograph.getString("title");

View File

@ -53,6 +53,11 @@ public class BandcampPlaylistStreamInfoItemExtractor extends BandcampStreamInfoI
return ""; return "";
} }
@Override
public boolean isUploaderVerified() throws ParsingException {
return false;
}
/** /**
* Each track can have its own cover art. Therefore, unless a substitute is provided, * Each track can have its own cover art. Therefore, unless a substitute is provided,
* the thumbnail is extracted using a stream extractor. * the thumbnail is extracted using a stream extractor.

View File

@ -24,6 +24,11 @@ public class BandcampSearchStreamInfoItemExtractor extends BandcampStreamInfoIte
} }
} }
@Override
public boolean isUploaderVerified() throws ParsingException {
return false;
}
@Override @Override
public String getName() throws ParsingException { public String getName() throws ParsingException {
return resultInfo.getElementsByClass("heading").text(); return resultInfo.getElementsByClass("heading").text();

View File

@ -57,6 +57,11 @@ public class BandcampChannelExtractorTest implements BaseChannelExtractorTest {
assertEquals(-1, extractor.getSubscriberCount()); assertEquals(-1, extractor.getSubscriberCount());
} }
@Override
public void testVerified() throws Exception {
assertFalse(extractor.isVerified());
}
@Override @Override
public void testRelatedItems() throws Exception { public void testRelatedItems() throws Exception {
// not implemented // not implemented

View File

@ -132,6 +132,11 @@ public class BandcampPlaylistExtractorTest {
assertEquals(5, extractor.getStreamCount()); assertEquals(5, extractor.getStreamCount());
} }
@Override
public void testUploaderVerified() throws Exception {
assertFalse(extractor.isUploaderVerified());
}
@Test @Test
public void testInitialPage() throws IOException, ExtractionException { public void testInitialPage() throws IOException, ExtractionException {
assertNotNull(extractor.getInitialPage().getItems().get(0)); assertNotNull(extractor.getInitialPage().getItems().get(0));