Skip to content

Commit 0732bef

Browse files
committed
[Peertube] No special handling of live video streams, use getHlsMasterPlaylistUrl() instead
1 parent 5390982 commit 0732bef

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamExtractor.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,6 @@ private void tryExtractStreams() throws ParsingException {
428428
audioStreams = new ArrayList<>();
429429
videoStreams = new ArrayList<>();
430430

431-
if (isLive()) {
432-
extractLiveVideoStreams();
433-
return;
434-
}
435-
436431
// Progressive streams
437432
try {
438433
addStreamsFromArray(
@@ -455,28 +450,6 @@ private void tryExtractStreams() throws ParsingException {
455450
}
456451
}
457452

458-
private void extractLiveVideoStreams() throws ParsingException {
459-
try {
460-
json.getArray(STREAMING_PLAYLISTS)
461-
.stream()
462-
.filter(JsonObject.class::isInstance)
463-
.map(JsonObject.class::cast)
464-
// TODO Check! This is the master playlist!
465-
.map(s -> new SimpleVideoAudioStreamImpl(
466-
VideoAudioFormatRegistry.MPEG_4,
467-
new SimpleHLSDeliveryDataImpl(s.getString(PLAYLIST_URL, "")))
468-
)
469-
// Don't use the containsSimilarStream method because it will always
470-
// return
471-
// false so if there are multiples HLS URLs returned, only the first
472-
// will be
473-
// extracted in this case.
474-
.forEachOrdered(videoStreams::add);
475-
} catch (final Exception e) {
476-
throw new ParsingException("Could not get video streams", e);
477-
}
478-
}
479-
480453
private void addStreamsFromArray(
481454
@Nonnull final JsonArray streams,
482455
final String playlistUrl

0 commit comments

Comments
 (0)