Skip to content

Commit c6b4e06

Browse files
committed
Backported fixes from #864
090debd
1 parent 1987678 commit c6b4e06

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,11 +841,14 @@ public void onFetchPage(@Nonnull final Downloader downloader)
841841
.getBytes(StandardCharsets.UTF_8);
842842
nextResponse = getJsonPostResponse(NEXT, body, localization);
843843

844-
if ((!isAgeRestricted && !isLive && !isPostLive)
844+
// this will only be run for post-live and normal streams
845+
if ((!isAgeRestricted && !isLive)
845846
|| isAndroidClientFetchForced) {
846847
try {
847848
fetchAndroidMobileJsonPlayer(contentCountry, localization, videoId);
848849
} catch (final Exception ignored) {
850+
// Ignore exceptions related to ANDROID client fetch or parsing, as it is not
851+
// compulsory to play contents
849852
}
850853
}
851854

@@ -854,6 +857,8 @@ public void onFetchPage(@Nonnull final Downloader downloader)
854857
try {
855858
fetchIosMobileJsonPlayer(contentCountry, localization, videoId);
856859
} catch (final Exception ignored) {
860+
// Ignore exceptions related to IOS client fetch or parsing, as it is not
861+
// compulsory to play contents
857862
}
858863
}
859864
}

0 commit comments

Comments
 (0)