Bandcamp: extract stream length

This commit is contained in:
Fynn Godau 2022-04-24 21:24:19 +02:00
parent 5f8f3929bd
commit c38c016de5
2 changed files with 7 additions and 1 deletions

View File

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

View File

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