Skip to content

Commit d652e05

Browse files
StypoxAudricV
authored andcommitted
[MediaCCC] Fix comments about containsSimilarStream
1 parent 044639c commit d652e05

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/media_ccc/extractors/MediaCCCStreamExtractor.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ public List<AudioStream> getAudioStreams() throws ExtractionException {
114114
mediaFormat = null;
115115
}
116116

117-
// Don't use the containsSimilarStream method because it will always return
118-
// false. So if there are multiple audio streams available, only the first one will
119-
// be extracted in this case.
117+
// Not checking containsSimilarStream here, since MediaCCC does not provide enough
118+
// information to decide whether two streams are similar. Hence that method would
119+
// always return false, e.g. even for different language variations.
120120
audioStreams.add(new AudioStream.Builder()
121121
.setId(recording.getString("filename", ID_UNKNOWN))
122122
.setContent(recording.getString("recording_url"), true)
@@ -137,7 +137,6 @@ public List<VideoStream> getVideoStreams() throws ExtractionException {
137137
final String mimeType = recording.getString("mime_type");
138138
if (mimeType.startsWith("video")) {
139139
// First we need to resolve the actual video data from the CDN
140-
141140
final MediaFormat mediaFormat;
142141
if (mimeType.endsWith("webm")) {
143142
mediaFormat = MediaFormat.WEBM;
@@ -147,9 +146,9 @@ public List<VideoStream> getVideoStreams() throws ExtractionException {
147146
mediaFormat = null;
148147
}
149148

150-
// Don't use the containsSimilarStream method because it will prevent the
151-
// extraction of some video variations (mostly languages). So if there are multiple
152-
// video streams available, only the first one will be extracted in this case.
149+
// Not checking containsSimilarStream here, since MediaCCC does not provide enough
150+
// information to decide whether two streams are similar. Hence that method would
151+
// always return false, e.g. even for different language variations.
153152
videoStreams.add(new VideoStream.Builder()
154153
.setId(recording.getString("filename", ID_UNKNOWN))
155154
.setContent(recording.getString("recording_url"), true)

0 commit comments

Comments
 (0)