Skip to content

Commit 0cad269

Browse files
LisoUseInAIKyriosoSumAtrIX
authored andcommitted
feat(YouTube): Support version 19.43.41 (#3854)
1 parent b7b97eb commit 0cad269

File tree

59 files changed

+249
-64
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+249
-64
lines changed

extensions/shared/src/main/java/app/revanced/extension/youtube/patches/DisableFullscreenAmbientModePatch.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,22 @@
44

55
/** @noinspection unused*/
66
public final class DisableFullscreenAmbientModePatch {
7-
public static boolean enableFullScreenAmbientMode() {
8-
return !Settings.DISABLE_FULLSCREEN_AMBIENT_MODE.get();
7+
8+
private static final boolean DISABLE_FULLSCREEN_AMBIENT_MODE = Settings.DISABLE_FULLSCREEN_AMBIENT_MODE.get();
9+
10+
/**
11+
* Constant found in: androidx.window.embedding.DividerAttributes
12+
*/
13+
private static final int DIVIDER_ATTRIBUTES_COLOR_SYSTEM_DEFAULT = -16777216;
14+
15+
/**
16+
* Injection point.
17+
*/
18+
public static int getFullScreenBackgroundColor(int originalColor) {
19+
if (DISABLE_FULLSCREEN_AMBIENT_MODE) {
20+
return DIVIDER_ATTRIBUTES_COLOR_SYSTEM_DEFAULT;
21+
}
22+
23+
return originalColor;
924
}
1025
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package app.revanced.extension.youtube.patches;
2+
3+
import java.util.concurrent.ConcurrentHashMap;
4+
import java.util.concurrent.ConcurrentMap;
5+
6+
import app.revanced.extension.shared.Logger;
7+
import app.revanced.extension.shared.settings.BaseSettings;
8+
9+
@SuppressWarnings("unused")
10+
public final class EnableDebuggingPatch {
11+
12+
private static final ConcurrentMap<Long, Boolean> featureFlags
13+
= new ConcurrentHashMap<>(150, 0.75f, 1);
14+
15+
public static boolean isFeatureFlagEnabled(long flag, boolean value) {
16+
if (value && BaseSettings.DEBUG.get()) {
17+
if (featureFlags.putIfAbsent(flag, true) == null) {
18+
Logger.printDebug(() -> "feature is enabled: " + flag);
19+
}
20+
}
21+
22+
return value;
23+
}
24+
}

patches/api/patches.api

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,10 @@ public final class app/revanced/patches/youtube/interaction/seekbar/EnableSlideT
10531053
public static final fun getEnableSlideToSeekPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
10541054
}
10551055

1056+
public final class app/revanced/patches/youtube/interaction/seekbar/SeekbarThumbnailsPatchKt {
1057+
public static final fun getSeekbarThumbnailsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
1058+
}
1059+
10561060
public final class app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsPatchKt {
10571061
public static final fun getSwipeControlsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
10581062
}
@@ -1196,10 +1200,6 @@ public final class app/revanced/patches/youtube/layout/seekbar/SeekbarColorPatch
11961200
public static final fun getSeekbarColorPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
11971201
}
11981202

1199-
public final class app/revanced/patches/youtube/layout/seekbar/SeekbarThumbnailsPatchKt {
1200-
public static final fun getSeekbarThumbnailsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
1201-
}
1202-
12031203
public final class app/revanced/patches/youtube/layout/shortsautoplay/ShortsAutoplayPatchKt {
12041204
public static final fun getShortsAutoplayPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
12051205
}
@@ -1263,7 +1263,7 @@ public final class app/revanced/patches/youtube/misc/check/CheckEnvironmentPatch
12631263
}
12641264

12651265
public final class app/revanced/patches/youtube/misc/debugging/EnableDebuggingPatchKt {
1266-
public static final fun getEnableDebuggingPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
1266+
public static final fun getEnableDebuggingPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
12671267
}
12681268

12691269
public final class app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatchKt {

patches/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ val hideAdsPatch = bytecodePatch(
7474
"19.16.39",
7575
"19.25.37",
7676
"19.34.42",
77+
"19.43.41",
7778
),
7879
)
7980

patches/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ val hideGetPremiumPatch = bytecodePatch(
3030
"19.16.39",
3131
"19.25.37",
3232
"19.34.42",
33+
"19.43.41",
3334
),
3435
)
3536

patches/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ val videoAdsPatch = bytecodePatch(
2929
"19.16.39",
3030
"19.25.37",
3131
"19.34.42",
32+
"19.43.41",
3233
),
3334
)
3435

patches/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlPatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ val copyVideoUrlPatch = bytecodePatch(
5858
"19.16.39",
5959
"19.25.37",
6060
"19.34.42",
61+
"19.43.41",
6162
),
6263
)
6364

patches/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ val removeViewerDiscretionDialogPatch = bytecodePatch(
3030
"19.16.39",
3131
"19.25.37",
3232
"19.34.42",
33+
"19.43.41",
3334
),
3435
)
3536

patches/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ val downloadsPatch = bytecodePatch(
7373
"19.16.39",
7474
"19.25.37",
7575
"19.34.42",
76+
"19.43.41",
7677
),
7778
)
7879

patches/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ val disablePreciseSeekingGesturePatch = bytecodePatch(
3030
"19.16.39",
3131
"19.25.37",
3232
"19.34.42",
33+
"19.43.41",
3334
),
3435
)
3536

0 commit comments

Comments
 (0)