From 91611fcae43d8cbec91344f7231ef48ddb84be55 Mon Sep 17 00:00:00 2001 From: Tom <25043847+Douile@users.noreply.github.com> Date: Tue, 23 Nov 2021 15:22:11 +0000 Subject: [PATCH] Don't fetch uneeded stream info for live streams Co-authored-by: Stypox --- .../main/java/org/schabi/newpipe/util/StreamDialogEntry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java index 321c744b7..1667ed649 100644 --- a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java +++ b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java @@ -221,7 +221,7 @@ public enum StreamDialogEntry { private static void fetchItemInfoIfSparse(final Fragment fragment, final StreamInfoItem item, final InfoCallback callback) { - if (item.getDuration() < 0) { + if ((item.getStreamType() == StreamType.LIVE_STREAM || item.getStreamType() == StreamType.AUDIO_LIVE_STREAM) && item.getDuration() < 0) { // Sparse item: fetched by fast fetch final Disposable currentWorker = ExtractorHelper.getStreamInfo( item.getServiceId(),