fix(YouTube - Shorts components): Pause option of Change Shorts repeat state not working (20.09+)

This commit is contained in:
inotia00 2025-03-26 15:05:39 +09:00
parent 0bfabbc384
commit a764e3aea3
2 changed files with 5 additions and 1 deletions

View File

@ -101,7 +101,10 @@ public class ShortsRepeatStatePatch {
: "Changing Shorts repeat behavior from: " + name + " to: " + overrideBehavior.name();
});
return overrideBehavior;
// For some reason, in YouTube 20.09+, 'UNKNOWN' functions as 'Pause'.
return ExtendedUtils.IS_20_09_OR_GREATER && behavior == ShortsLoopBehavior.END_SCREEN
? ShortsLoopBehavior.UNKNOWN.ytEnumValue
: overrideBehavior;
}
} catch (Exception ex) {
Logger.printException(() -> "changeShortsRepeatBehavior failure", ex);

View File

@ -39,6 +39,7 @@ public class ExtendedUtils extends PackageUtils {
public static final boolean IS_19_28_OR_GREATER = getAppVersionName().compareTo("19.28.00") >= 0;
public static final boolean IS_19_29_OR_GREATER = getAppVersionName().compareTo("19.29.00") >= 0;
public static final boolean IS_19_34_OR_GREATER = getAppVersionName().compareTo("19.34.00") >= 0;
public static final boolean IS_20_09_OR_GREATER = getAppVersionName().compareTo("20.09.00") >= 0;
public static int validateValue(IntegerSetting settings, int min, int max, String message) {
int value = settings.get();