diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt
index b56396ef15..a5c58450b3 100644
--- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt
+++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt
@@ -20,7 +20,7 @@ internal object ReturnYouTubeDislikeResourcePatch : ResourcePatch() {
Preference(
"revanced_ryd_settings_title",
"revanced_ryd_settings_summary",
- SettingsPatch.createReVancedSettingsIntent("ryd_settings_intent")
+ SettingsPatch.createReVancedSettingsIntent("revanced_ryd_settings_intent")
)
)
diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockResourcePatch.kt
index e0b4f7a3ae..6d1bf548ca 100644
--- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockResourcePatch.kt
+++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockResourcePatch.kt
@@ -1,6 +1,7 @@
package app.revanced.patches.youtube.layout.sponsorblock
import app.revanced.patcher.data.ResourceContext
+import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.shared.mapping.misc.ResourceMappingPatch
@@ -18,9 +19,9 @@ internal object SponsorBlockResourcePatch : ResourcePatch() {
StringsPatch.includePatchStrings("SponsorBlock")
SettingsPatch.addPreference(
Preference(
- "revanced_sponsorblock_settings_title",
- "revanced_sponsorblock_settings_summary",
- SettingsPatch.createReVancedSettingsIntent("sponsorblock_settings_intent")
+ "revanced_sb_settings_title",
+ "revanced_sb_settings_summary",
+ SettingsPatch.createReVancedSettingsIntent("revanced_sb_settings_intent")
)
)
@@ -34,28 +35,18 @@ internal object SponsorBlockResourcePatch : ResourcePatch() {
"youtube/sponsorblock",
ResourceGroup(
"drawable",
- "revanced_ic_sb_adjust.xml",
- "revanced_ic_sb_compare.xml",
- "revanced_ic_sb_edit.xml",
- "revanced_ic_sb_logo.xml",
- "revanced_ic_sb_publish.xml",
- "revanced_ic_sb_voting.xml"
+ "revanced_sb_adjust.xml",
+ "revanced_sb_compare.xml",
+ "revanced_sb_edit.xml",
+ "revanced_sb_logo.xml",
+ "revanced_sb_publish.xml",
+ "revanced_sb_voting.xml"
),
ResourceGroup(
"layout",
- "inline_sponsor_overlay.xml",
- "new_segment.xml",
- "skip_sponsor_button.xml"
- ),
- ResourceGroup(
- // required resource for back button, because when the base APK is used, this resource will not exist
- "drawable",
- "revanced_ic_sb_adjust.xml",
- "revanced_ic_sb_compare.xml",
- "revanced_ic_sb_edit.xml",
- "revanced_ic_sb_logo.xml",
- "revanced_ic_sb_publish.xml",
- "revanced_ic_sb_voting.xml"
+ "revanced_sb_inline_sponsor_overlay.xml",
+ "revanced_sb_new_segment.xml",
+ "revanced_sb_skip_sponsor_button.xml"
),
ResourceGroup(
// required resource for back button, because when the base APK is used, this resource will not exist
@@ -71,6 +62,8 @@ internal object SponsorBlockResourcePatch : ResourcePatch() {
val hostingResourceStream =
classLoader.getResourceAsStream("youtube/sponsorblock/host/layout/youtube_controls_layout.xml")!!
+ var modifiedYouTubeControlsLayout = false
+
val targetXmlEditor = context.xmlEditor["res/layout/youtube_controls_layout.xml"]
"RelativeLayout".copyXmlNode(
context.xmlEditor[hostingResourceStream],
@@ -94,8 +87,11 @@ internal object SponsorBlockResourcePatch : ResourcePatch() {
view.attributes.getNamedItem("android:layout_toStartOf").nodeValue = votingButtonId
+ modifiedYouTubeControlsLayout = true
break
}
+
+ if (!modifiedYouTubeControlsLayout) throw PatchException("Could not modify control layout")
}.close() // close afterwards
}
}
\ No newline at end of file
diff --git a/src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_adjust.xml b/src/main/resources/youtube/sponsorblock/drawable/revanced_sb_adjust.xml
similarity index 100%
rename from src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_adjust.xml
rename to src/main/resources/youtube/sponsorblock/drawable/revanced_sb_adjust.xml
diff --git a/src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_compare.xml b/src/main/resources/youtube/sponsorblock/drawable/revanced_sb_compare.xml
similarity index 100%
rename from src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_compare.xml
rename to src/main/resources/youtube/sponsorblock/drawable/revanced_sb_compare.xml
diff --git a/src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_edit.xml b/src/main/resources/youtube/sponsorblock/drawable/revanced_sb_edit.xml
similarity index 100%
rename from src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_edit.xml
rename to src/main/resources/youtube/sponsorblock/drawable/revanced_sb_edit.xml
diff --git a/src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_logo.xml b/src/main/resources/youtube/sponsorblock/drawable/revanced_sb_logo.xml
similarity index 100%
rename from src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_logo.xml
rename to src/main/resources/youtube/sponsorblock/drawable/revanced_sb_logo.xml
diff --git a/src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_publish.xml b/src/main/resources/youtube/sponsorblock/drawable/revanced_sb_publish.xml
similarity index 100%
rename from src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_publish.xml
rename to src/main/resources/youtube/sponsorblock/drawable/revanced_sb_publish.xml
diff --git a/src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_voting.xml b/src/main/resources/youtube/sponsorblock/drawable/revanced_sb_voting.xml
similarity index 100%
rename from src/main/resources/youtube/sponsorblock/drawable/revanced_ic_sb_voting.xml
rename to src/main/resources/youtube/sponsorblock/drawable/revanced_sb_voting.xml
diff --git a/src/main/resources/youtube/sponsorblock/host/layout/youtube_controls_layout.xml b/src/main/resources/youtube/sponsorblock/host/layout/youtube_controls_layout.xml
index aaf35e568c..7c2d539183 100644
--- a/src/main/resources/youtube/sponsorblock/host/layout/youtube_controls_layout.xml
+++ b/src/main/resources/youtube/sponsorblock/host/layout/youtube_controls_layout.xml
@@ -1,7 +1,7 @@
+ android:src="@drawable/revanced_sb_logo" />
+ android:src="@drawable/revanced_sb_voting" />
diff --git a/src/main/resources/youtube/sponsorblock/layout/inline_sponsor_overlay.xml b/src/main/resources/youtube/sponsorblock/layout/revanced_sb_inline_sponsor_overlay.xml
similarity index 100%
rename from src/main/resources/youtube/sponsorblock/layout/inline_sponsor_overlay.xml
rename to src/main/resources/youtube/sponsorblock/layout/revanced_sb_inline_sponsor_overlay.xml
diff --git a/src/main/resources/youtube/sponsorblock/layout/new_segment.xml b/src/main/resources/youtube/sponsorblock/layout/revanced_sb_new_segment.xml
similarity index 94%
rename from src/main/resources/youtube/sponsorblock/layout/new_segment.xml
rename to src/main/resources/youtube/sponsorblock/layout/revanced_sb_new_segment.xml
index 01703666e9..30204a3910 100644
--- a/src/main/resources/youtube/sponsorblock/layout/new_segment.xml
+++ b/src/main/resources/youtube/sponsorblock/layout/revanced_sb_new_segment.xml
@@ -54,7 +54,7 @@
android:paddingTop="3.0dip"
android:paddingEnd="10.0dip"
android:paddingBottom="3.0dip"
- android:src="@drawable/revanced_ic_sb_adjust" />
+ android:src="@drawable/revanced_sb_adjust" />
+ android:src="@drawable/revanced_sb_compare" />
+ android:src="@drawable/revanced_sb_edit" />
+ android:src="@drawable/revanced_sb_publish" />
\ No newline at end of file
diff --git a/src/main/resources/youtube/sponsorblock/layout/skip_sponsor_button.xml b/src/main/resources/youtube/sponsorblock/layout/revanced_sb_skip_sponsor_button.xml
similarity index 100%
rename from src/main/resources/youtube/sponsorblock/layout/skip_sponsor_button.xml
rename to src/main/resources/youtube/sponsorblock/layout/revanced_sb_skip_sponsor_button.xml
diff --git a/src/main/resources/youtube/stringspatch/values/SponsorBlock.xml b/src/main/resources/youtube/stringspatch/values/SponsorBlock.xml
index dd61528bfb..7d6d3b56e0 100644
--- a/src/main/resources/youtube/stringspatch/values/SponsorBlock.xml
+++ b/src/main/resources/youtube/stringspatch/values/SponsorBlock.xml
@@ -1,7 +1,7 @@
- SponsorBlock
- SponsorBlock related settings
+ SponsorBlock
+ SponsorBlock related settings
Enable SponsorBlock
SponsorBlock is a crowd-sourced system for skipping annoying parts of YouTube videos
diff --git a/src/main/resources/youtube/translation/values-fr-v26/strings.xml b/src/main/resources/youtube/translation/values-fr-v26/strings.xml
index 61f377cd2c..c48f22c363 100644
--- a/src/main/resources/youtube/translation/values-fr-v26/strings.xml
+++ b/src/main/resources/youtube/translation/values-fr-v26/strings.xml
@@ -329,7 +329,7 @@
L\'ancien menu de qualité vidéo n\'est pas utilisé
L\'ancien menu de qualité vidéo est utilisé
Utiliser l\'ancien menu du lecteur de qualité vidéo
- Paramètres liés à SponsorBlock
+ Paramètres liés à SponsorBlock
Version non usurpée
Version usurpée
17.30.35 - Restaurer l\'ancienne disposition de l\'interface utilisateur
diff --git a/src/main/resources/youtube/translation/values-iw-v26/strings.xml b/src/main/resources/youtube/translation/values-iw-v26/strings.xml
index 30b03cfd06..93abf61a8f 100644
--- a/src/main/resources/youtube/translation/values-iw-v26/strings.xml
+++ b/src/main/resources/youtube/translation/values-iw-v26/strings.xml
@@ -330,7 +330,7 @@
לא נעשה שימוש בתפריט איכות הווידאו הישן
נעשה שימוש בתפריט איכות וידאו ישן
השתמש בתפריט נגן איכות וידאו ישן
- הגדרות הקשורות לחסימת חסות
+ הגדרות הקשורות לחסימת חסות
הגרסה לא מזויפת
הגרסה מזויפת
17.30.35 - שחזור פריסת ממשק משתמש ישנה
diff --git a/src/main/resources/youtube/translation/values-ug-v26/strings.xml b/src/main/resources/youtube/translation/values-ug-v26/strings.xml
index b2f8876dc1..867bf6305d 100644
--- a/src/main/resources/youtube/translation/values-ug-v26/strings.xml
+++ b/src/main/resources/youtube/translation/values-ug-v26/strings.xml
@@ -331,7 +331,7 @@
كونا سىن سۈپىتى تىزىملىكى ئىشلىتىلمەيدۇ
كونا سىن سۈپىتى تىزىملىكى ئىشلىتىلگەن
كونا سىن سۈپىتى قويغۇچ تىزىملىكىنى ئىشلىتىڭ
- SponsorBlock مۇناسىۋەتلىك تەڭشەكلەر
+ SponsorBlock مۇناسىۋەتلىك تەڭشەكلەر
نەشىرى بۇزۇلمىدى
نەشىرى بۇزۇلدى
17.30.35 - كونا UI ئورۇنلاشتۇرۇشىنى ئەسلىگە كەلتۈرۈڭ
diff --git a/src/main/resources/youtube/translation/values-ur-v26/strings.xml b/src/main/resources/youtube/translation/values-ur-v26/strings.xml
index ebab01baf7..f8897d1a17 100644
--- a/src/main/resources/youtube/translation/values-ur-v26/strings.xml
+++ b/src/main/resources/youtube/translation/values-ur-v26/strings.xml
@@ -329,7 +329,7 @@
پرانا ویڈیو کوالٹی مینو استعمال نہیں کیا جاتا ہے۔
پرانا ویڈیو کوالٹی مینو استعمال کیا جاتا ہے۔
پرانا ویڈیو کوالٹی پلیئر مینو استعمال کریں۔
- اسپانسر بلاک سے متعلق ترتیبات
+ اسپانسر بلاک سے متعلق ترتیبات
ورژن جعلی نہیں ہے۔
ورژن جعلساز
17.30.35 - پرانے UI لے آؤٹ کو بحال کریں۔
diff --git a/src/main/resources/youtube/translation/values-zh-v26/strings.xml b/src/main/resources/youtube/translation/values-zh-v26/strings.xml
index 405ac7e5d0..fffa860d41 100644
--- a/src/main/resources/youtube/translation/values-zh-v26/strings.xml
+++ b/src/main/resources/youtube/translation/values-zh-v26/strings.xml
@@ -329,7 +329,7 @@
不使用旧的视频质量菜单
使用旧的视频质量菜单
使用旧的视频质量播放器菜单
- SponsorBlock 相关设置
+ SponsorBlock 相关设置
版本未被欺骗
版本欺骗
17.30.35 - 恢复旧的 UI 布局
diff --git a/src/main/resources/youtube/translation/values-zu-v26/strings.xml b/src/main/resources/youtube/translation/values-zu-v26/strings.xml
index dc6cc81746..b9f9ac3bcd 100644
--- a/src/main/resources/youtube/translation/values-zu-v26/strings.xml
+++ b/src/main/resources/youtube/translation/values-zu-v26/strings.xml
@@ -329,7 +329,7 @@
Imenyu yekhwalithi yevidiyo endala ayisetshenziswa
Kusetshenziswa imenyu yekhwalithi yevidiyo endala
Sebenzisa imenyu yesidlali sekhwalithi yevidiyo endala
- Izilungiselelo ezihlobene ne-SponsorBlock
+ Izilungiselelo ezihlobene ne-SponsorBlock
Inguqulo ayiphazwanga
Inguqulo yonakele
17.30.35 - Buyisela ukwakheka kwe-UI endala