2
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-08-31 14:26:14 +00:00

Fetch again the desktop player JSON only if the content is protected by signatureCiphers

This commit is contained in:
TiA4f8R
2021-05-31 19:35:31 +02:00
parent 7474049fd1
commit 947baec805

View File

@@ -832,7 +832,7 @@ public class YoutubeStreamExtractor extends StreamExtractor {
// The cipher signatures from the player endpoint without a timestamp are invalid so
// download it again only if we didn't have a signatureTimestamp before fetching the
// data of this video (the sts string).
if (!stsKnown) {
if (!stsKnown && isCipherProtectedContent()) {
sts = getStsFromPlayerJs();
final JsonObject playerResponseWithSignatureTimestamp = getJsonPostResponse(
"player", createPlayerBodyWithSts(localization, contentCountry, videoId),