mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-01 15:14:34 +02:00
add hide-playlist-card
patch
This commit is contained in:
parent
60bcf6658a
commit
c614a961fa
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.music.ad.video.patch
|
||||
package app.revanced.patches.music.ads.video.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
@ -9,6 +9,7 @@ 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.patches.music.misc.litho.patch.MusicLithoFilterPatch
|
||||
import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||
import app.revanced.patches.shared.patch.videoads.GeneralVideoAdsPatch
|
||||
@ -20,6 +21,7 @@ import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH
|
||||
@DependsOn(
|
||||
[
|
||||
GeneralVideoAdsPatch::class,
|
||||
MusicLithoFilterPatch::class,
|
||||
MusicSettingsPatch::class
|
||||
]
|
||||
)
|
@ -0,0 +1,34 @@
|
||||
package app.revanced.patches.music.layout.playlistcard.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
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.patches.music.misc.litho.patch.MusicLithoFilterPatch
|
||||
import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||
|
||||
@Patch
|
||||
@Name("hide-playlist-card")
|
||||
@Description("Hides the recommand playlist card from home feed.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicLithoFilterPatch::class,
|
||||
MusicSettingsPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeMusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class HidePlaylistCardPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
MusicSettingsPatch.addMusicPreference("navigation", "revanced_hide_playlist_card", "true")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package app.revanced.patches.music.misc.litho.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||
import app.revanced.patches.shared.patch.litho.AbstractLithoFilterPatch
|
||||
import app.revanced.util.integrations.Constants.ADS_PATH
|
||||
|
||||
@YouTubeMusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class MusicLithoFilterPatch : AbstractLithoFilterPatch(
|
||||
"$ADS_PATH/MusicLithoFilterPatch;"
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
super.execute(context)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
@ -30,4 +30,7 @@
|
||||
<string name="revanced_hide_music_ads_summary">"Hide ads before playing a track.
|
||||
(requires an app restart)"</string>
|
||||
<string name="revanced_hide_music_ads_title">Hide music ads</string>
|
||||
<string name="revanced_hide_playlist_card_summary">"Hides the recommand playlist card from homepage.
|
||||
(requires an app restart)"</string>
|
||||
<string name="revanced_hide_playlist_card_title">Hide recommand playlist card</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user