[Bandcamp] Fix regression of Opus radio streams extraction
When moving opus-lo into a constant, opus-lo was renamed to opus_lo and was only used if no MP3 stream was available (which was not the case before the changes in BandcampRadioStreamExtractor related to the addition of the support of all delivery methods), so these changes removed the ability to get Opus streams of Bandcamp radios. This commit reverts this unwanted change.
This commit is contained in:
parent
54d323c2ae
commit
4158fc46a0
1 changed files with 4 additions and 2 deletions
|
@ -33,7 +33,7 @@ import static org.schabi.newpipe.extractor.utils.Utils.EMPTY_STRING;
|
||||||
|
|
||||||
public class BandcampRadioStreamExtractor extends BandcampStreamExtractor {
|
public class BandcampRadioStreamExtractor extends BandcampStreamExtractor {
|
||||||
|
|
||||||
private static final String OPUS_LO = "opus_lo";
|
private static final String OPUS_LO = "opus-lo";
|
||||||
private static final String MP3_128 = "mp3-128";
|
private static final String MP3_128 = "mp3-128";
|
||||||
private JsonObject showInfo;
|
private JsonObject showInfo;
|
||||||
|
|
||||||
|
@ -126,7 +126,9 @@ public class BandcampRadioStreamExtractor extends BandcampStreamExtractor {
|
||||||
.setMediaFormat(MediaFormat.MP3)
|
.setMediaFormat(MediaFormat.MP3)
|
||||||
.setAverageBitrate(128)
|
.setAverageBitrate(128)
|
||||||
.build());
|
.build());
|
||||||
} else if (streams.has(OPUS_LO)) {
|
}
|
||||||
|
|
||||||
|
if (streams.has(OPUS_LO)) {
|
||||||
audioStreams.add(new AudioStream.Builder()
|
audioStreams.add(new AudioStream.Builder()
|
||||||
.setId(OPUS_LO)
|
.setId(OPUS_LO)
|
||||||
.setContent(streams.getString(OPUS_LO), true)
|
.setContent(streams.getString(OPUS_LO), true)
|
||||||
|
|
Loading…
Reference in a new issue