diff --git a/.github/ISSUE_TEMPLATE/feature-issue.yml b/.github/ISSUE_TEMPLATE/feature-issue.yml
deleted file mode 100644
index 874221dad..000000000
--- a/.github/ISSUE_TEMPLATE/feature-issue.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-name: ⭐ Feature request
-description: Create a detailed feature request.
-title: 'feat:
'
-labels: [feature-request]
-body:
- - type: markdown
- attributes:
- value: |
- # ReVanced feature request
-
- Do not submit requests for patches here. Please submit them [here](https://github.com/orgs/revanced/discussions/categories/patches) instead.
- Important to note that your feature request may have already been made before. Please check for existing feature requests [here](https://github.com/revanced/revanced-patches/labels/feature-request).
-
- - type: dropdown
- attributes:
- label: Type
- options:
- - Functionality
- - Cosmetic
- - Other
- validations:
- required: true
- - type: textarea
- attributes:
- label: Issue
- description: What is the current problem. Why does it require a feature request?
- validations:
- required: true
- - type: textarea
- attributes:
- label: Feature
- description: Describe your feature in detail. How does it solve the issue?
- validations:
- required: true
- - type: textarea
- attributes:
- label: Motivation
- description: Why should your feature should be considered?
- validations:
- required: true
- - type: textarea
- attributes:
- label: Additional context
- description: Add additional context here.
- validations:
- required: false
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/patch-request.yml b/.github/ISSUE_TEMPLATE/patch-request.yml
new file mode 100644
index 000000000..2ac867a73
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/patch-request.yml
@@ -0,0 +1,29 @@
+name: ⭐ Patch Request
+description: Create a detailed patch request.
+title: 'feat(patch): '
+labels: [patch-request]
+body:
+ - type: textarea
+ attributes:
+ label: Application
+ description: Which application is this patch for?
+ validations:
+ required: true
+ - type: textarea
+ attributes:
+ label: Issue
+ description: What is the issue this patch should solve?
+ validations:
+ required: true
+ - type: textarea
+ attributes:
+ label: Patch
+ description: "Describe the patch you'd like to see in detail."
+ validations:
+ required: true
+ - type: textarea
+ attributes:
+ label: Motivation
+ description: Why should your patch request should be considered? What makes it valuable to the community?
+ validations:
+ required: true
diff --git a/CHANGELOG.md b/CHANGELOG.md
index af59a8d77..07779dc46 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,53 @@
+# [2.57.0](https://github.com/revanced/revanced-patches/compare/v2.56.1...v2.57.0) (2022-09-16)
+
+
+### Features
+
+* **amoled:** remove in favour of `theme` patch ([0032301](https://github.com/revanced/revanced-patches/commit/00323010ed7356a639e4e86916dcbae96a53f7f6))
+* **theme:** arbitrary background color for dark theme ([afd5502](https://github.com/revanced/revanced-patches/commit/afd5502afdb207d5f52516653869b26fae7e5d21))
+
+## [2.56.1](https://github.com/revanced/revanced-patches/compare/v2.56.0...v2.56.1) (2022-09-15)
+
+
+### Bug Fixes
+
+* `auto-captions` patch switch description ([#488](https://github.com/revanced/revanced-patches/issues/488)) ([57824fb](https://github.com/revanced/revanced-patches/commit/57824fb16c56889d8f18299e9bab2563bb13e5c2))
+
+# [2.56.0](https://github.com/revanced/revanced-patches/compare/v2.55.0...v2.56.0) (2022-09-15)
+
+
+### Features
+
+* **tiktok-download:** custom download path ([#479](https://github.com/revanced/revanced-patches/issues/479)) ([944aa48](https://github.com/revanced/revanced-patches/commit/944aa485cec513faa30a21b91887dcacf9d70b45))
+
+# [2.55.0](https://github.com/revanced/revanced-patches/compare/v2.54.1...v2.55.0) (2022-09-15)
+
+
+### Features
+
+* `disable-auto-captions` patch ([#435](https://github.com/revanced/revanced-patches/issues/435)) ([8ee12d0](https://github.com/revanced/revanced-patches/commit/8ee12d0beadfd0a8fdce0a331646e8786527e84d))
+
+## [2.54.1](https://github.com/revanced/revanced-patches/compare/v2.54.0...v2.54.1) (2022-09-14)
+
+
+### Bug Fixes
+
+* alignment of download button icon ([#477](https://github.com/revanced/revanced-patches/issues/477)) ([2093f11](https://github.com/revanced/revanced-patches/commit/2093f11e762c471a0987fb57f03c7f48d565fdce))
+
+# [2.54.0](https://github.com/revanced/revanced-patches/compare/v2.53.0...v2.54.0) (2022-09-14)
+
+
+### Features
+
+* bump YouTube Music patches to v5.23.50 ([#462](https://github.com/revanced/revanced-patches/issues/462)) ([15c10b1](https://github.com/revanced/revanced-patches/commit/15c10b1e0368a021b0f2ec46bc2e9ea84a5d5afd))
+
+# [2.53.0](https://github.com/revanced/revanced-patches/compare/v2.52.3...v2.53.0) (2022-09-13)
+
+
+### Features
+
+* patch requests issue template ([#467](https://github.com/revanced/revanced-patches/issues/467)) ([d8bb354](https://github.com/revanced/revanced-patches/commit/d8bb35472258c0634599102f4f4bf4cea587a817)), closes [revanced/revanced-patches#463](https://github.com/revanced/revanced-patches/issues/463)
+
## [2.52.3](https://github.com/revanced/revanced-patches/compare/v2.52.2...v2.52.3) (2022-09-11)
diff --git a/README.md b/README.md
index 6bf528ff0..11ca6bf05 100644
--- a/README.md
+++ b/README.md
@@ -34,16 +34,16 @@ The official Patch bundle provided by ReVanced and the community.
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
-| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.22.54 |
-| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.22.54 |
-| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.22.54 |
-| `compact-header` | Hides the music category bar at the top of the homepage. | 5.22.54 |
-| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.22.54 |
-| `background-play` | Enables playing music in the background. | 5.22.54 |
-| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.22.54 |
-| `music-video-ads` | Removes ads in the music player. | 5.22.54 |
-| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.22.54 |
-| `exclusive-audio-playback` | Enables the option to play music without video. | 5.22.54 |
+| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.23.50 |
+| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.23.50 |
+| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.23.50 |
+| `compact-header` | Hides the music category bar at the top of the homepage. | 5.23.50 |
+| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.23.50 |
+| `background-play` | Enables playing music in the background. | 5.23.50 |
+| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.23.50 |
+| `music-video-ads` | Removes ads in the music player. | 5.23.50 |
+| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.23.50 |
+| `exclusive-audio-playback` | Enables the option to play music without video. | 5.23.50 |
### 📦 `de.dwd.warnapp`
@@ -59,7 +59,7 @@ The official Patch bundle provided by ReVanced and the community.
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
-| `tiktok-download` | Remove restrictions on downloads video. | all |
+| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
| `tiktok-seekbar` | Show progress bar for all video. | all |
| `tiktok-ads` | Removes ads from TikTok. | all |
@@ -69,7 +69,7 @@ The official Patch bundle provided by ReVanced and the community.
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
-| `tiktok-download` | Remove restrictions on downloads video. | all |
+| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
| `tiktok-seekbar` | Show progress bar for all video. | all |
| `tiktok-ads` | Removes ads from TikTok. | all |
@@ -82,7 +82,6 @@ The official Patch bundle provided by ReVanced and the community.
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.33.42 |
| `downloads` | Enables downloading music and videos from YouTube. | 17.33.42 |
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.33.42 |
-| `amoled` | Enables pure black theme. | all |
| `disable-create-button` | Hides the create button in the navigation bar. | 17.33.42 |
| `hide-cast-button` | Hides the cast button in the video player. | all |
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.33.42 |
@@ -91,12 +90,13 @@ The official Patch bundle provided by ReVanced and the community.
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.33.42 |
| `old-quality-layout` | Enables the original quality flyout menu. | 17.33.42 |
-| `theme` | Enables a custom theme. | all |
+| `theme` | Applies a custom theme. | all |
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.33.42 |
| `hide-watermark` | Hides creator's watermarks on videos. | 17.33.42 |
| `sponsorblock` | Integrate SponsorBlock. | 17.33.42 |
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.33.42 |
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.33.42 |
+| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.33.42 |
| `minimized-playback` | Enables minimized and background playback. | 17.33.42 |
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.33.42 |
diff --git a/gradle.properties b/gradle.properties
index d61d58599..20951248c 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,2 +1,2 @@
kotlin.code.style = official
-version = 2.52.3
+version = 2.57.0
diff --git a/patches.json b/patches.json
index 28ea95a3e..06f4b7877 100644
--- a/patches.json
+++ b/patches.json
@@ -1 +1 @@
-[{"name":"timeline-ads","description":"Removes ads from the Twitter timeline.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.twitter.android","versions":[]}]},{"name":"premium-icon-reddit","description":"Unlocking Premium Icons in reddit app.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.reddit.frontpage","versions":[]}]},{"name":"general-reddit-ads","description":"Removes general ads from the Reddit frontpage and subreddits.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.reddit.frontpage","versions":[]}]},{"name":"pflotsh-ecmwf-subscription-unlock","description":"Unlocks all subscription features.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.garzotto.pflotsh.ecmwf_a","versions":["3.5.4"]}]},{"name":"minimized-playback-music","description":"Enables minimized playback on Kids music.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54"]}]},{"name":"tasteBuilder-remover","description":"Removes the \"Tell us which artists you like\" card from the home screen.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.21.52","5.22.54"]}]},{"name":"hide-get-premium","description":"Removes all \"Get Premium\" evidences from the avatar menu.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54"]}]},{"name":"compact-header","description":"Hides the music category bar at the top of the homepage.","version":"0.0.1","excluded":true,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.21.52","5.22.54"]}]},{"name":"upgrade-button-remover","description":"Removes the upgrade tab from the pivot bar.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54"]}]},{"name":"background-play","description":"Enables playing music in the background.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54"]}]},{"name":"music-microg-support","description":"Allows YouTube Music ReVanced to run without root and under a different package name.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["music-microg-resource-patch"],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54"]}]},{"name":"music-video-ads","description":"Removes ads in the music player.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54"]}]},{"name":"codecs-unlock","description":"Adds more audio codec options. The new audio codecs usually result in better audio quality.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54"]}]},{"name":"exclusive-audio-playback","description":"Enables the option to play music without video.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54"]}]},{"name":"promo-code-unlock","description":"Disables the validation of promo code. Any code will work to unlock all features.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["spoof-cert-patch"],"compatiblePackages":[{"name":"de.dwd.warnapp","versions":[]}]},{"name":"tiktok-download","description":"Remove restrictions on downloads video.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.ss.android.ugc.trill","versions":[]},{"name":"com.zhiliaoapp.musically","versions":[]}]},{"name":"tiktok-seekbar","description":"Show progress bar for all video.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.ss.android.ugc.trill","versions":[]},{"name":"com.zhiliaoapp.musically","versions":[]}]},{"name":"tiktok-ads","description":"Removes ads from TikTok.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.ss.android.ugc.trill","versions":[]},{"name":"com.zhiliaoapp.musically","versions":[]}]},{"name":"swipe-controls","description":"Adds volume and brightness swipe controls.","version":"0.0.3","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","player-type-hook","swipe-controls-resource-patch"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.24.34","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"downloads","description":"Enables downloading music and videos from YouTube.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["downloads-resource-patch","player-controls-bytecode-patch","video-id-hook"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.27.39","17.29.34","17.32.35","17.33.42"]}]},{"name":"seekbar-tapping","description":"Enables tap-to-seek on the seekbar of the video player.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"amoled","description":"Enables pure black theme.","version":"0.0.1","excluded":false,"deprecated":true,"options":[],"dependencies":["locale-config-fix"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"disable-create-button","description":"Hides the create button in the navigation bar.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","resource-id-mapping-provider-resource-patch-dependency","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"hide-cast-button","description":"Hides the cast button in the video player.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"return-youtube-dislike","description":"Shows the dislike count of videos using the Return YouTube Dislike API.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","video-id-hook","return-youtube-dislike-resource-patch"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"hide-autoplay-button","description":"Hides the autoplay button in the video player.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings","resource-id-mapping-provider-resource-patch-dependency"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"premium-heading","description":"Shows premium branding on the home screen.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["locale-config-fix"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"custom-branding","description":"Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).","version":"0.0.1","excluded":false,"deprecated":false,"options":[{"key":"appName","title":"Application Name","description":"The name of the application it will show on your home screen.","required":true,"choices":null},{"key":"appIconPath","title":"Application Icon Path","description":"A path to the icon of the application.","required":false,"choices":null}],"dependencies":["locale-config-fix"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"disable-fullscreen-panels","description":"Disables video description and comments panel in fullscreen view.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"old-quality-layout","description":"Enables the original quality flyout menu.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"theme","description":"Enables a custom theme.","version":"0.0.1","excluded":false,"deprecated":false,"options":[{"key":"theme","title":"Theme","description":"Select a theme.","required":true,"choices":["Amoled"]}],"dependencies":["locale-config-fix"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"hide-shorts-button","description":"Hides the shorts button on the navigation bar.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"hide-watermark","description":"Hides creator\u0027s watermarks on videos.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"sponsorblock","description":"Integrate SponsorBlock.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["player-controls-bytecode-patch","integrations","resource-id-mapping-provider-resource-patch-dependency","sponsorblock-resource-patch","video-id-hook"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.22.36","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"enable-wide-searchbar","description":"Replaces the search icon with a wide search bar. This will hide the YouTube logo when active.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"tablet-mini-player","description":"Enables the tablet mini player layout.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.26.35","17.29.34","17.32.35","17.33.42"]}]},{"name":"minimized-playback","description":"Enables minimized and background playback.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"client-spoof","description":"Spoofs the YouTube or Vanced client to prevent playback issues.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]},{"name":"com.vanced.android.youtube","versions":[]}]},{"name":"custom-video-buffer","description":"Lets you change the buffers of videos.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.25.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"always-autorepeat","description":"Always repeats the playing video again.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"microg-support","description":"Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["microg-resource-patch","hide-cast-button","client-spoof"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"settings","description":"Adds settings for ReVanced to YouTube.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings-resource-patch"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"enable-debugging","description":"Enables app debugging by patching the manifest file.","version":"0.0.1","excluded":true,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"custom-playback-speed","description":"Adds more video playback speed options.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.24.34","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"hdr-auto-brightness","description":"Makes the brightness of HDR videos follow the system default.","version":"0.0.2","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"remember-video-quality","description":"Adds the ability to remember the video quality you chose in the video quality flyout.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","video-id-hook"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.22.36","17.24.35","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"video-ads","description":"Removes ads in the video player.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"general-ads","description":"Removes general ads.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["resource-id-mapping-provider-resource-patch-dependency","integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"hide-infocard-suggestions","description":"Hides infocards in videos.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]}]
\ No newline at end of file
+[{"name":"timeline-ads","description":"Removes ads from the Twitter timeline.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.twitter.android","versions":[]}]},{"name":"premium-icon-reddit","description":"Unlocking Premium Icons in reddit app.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.reddit.frontpage","versions":[]}]},{"name":"general-reddit-ads","description":"Removes general ads from the Reddit frontpage and subreddits.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.reddit.frontpage","versions":[]}]},{"name":"pflotsh-ecmwf-subscription-unlock","description":"Unlocks all subscription features.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.garzotto.pflotsh.ecmwf_a","versions":["3.5.4"]}]},{"name":"minimized-playback-music","description":"Enables minimized playback on Kids music.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54","5.23.50"]}]},{"name":"tasteBuilder-remover","description":"Removes the \"Tell us which artists you like\" card from the home screen.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.21.52","5.22.54","5.23.50"]}]},{"name":"hide-get-premium","description":"Removes all \"Get Premium\" evidences from the avatar menu.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54","5.23.50"]}]},{"name":"compact-header","description":"Hides the music category bar at the top of the homepage.","version":"0.0.1","excluded":true,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.21.52","5.22.54","5.23.50"]}]},{"name":"upgrade-button-remover","description":"Removes the upgrade tab from the pivot bar.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54","5.23.50"]}]},{"name":"background-play","description":"Enables playing music in the background.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54","5.23.50"]}]},{"name":"music-microg-support","description":"Allows YouTube Music ReVanced to run without root and under a different package name.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["music-microg-resource-patch"],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54","5.23.50"]}]},{"name":"music-video-ads","description":"Removes ads in the music player.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54","5.23.50"]}]},{"name":"codecs-unlock","description":"Adds more audio codec options. The new audio codecs usually result in better audio quality.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54","5.23.50"]}]},{"name":"exclusive-audio-playback","description":"Enables the option to play music without video.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.apps.youtube.music","versions":["5.14.53","5.16.51","5.17.51","5.21.52","5.22.54","5.23.50"]}]},{"name":"promo-code-unlock","description":"Disables the validation of promo code. Any code will work to unlock all features.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["spoof-cert-patch"],"compatiblePackages":[{"name":"de.dwd.warnapp","versions":[]}]},{"name":"tiktok-download","description":"Removes download restrictions and changes the default path to download to.","version":"0.0.1","excluded":false,"deprecated":false,"options":[{"key":"mediaFolder","title":"Media folder","description":"The media root folder to download to.","required":true,"choices":["DCIM","Movies","Pictures"]},{"key":"downloadPath","title":"Download path","description":"Download path relative to the media folder.","required":true,"choices":null}],"dependencies":[],"compatiblePackages":[{"name":"com.ss.android.ugc.trill","versions":[]},{"name":"com.zhiliaoapp.musically","versions":[]}]},{"name":"tiktok-seekbar","description":"Show progress bar for all video.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.ss.android.ugc.trill","versions":[]},{"name":"com.zhiliaoapp.musically","versions":[]}]},{"name":"tiktok-ads","description":"Removes ads from TikTok.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.ss.android.ugc.trill","versions":[]},{"name":"com.zhiliaoapp.musically","versions":[]}]},{"name":"swipe-controls","description":"Adds volume and brightness swipe controls.","version":"0.0.3","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","player-type-hook","swipe-controls-resource-patch"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.24.34","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"downloads","description":"Enables downloading music and videos from YouTube.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["downloads-resource-patch","player-controls-bytecode-patch","video-id-hook"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.27.39","17.29.34","17.32.35","17.33.42"]}]},{"name":"seekbar-tapping","description":"Enables tap-to-seek on the seekbar of the video player.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"disable-create-button","description":"Hides the create button in the navigation bar.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","resource-id-mapping-provider-resource-patch-dependency","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"hide-cast-button","description":"Hides the cast button in the video player.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"return-youtube-dislike","description":"Shows the dislike count of videos using the Return YouTube Dislike API.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","video-id-hook","return-youtube-dislike-resource-patch"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"hide-autoplay-button","description":"Hides the autoplay button in the video player.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings","resource-id-mapping-provider-resource-patch-dependency"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"premium-heading","description":"Shows premium branding on the home screen.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["locale-config-fix"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"custom-branding","description":"Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).","version":"0.0.1","excluded":false,"deprecated":false,"options":[{"key":"appName","title":"Application Name","description":"The name of the application it will show on your home screen.","required":true,"choices":null},{"key":"appIconPath","title":"Application Icon Path","description":"A path to the icon of the application.","required":false,"choices":null}],"dependencies":["locale-config-fix"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"disable-fullscreen-panels","description":"Disables video description and comments panel in fullscreen view.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"old-quality-layout","description":"Enables the original quality flyout menu.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"theme","description":"Applies a custom theme.","version":"0.0.1","excluded":false,"deprecated":false,"options":[{"key":"darkThemeBackgroundColor","title":"Background color for the dark theme","description":"The background color of the dark theme. Can be a hex color or a resource reference.","required":false,"choices":null}],"dependencies":["locale-config-fix"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"hide-shorts-button","description":"Hides the shorts button on the navigation bar.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"hide-watermark","description":"Hides creator\u0027s watermarks on videos.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"sponsorblock","description":"Integrate SponsorBlock.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["player-controls-bytecode-patch","integrations","resource-id-mapping-provider-resource-patch-dependency","sponsorblock-resource-patch","video-id-hook"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.22.36","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"enable-wide-searchbar","description":"Replaces the search icon with a wide search bar. This will hide the YouTube logo when active.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"tablet-mini-player","description":"Enables the tablet mini player layout.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.26.35","17.29.34","17.32.35","17.33.42"]}]},{"name":"disable-auto-captions","description":"Disable forced captions from being automatically enabled.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"minimized-playback","description":"Enables minimized and background playback.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"client-spoof","description":"Spoofs the YouTube or Vanced client to prevent playback issues.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":[],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]},{"name":"com.vanced.android.youtube","versions":[]}]},{"name":"custom-video-buffer","description":"Lets you change the buffers of videos.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.25.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"always-autorepeat","description":"Always repeats the playing video again.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"microg-support","description":"Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["microg-resource-patch","hide-cast-button","client-spoof"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"settings","description":"Adds settings for ReVanced to YouTube.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings-resource-patch"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"enable-debugging","description":"Enables app debugging by patching the manifest file.","version":"0.0.1","excluded":true,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":[]}]},{"name":"custom-playback-speed","description":"Adds more video playback speed options.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.24.34","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"hdr-auto-brightness","description":"Makes the brightness of HDR videos follow the system default.","version":"0.0.2","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"remember-video-quality","description":"Adds the ability to remember the video quality you chose in the video quality flyout.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","video-id-hook"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.22.36","17.24.35","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"video-ads","description":"Removes ads in the video player.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.14.35","17.17.34","17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"general-ads","description":"Removes general ads.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["resource-id-mapping-provider-resource-patch-dependency","integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.19.36","17.20.37","17.22.36","17.23.35","17.23.36","17.24.34","17.24.35","17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]},{"name":"hide-infocard-suggestions","description":"Hides infocards in videos.","version":"0.0.1","excluded":false,"deprecated":false,"options":[],"dependencies":["integrations","settings"],"compatiblePackages":[{"name":"com.google.android.youtube","versions":["17.25.34","17.26.35","17.27.39","17.28.34","17.29.34","17.32.35","17.33.42"]}]}]
\ No newline at end of file
diff --git a/src/main/kotlin/app/revanced/patches/music/ad/video/annotations/MusicVideoAdsCompatibility.kt b/src/main/kotlin/app/revanced/patches/music/ad/video/annotations/MusicVideoAdsCompatibility.kt
index a88c7f653..95f8b82a2 100644
--- a/src/main/kotlin/app/revanced/patches/music/ad/video/annotations/MusicVideoAdsCompatibility.kt
+++ b/src/main/kotlin/app/revanced/patches/music/ad/video/annotations/MusicVideoAdsCompatibility.kt
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
- "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
+ "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50")
)]
)
@Target(AnnotationTarget.CLASS)
diff --git a/src/main/kotlin/app/revanced/patches/music/audio/codecs/annotations/CodecsUnlockCompatibility.kt b/src/main/kotlin/app/revanced/patches/music/audio/codecs/annotations/CodecsUnlockCompatibility.kt
index a0d7fe045..fa19fb77e 100644
--- a/src/main/kotlin/app/revanced/patches/music/audio/codecs/annotations/CodecsUnlockCompatibility.kt
+++ b/src/main/kotlin/app/revanced/patches/music/audio/codecs/annotations/CodecsUnlockCompatibility.kt
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
- "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
+ "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50")
)]
)
@Target(AnnotationTarget.CLASS)
diff --git a/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/annotations/ExclusiveAudioCompatibility.kt b/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/annotations/ExclusiveAudioCompatibility.kt
index 4641ed9eb..5c0ed8f07 100644
--- a/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/annotations/ExclusiveAudioCompatibility.kt
+++ b/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/annotations/ExclusiveAudioCompatibility.kt
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
- "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
+ "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50")
)]
)
@Target(AnnotationTarget.CLASS)
diff --git a/src/main/kotlin/app/revanced/patches/music/layout/compactheader/annotations/CompactHeaderCompatibility.kt b/src/main/kotlin/app/revanced/patches/music/layout/compactheader/annotations/CompactHeaderCompatibility.kt
index 352330e5e..658d86173 100644
--- a/src/main/kotlin/app/revanced/patches/music/layout/compactheader/annotations/CompactHeaderCompatibility.kt
+++ b/src/main/kotlin/app/revanced/patches/music/layout/compactheader/annotations/CompactHeaderCompatibility.kt
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
- "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.21.52", "5.22.54")
+ "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.21.52", "5.22.54", "5.23.50")
)]
)
@Target(AnnotationTarget.CLASS)
diff --git a/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt b/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt
index 712192b89..8a25ef02c 100644
--- a/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt
+++ b/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
- "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
+ "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50")
)]
)
@Target(AnnotationTarget.CLASS)
diff --git a/src/main/kotlin/app/revanced/patches/music/layout/premium/annotations/HideGetPremiumCompatibility.kt b/src/main/kotlin/app/revanced/patches/music/layout/premium/annotations/HideGetPremiumCompatibility.kt
index 4adc62b6a..e057d72cc 100644
--- a/src/main/kotlin/app/revanced/patches/music/layout/premium/annotations/HideGetPremiumCompatibility.kt
+++ b/src/main/kotlin/app/revanced/patches/music/layout/premium/annotations/HideGetPremiumCompatibility.kt
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
- "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
+ "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50")
)]
)
@Target(AnnotationTarget.CLASS)
diff --git a/src/main/kotlin/app/revanced/patches/music/layout/tastebuilder/annotations/RemoveTasteBuilderCompatibility.kt b/src/main/kotlin/app/revanced/patches/music/layout/tastebuilder/annotations/RemoveTasteBuilderCompatibility.kt
index 7dcf79f30..d1799dfa6 100644
--- a/src/main/kotlin/app/revanced/patches/music/layout/tastebuilder/annotations/RemoveTasteBuilderCompatibility.kt
+++ b/src/main/kotlin/app/revanced/patches/music/layout/tastebuilder/annotations/RemoveTasteBuilderCompatibility.kt
@@ -10,7 +10,7 @@ import app.revanced.patcher.annotation.Package
*/
@Compatibility(
[Package(
- "com.google.android.apps.youtube.music", arrayOf("5.21.52", "5.22.54")
+ "com.google.android.apps.youtube.music", arrayOf("5.21.52", "5.22.54", "5.23.50")
)]
)
@Target(AnnotationTarget.CLASS)
diff --git a/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/annotations/RemoveUpgradeButtonCompatibility.kt b/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/annotations/RemoveUpgradeButtonCompatibility.kt
index 7fc10b48c..743f66e40 100644
--- a/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/annotations/RemoveUpgradeButtonCompatibility.kt
+++ b/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/annotations/RemoveUpgradeButtonCompatibility.kt
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
- "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
+ "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50")
)]
)
@Target(AnnotationTarget.CLASS)
diff --git a/src/main/kotlin/app/revanced/patches/music/misc/microg/annotations/MusicMicroGPatchCompatibility.kt b/src/main/kotlin/app/revanced/patches/music/misc/microg/annotations/MusicMicroGPatchCompatibility.kt
index eff420a6e..e044a16c2 100644
--- a/src/main/kotlin/app/revanced/patches/music/misc/microg/annotations/MusicMicroGPatchCompatibility.kt
+++ b/src/main/kotlin/app/revanced/patches/music/misc/microg/annotations/MusicMicroGPatchCompatibility.kt
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
- "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
+ "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50")
)]
)
@Target(AnnotationTarget.CLASS)
diff --git a/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/annotations/BackgroundPlayCompatibility.kt b/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/annotations/BackgroundPlayCompatibility.kt
index a8d465e93..8a5ed0156 100644
--- a/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/annotations/BackgroundPlayCompatibility.kt
+++ b/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/annotations/BackgroundPlayCompatibility.kt
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
- "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54")
+ "com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51", "5.21.52", "5.22.54", "5.23.50")
)]
)
@Target(AnnotationTarget.CLASS)
diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadPathParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadPathParentFingerprint.kt
new file mode 100644
index 000000000..dda746765
--- /dev/null
+++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadPathParentFingerprint.kt
@@ -0,0 +1,23 @@
+package app.revanced.patches.tiktok.interaction.downloads.fingerprints
+
+import app.revanced.patcher.annotation.Name
+import app.revanced.patcher.annotation.Version
+import app.revanced.patcher.extensions.or
+import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
+import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
+import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
+import org.jf.dexlib2.AccessFlags
+
+@Name("download-path-parent-fingerprint")
+@MatchingMethod("LX/4bF;", "LIZ")
+@DownloadsCompatibility
+@Version("0.0.1")
+object DownloadPathParentFingerprint : MethodFingerprint(
+ "V",
+ AccessFlags.PUBLIC or AccessFlags.FINAL,
+ strings = listOf(
+ "code",
+ "reason",
+ "params insufficient"
+ )
+)
\ No newline at end of file
diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt
index 0360d2dbe..3e2cb34a4 100644
--- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt
@@ -4,24 +4,34 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.BytecodeData
+import app.revanced.patcher.data.impl.toMethodWalker
+import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.extensions.replaceInstructions
-import app.revanced.patcher.patch.PatchResult
-import app.revanced.patcher.patch.PatchResultSuccess
+import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
+import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
-import app.revanced.patches.tiktok.interaction.downloads.fingerprints.*
+import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint
+import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint2
+import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint3
+import app.revanced.patches.tiktok.interaction.downloads.fingerprints.DownloadPathParentFingerprint
+import org.jf.dexlib2.Opcode
+import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
+import org.jf.dexlib2.iface.instruction.ReferenceInstruction
+import org.jf.dexlib2.iface.reference.StringReference
@Patch
@Name("tiktok-download")
-@Description("Remove restrictions on downloads video.")
+@Description("Removes download restrictions and changes the default path to download to.")
@DownloadsCompatibility
@Version("0.0.1")
class DownloadsPatch : BytecodePatch(
listOf(
ACLCommonShareFingerprint,
ACLCommonShareFingerprint2,
- ACLCommonShareFingerprint3
+ ACLCommonShareFingerprint3,
+ DownloadPathParentFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
@@ -50,7 +60,76 @@ class DownloadsPatch : BytecodePatch(
return v0
"""
)
+ //Change the download path patch
+ val method4 = DownloadPathParentFingerprint.result!!.mutableMethod
+ val implementation4 = method4.implementation
+ val instructions = implementation4!!.instructions
+ var targetOffset = -1
+ //Search for the target method called instruction offset.
+ for ((index, instruction) in instructions.withIndex()) {
+ if (instruction.opcode != Opcode.CONST_STRING) continue
+ val reference = (instruction as ReferenceInstruction).reference as StringReference
+ if (reference.string != "video/mp4") continue
+ val targetInstruction = instructions[index + 1]
+ if (targetInstruction.opcode != Opcode.INVOKE_STATIC) continue
+ targetOffset = index + 1
+ break
+ }
+ if (targetOffset == -1) return PatchResultError("Can not find download path uri method.")
+ //Change videos' download path.
+ val downloadPath = "$downloadPathParent/$downloadPathChild"
+ val downloadUriMethod = data
+ .toMethodWalker(DownloadPathParentFingerprint.result!!.method)
+ .nextMethod(targetOffset, true)
+ .getMethod() as MutableMethod
+ downloadUriMethod.implementation!!.instructions.forEachIndexed { index, instruction ->
+ if (instruction.opcode == Opcode.SGET_OBJECT) {
+ val overrideRegister = (instruction as OneRegisterInstruction).registerA
+ downloadUriMethod.replaceInstruction(
+ index,
+ """
+ const-string v$overrideRegister, "$downloadPath"
+ """
+ )
+ }
+ if (instruction.opcode == Opcode.CONST_STRING) {
+ val string = ((instruction as ReferenceInstruction).reference as StringReference).string
+ if (string.contains("/Camera")) {
+ val overrideRegister = (instruction as OneRegisterInstruction).registerA
+ val overrideString = string.replace("/Camera", "")
+ downloadUriMethod.replaceInstruction(
+ index,
+ """
+ const-string v$overrideRegister, "$overrideString"
+ """
+ )
+ }
+ }
+ }
return PatchResultSuccess()
}
+ companion object : OptionsContainer() {
+ private var downloadPathParent: String? by option(
+ PatchOption.StringListOption(
+ key = "mediaFolder",
+ default = "DCIM",
+ options = listOf(
+ "DCIM", "Movies", "Pictures"
+ ),
+ title = "Media folder",
+ description = "The media root folder to download to.",
+ required = true
+ )
+ )
+ private var downloadPathChild: String? by option(
+ PatchOption.StringOption(
+ key = "downloadPath",
+ default = "TikTok",
+ title = "Download path",
+ description = "Download path relative to the media folder.",
+ required = true
+ )
+ )
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/annotations/AmoledCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/annotations/AmoledCompatibility.kt
deleted file mode 100644
index 50f383f46..000000000
--- a/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/annotations/AmoledCompatibility.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-package app.revanced.patches.youtube.layout.amoled.annotations
-
-import app.revanced.patcher.annotation.Compatibility
-import app.revanced.patcher.annotation.Package
-
-@Compatibility([Package("com.google.android.youtube")])
-@Target(AnnotationTarget.CLASS)
-@Retention(AnnotationRetention.RUNTIME)
-internal annotation class AmoledCompatibility
diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt
index 2dda2cc75..e69de29bb 100644
--- a/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt
@@ -1,28 +0,0 @@
-package app.revanced.patches.youtube.layout.amoled.patch
-
-import app.revanced.patcher.annotation.Description
-import app.revanced.patcher.annotation.Name
-import app.revanced.patcher.annotation.PatchDeprecated
-import app.revanced.patcher.annotation.Version
-import app.revanced.patcher.data.impl.ResourceData
-import app.revanced.patcher.patch.PatchResult
-import app.revanced.patcher.patch.annotations.DependsOn
-import app.revanced.patcher.patch.annotations.Patch
-import app.revanced.patcher.patch.impl.ResourcePatch
-import app.revanced.patches.youtube.layout.amoled.annotations.AmoledCompatibility
-import app.revanced.patches.youtube.layout.customthemes.patch.CustomThemePatch
-import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
-
-@Patch
-@DependsOn([FixLocaleConfigErrorPatch::class])
-@Name("amoled")
-@Description("Enables pure black theme.")
-@AmoledCompatibility
-@Version("0.0.1")
-@PatchDeprecated("Theme patch already includes the Amoled theme.", CustomThemePatch::class)
-class AmoledPatch : ResourcePatch() {
- override fun execute(data: ResourceData): PatchResult {
- CustomThemePatch.themeOption.value = CustomThemePatch.Themes.AMOLED.name
- return CustomThemePatch().execute(data)
- }
-}
diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/annotations/AutoCaptionsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/annotations/AutoCaptionsCompatibility.kt
new file mode 100644
index 000000000..a0e22f736
--- /dev/null
+++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/annotations/AutoCaptionsCompatibility.kt
@@ -0,0 +1,13 @@
+package app.revanced.patches.youtube.layout.autocaptions.annotations
+
+import app.revanced.patcher.annotation.Compatibility
+import app.revanced.patcher.annotation.Package
+
+@Compatibility(
+ [Package(
+ "com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
+ )]
+)
+@Target(AnnotationTarget.CLASS)
+@Retention(AnnotationRetention.RUNTIME)
+internal annotation class AutoCaptionsCompatibility
diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/StartVideoInformerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/StartVideoInformerFingerprint.kt
new file mode 100644
index 000000000..590b2839e
--- /dev/null
+++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/StartVideoInformerFingerprint.kt
@@ -0,0 +1,40 @@
+package app.revanced.patches.youtube.layout.autocaptions.fingerprints
+
+import app.revanced.patcher.annotation.Name
+import app.revanced.patcher.annotation.Version
+import app.revanced.patcher.extensions.or
+import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
+import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
+import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
+import app.revanced.patches.youtube.layout.autocaptions.annotations.AutoCaptionsCompatibility
+import org.jf.dexlib2.AccessFlags
+import org.jf.dexlib2.Opcode
+
+@Name("start-video-informer-fingerprint")
+@MatchingMethod("Laaxf;", "d")
+@FuzzyPatternScanMethod(3)
+@AutoCaptionsCompatibility
+@Version("0.0.1")
+object StartVideoInformerFingerprint : MethodFingerprint(
+ "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L", "L", "L"), listOf(
+ Opcode.INVOKE_STATIC,
+ Opcode.IGET_OBJECT,
+ Opcode.IGET_OBJECT,
+ Opcode.NEW_INSTANCE,
+ Opcode.INVOKE_DIRECT,
+ Opcode.INVOKE_INTERFACE,
+ Opcode.IF_EQZ,
+ Opcode.CONST_STRING,
+ Opcode.INVOKE_INTERFACE,
+ Opcode.IGET_OBJECT,
+ Opcode.INVOKE_VIRTUAL,
+ Opcode.MOVE_RESULT,
+ Opcode.IF_EQZ,
+ Opcode.IGET_OBJECT,
+ Opcode.INVOKE_VIRTUAL,
+ Opcode.MOVE_RESULT,
+ Opcode.CONST_4,
+ Opcode.IF_EQ,
+ Opcode.GOTO,
+ )
+)
\ No newline at end of file
diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleButtonControllerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleButtonControllerFingerprint.kt
new file mode 100644
index 000000000..fec6f6c4b
--- /dev/null
+++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleButtonControllerFingerprint.kt
@@ -0,0 +1,28 @@
+package app.revanced.patches.youtube.layout.autocaptions.fingerprints
+
+import app.revanced.patcher.annotation.Name
+import app.revanced.patcher.annotation.Version
+import app.revanced.patcher.extensions.or
+import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
+import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
+import app.revanced.patches.youtube.layout.autocaptions.annotations.AutoCaptionsCompatibility
+import org.jf.dexlib2.AccessFlags
+import org.jf.dexlib2.Opcode
+
+@Name("subtitle-button-controller-fingerprint")
+@MatchingMethod("Lcom/google/android/apps/youtube/app/player/overlay/SubtitleButtonController;", "E")
+@AutoCaptionsCompatibility
+@Version("0.0.1")
+object SubtitleButtonControllerFingerprint : MethodFingerprint(
+ "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"), listOf(
+ Opcode.IGET_OBJECT,
+ Opcode.IF_NEZ,
+ Opcode.RETURN_VOID,
+ Opcode.IGET_BOOLEAN,
+ Opcode.CONST_4,
+ Opcode.IF_NEZ,
+ Opcode.CONST,
+ Opcode.INVOKE_VIRTUAL,
+ Opcode.IGET_OBJECT,
+ )
+)
\ No newline at end of file
diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleTrackFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleTrackFingerprint.kt
new file mode 100644
index 000000000..a61000355
--- /dev/null
+++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleTrackFingerprint.kt
@@ -0,0 +1,26 @@
+package app.revanced.patches.youtube.layout.autocaptions.fingerprints
+
+import app.revanced.patcher.annotation.Name
+import app.revanced.patcher.annotation.Version
+import app.revanced.patcher.extensions.or
+import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
+import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
+import app.revanced.patches.youtube.layout.autocaptions.annotations.AutoCaptionsCompatibility
+import org.jf.dexlib2.AccessFlags
+import org.jf.dexlib2.Opcode
+
+@Name("subtitle-track-fingerprint")
+@MatchingMethod("Lcom/google/android/libraries/youtube/player/subtitles/model/SubtitleTrack;", "t")
+@AutoCaptionsCompatibility
+@Version("0.0.1")
+object SubtitleTrackFingerprint : MethodFingerprint(
+ "Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
+ Opcode.CONST_STRING,
+ Opcode.INVOKE_VIRTUAL,
+ Opcode.MOVE_RESULT_OBJECT,
+ Opcode.INVOKE_VIRTUAL,
+ Opcode.MOVE_RESULT,
+ Opcode.RETURN,
+ ),
+ strings = listOf("DISABLE_CAPTIONS_OPTION")
+)
\ No newline at end of file
diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/patch/AutoCaptionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/patch/AutoCaptionsPatch.kt
new file mode 100644
index 000000000..9f5012cdb
--- /dev/null
+++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/patch/AutoCaptionsPatch.kt
@@ -0,0 +1,80 @@
+package app.revanced.patches.youtube.layout.autocaptions.patch
+
+import app.revanced.patcher.annotation.Description
+import app.revanced.patcher.annotation.Name
+import app.revanced.patcher.annotation.Version
+import app.revanced.patcher.data.impl.BytecodeData
+import app.revanced.patcher.extensions.addInstructions
+import app.revanced.patcher.patch.PatchResult
+import app.revanced.patcher.patch.PatchResultSuccess
+import app.revanced.patcher.patch.annotations.DependsOn
+import app.revanced.patcher.patch.annotations.Patch
+import app.revanced.patcher.patch.impl.BytecodePatch
+import app.revanced.patches.youtube.layout.autocaptions.annotations.AutoCaptionsCompatibility
+import app.revanced.patches.youtube.layout.autocaptions.fingerprints.StartVideoInformerFingerprint
+import app.revanced.patches.youtube.layout.autocaptions.fingerprints.SubtitleButtonControllerFingerprint
+import app.revanced.patches.youtube.layout.autocaptions.fingerprints.SubtitleTrackFingerprint
+import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
+import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
+import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
+import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
+
+@Patch
+@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
+@Name("disable-auto-captions")
+@Description("Disable forced captions from being automatically enabled.")
+@AutoCaptionsCompatibility
+@Version("0.0.1")
+class AutoCaptionsPatch : BytecodePatch(
+ listOf(
+ StartVideoInformerFingerprint, SubtitleButtonControllerFingerprint, SubtitleTrackFingerprint
+ )
+) {
+ override fun execute(data: BytecodeData): PatchResult {
+ SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
+ SwitchPreference(
+ "revanced_autocaptions_enabled",
+ StringResource("revanced_autocaptions_enabled_title", "Disable auto-captions"),
+ false,
+ StringResource("revanced_autocaptions_summary_on", "Auto-captions are disabled"),
+ StringResource("revanced_autocaptions_summary_off", "Auto-captions are enabled")
+ )
+ )
+
+ val startVideoInformerMethod = StartVideoInformerFingerprint.result!!.mutableMethod
+
+ startVideoInformerMethod.addInstructions(
+ 0, """
+ const/4 v0, 0x0
+ sput-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
+ """
+ )
+
+ val subtitleButtonControllerMethod = SubtitleButtonControllerFingerprint.result!!.mutableMethod
+
+ subtitleButtonControllerMethod.addInstructions(
+ 0, """
+ const/4 v0, 0x1
+ sput-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
+ """
+ )
+
+ val subtitleTrackMethod = SubtitleTrackFingerprint.result!!.mutableMethod
+
+ subtitleTrackMethod.addInstructions(
+ 0, """
+ invoke-static {}, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->autoCaptionsEnabled()Z
+ move-result v0
+ if-eqz v0, :auto_captions_enabled
+ sget-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
+ if-nez v0, :auto_captions_enabled
+ const/4 v0, 0x1
+ return v0
+ :auto_captions_enabled
+ nop
+ """
+ )
+
+ return PatchResultSuccess()
+ }
+}
diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/customthemes/patch/CustomThemePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/customthemes/patch/CustomThemePatch.kt
index 3d3550867..3577b1ead 100644
--- a/src/main/kotlin/app/revanced/patches/youtube/layout/customthemes/patch/CustomThemePatch.kt
+++ b/src/main/kotlin/app/revanced/patches/youtube/layout/customthemes/patch/CustomThemePatch.kt
@@ -4,7 +4,10 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.ResourceData
-import app.revanced.patcher.patch.*
+import app.revanced.patcher.patch.OptionsContainer
+import app.revanced.patcher.patch.PatchOption
+import app.revanced.patcher.patch.PatchResult
+import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch
@@ -15,20 +18,24 @@ import org.w3c.dom.Element
@Patch
@DependsOn([FixLocaleConfigErrorPatch::class])
@Name("custom-theme")
-@Description("Enables a custom theme.")
+@Description("Applies a custom theme.")
@CustomThemeCompatibility
@Version("0.0.1")
class CustomThemePatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
- val theme =
- Themes.of(themeOption.value!!) ?: return PatchResultError("The theme '$themeOption' does not exist.")
+ val backgroundColor = backgroundColor!!
data.xmlEditor["res/values/colors.xml"].use { editor ->
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
for (i in 0 until resourcesNode.childNodes.length) {
val node = resourcesNode.childNodes.item(i) as? Element ?: continue
- node.textContent = theme.apply(node.getAttribute("name")) ?: continue
+
+ node.textContent = when (node.getAttribute("name")) {
+ "yt_black1", "yt_black1_opacity95", "yt_black2", "yt_black3", "yt_black4",
+ "yt_status_bar_background_dark" -> backgroundColor
+ else -> continue
+ }
}
}
@@ -36,32 +43,13 @@ class CustomThemePatch : ResourcePatch() {
}
companion object : OptionsContainer() {
- var themeOption = option(
- PatchOption.StringListOption(
- key = "theme",
- default = Themes.AMOLED.name,
- options = Themes.names,
- title = "Theme",
- description = "Select a theme.",
- required = true
+ var backgroundColor: String? by option(
+ PatchOption.StringOption(
+ key = "darkThemeBackgroundColor",
+ default = "@android:color/black",
+ title = "Background color for the dark theme",
+ description = "The background color of the dark theme. Can be a hex color or a resource reference.",
)
)
}
-
- enum class Themes(val apply: (String) -> String?) {
- AMOLED({ nodeName ->
- when (nodeName) {
- "yt_black1", "yt_black1_opacity95", "yt_black2", "yt_black3", "yt_black4",
- "yt_status_bar_background_dark" -> "@android:color/black"
- "yt_selected_nav_label_dark" -> "#ffdf0000"
- else -> null
- }
- });
-
- companion object {
- val names = values().map { it.name }
-
- fun of(name: String) = values().firstOrNull { it.name == name }
- }
- }
}
\ No newline at end of file
diff --git a/src/main/resources/downloads/drawable/revanced_yt_download_button.xml b/src/main/resources/downloads/drawable/revanced_yt_download_button.xml
index 885605ca3..69ab6992b 100644
--- a/src/main/resources/downloads/drawable/revanced_yt_download_button.xml
+++ b/src/main/resources/downloads/drawable/revanced_yt_download_button.xml
@@ -1,4 +1,4 @@
-
+