diff --git a/src/main/kotlin/app/revanced/patches/music/player/zenmode/ZenModePatch.kt b/src/main/kotlin/app/revanced/patches/music/player/zenmode/ZenModePatch.kt index 5d657cf3c..f37094810 100644 --- a/src/main/kotlin/app/revanced/patches/music/player/zenmode/ZenModePatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/player/zenmode/ZenModePatch.kt @@ -14,6 +14,7 @@ import app.revanced.patches.music.utils.integrations.Constants.PLAYER import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch import app.revanced.patches.music.utils.settings.CategoryType import app.revanced.patches.music.utils.settings.SettingsPatch +import app.revanced.patches.music.utils.videotype.VideoTypeHookPatch import app.revanced.util.exception import app.revanced.util.getTargetIndex import com.android.tools.smali.dexlib2.Opcode @@ -24,7 +25,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction description = "Adds an option to change the player background to light grey to reduce eye strain.", dependencies = [ SettingsPatch::class, - SharedResourceIdPatch::class + SharedResourceIdPatch::class, + VideoTypeHookPatch::class ], compatiblePackages = [ CompatiblePackage( @@ -97,6 +99,12 @@ object ZenModePatch : BytecodePatch( "revanced_enable_zen_mode", "false" ) + SettingsPatch.addMusicPreference( + CategoryType.PLAYER, + "revanced_enable_zen_mode_podcast", + "false", + "revanced_enable_zen_mode" + ) } } \ No newline at end of file diff --git a/src/main/resources/music/settings/host/values/strings.xml b/src/main/resources/music/settings/host/values/strings.xml index 3eb6286ee..0b7291802 100644 --- a/src/main/resources/music/settings/host/values/strings.xml +++ b/src/main/resources/music/settings/host/values/strings.xml @@ -75,6 +75,8 @@ Some features may not work properly in the old player layout." Enable save video quality Enables swipe down to dismiss miniplayer. Enable swipe to dismiss miniplayer + Zen mode is also applied to podcasts. + Enable zen mode in podcasts Changes the player background to light grey to reduce eye strain. Enable zen mode Export settings to file