fix(YouTube - Force original audio): If stream spoofing to Android then show a summary text why force audio is not available (#4220)

This commit is contained in:
LisoUseInAIKyrios
2024-12-26 13:58:29 +04:00
committed by GitHub
parent 56ce9dbe92
commit 029aee8023
6 changed files with 65 additions and 15 deletions

View File

@ -34,6 +34,12 @@ public class SpoofVideoStreamsPatch {
return false; // Modified during patching.
}
public static boolean notSpoofingToAndroid() {
return !isPatchIncluded()
|| !BaseSettings.SPOOF_VIDEO_STREAMS.get()
|| BaseSettings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get() == ClientType.IOS_UNPLUGGED;
}
/**
* Injection point.
* Blocks /get_watch requests by returning an unreachable URI.
@ -206,18 +212,6 @@ public class SpoofVideoStreamsPatch {
return videoFormat;
}
public static final class NotSpoofingAndroidAvailability implements Setting.Availability {
@Override
public boolean isAvailable() {
if (SpoofVideoStreamsPatch.isPatchIncluded()) {
return !BaseSettings.SPOOF_VIDEO_STREAMS.get()
|| BaseSettings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get() == ClientType.IOS_UNPLUGGED;
}
return true;
}
}
public static final class AudioStreamLanguageOverrideAvailability implements Setting.Availability {
@Override
public boolean isAvailable() {