mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-21 01:07:32 +01:00
fix(youtube/spoof-signature-verification): remove auto re-enable functionality (#428)
This commit is contained in:
parent
bb9120ebae
commit
8afe82c0e0
@ -5,7 +5,6 @@ import static app.revanced.integrations.utils.ReVancedUtils.containsAny;
|
|||||||
import app.revanced.integrations.settings.SettingsEnum;
|
import app.revanced.integrations.settings.SettingsEnum;
|
||||||
import app.revanced.integrations.shared.PlayerType;
|
import app.revanced.integrations.shared.PlayerType;
|
||||||
import app.revanced.integrations.utils.LogHelper;
|
import app.revanced.integrations.utils.LogHelper;
|
||||||
import app.revanced.integrations.utils.ReVancedUtils;
|
|
||||||
|
|
||||||
public class SpoofSignatureVerificationPatch {
|
public class SpoofSignatureVerificationPatch {
|
||||||
/**
|
/**
|
||||||
@ -68,33 +67,4 @@ public class SpoofSignatureVerificationPatch {
|
|||||||
return originalValue;
|
return originalValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Injection point. Runs off the main thread.
|
|
||||||
* <p>
|
|
||||||
* Used to check the response code of video playback requests made by YouTube.
|
|
||||||
* Response code of interest is 403 that indicate a signature verification failure for the current request
|
|
||||||
*
|
|
||||||
* @param responseCode HTTP status code of the completed YouTube connection
|
|
||||||
*/
|
|
||||||
public static void onResponse(int responseCode) {
|
|
||||||
try {
|
|
||||||
if (responseCode < 400 || responseCode >= 500) {
|
|
||||||
return; // everything normal
|
|
||||||
}
|
|
||||||
LogHelper.printDebug(() -> "YouTube HTTP status code: " + responseCode);
|
|
||||||
|
|
||||||
if (SettingsEnum.SPOOF_SIGNATURE_VERIFICATION.getBoolean()) {
|
|
||||||
return; // already enabled
|
|
||||||
}
|
|
||||||
|
|
||||||
SettingsEnum.SPOOF_SIGNATURE_VERIFICATION.saveValue(true);
|
|
||||||
ReVancedUtils.showToastLong("Spoofing app signature to prevent playback issues");
|
|
||||||
// it would be great if the video could be forcefully reloaded, but currently there is no code to do this
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
|
||||||
LogHelper.printException(() -> "onResponse failure", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user