From 48a9fd3ed73521edfe5de1b5a3c79e4d57f73d25 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Fri, 24 Jun 2022 22:16:55 +0200 Subject: [PATCH] [Peertube] No special handling of live video streams, use ``getHlsMasterPlaylistUrl()`` instead --- .../extractors/PeertubeStreamExtractor.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamExtractor.java index 4fbd9b5b38..9905c754b5 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamExtractor.java @@ -429,11 +429,6 @@ private void tryExtractStreams() throws ParsingException { audioStreams = new ArrayList<>(); videoStreams = new ArrayList<>(); - if (isLive()) { - extractLiveVideoStreams(); - return; - } - // Progressive streams try { addStreamsFromArray( @@ -456,28 +451,6 @@ private void tryExtractStreams() throws ParsingException { } } - private void extractLiveVideoStreams() throws ParsingException { - try { - json.getArray(STREAMING_PLAYLISTS) - .stream() - .filter(JsonObject.class::isInstance) - .map(JsonObject.class::cast) - // TODO Check! This is the master playlist! - .map(s -> new SimpleVideoAudioStreamImpl( - VideoAudioFormatRegistry.MPEG_4, - new SimpleHLSDeliveryDataImpl(s.getString(PLAYLIST_URL, ""))) - ) - // Don't use the containsSimilarStream method because it will always - // return - // false so if there are multiples HLS URLs returned, only the first - // will be - // extracted in this case. - .forEachOrdered(videoStreams::add); - } catch (final Exception e) { - throw new ParsingException("Could not get video streams", e); - } - } - private void addStreamsFromArray( @Nonnull final JsonArray streams, final String playlistUrl