Merge pull request #839 from TeamNewPipe/bandcamp/extract-length

Bandcamp: extract stream length
This commit is contained in:
Stypox 2022-05-02 15:49:41 +02:00 committed by GitHub
commit 598ebb92ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -161,6 +161,12 @@ public class BandcampStreamExtractor extends StreamExtractor {
return audioStreams; return audioStreams;
} }
@Override
public long getLength() throws ParsingException {
return (long) albumJson.getArray("trackinfo").getObject(0)
.getDouble("duration");
}
@Override @Override
public List<VideoStream> getVideoStreams() { public List<VideoStream> getVideoStreams() {
return Collections.emptyList(); return Collections.emptyList();

View File

@ -91,7 +91,7 @@ public class BandcampStreamExtractorTest extends DefaultStreamExtractorTest {
@Override @Override
public long expectedLength() { public long expectedLength() {
return 0; return 124;
} }
@Override @Override