From b11778ec5549757538b5ce07137f388d25016597 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Sun, 20 Dec 2015 13:33:39 +0100 Subject: [PATCH] some post changes on the can't play fix. --- .../newpipe/services/youtube/YoutubeVideoExtractor.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/services/youtube/YoutubeVideoExtractor.java b/app/src/main/java/org/schabi/newpipe/services/youtube/YoutubeVideoExtractor.java index 195e08fb1..5b655bfd5 100644 --- a/app/src/main/java/org/schabi/newpipe/services/youtube/YoutubeVideoExtractor.java +++ b/app/src/main/java/org/schabi/newpipe/services/youtube/YoutubeVideoExtractor.java @@ -552,8 +552,7 @@ public class YoutubeVideoExtractor extends VideoExtractor { decryptionFuncName = matchGroup1("\\.sig\\|\\|([a-zA-Z0-9$]+)\\(", playerCode); String functionPattern = "(" + decryptionFuncName.replace("$", "\\$") +"=function\\([a-zA-Z0-9_]*\\)\\{.+?\\})"; - decryptionFunc = matchGroup1(functionPattern, playerCode); - decryptionFunc += ";"; + decryptionFunc = "var " + matchGroup1(functionPattern, playerCode) + ";"; helperObjectName = matchGroup1(";([A-Za-z0-9_\\$]{2})\\...\\(", decryptionFunc); @@ -565,7 +564,7 @@ public class YoutubeVideoExtractor extends VideoExtractor { } callerFunc = callerFunc.replace("%%", decryptionFuncName); - decryptionCode = helperObject + "var " + decryptionFunc + callerFunc; + decryptionCode = helperObject + decryptionFunc + callerFunc; return decryptionCode; }