Skip to content

Commit

Permalink
fix(YouTube - Hook YouTube Music actions): App crashes when first ins…
Browse files Browse the repository at this point in the history
…talled
  • Loading branch information
anddea committed Oct 23, 2024
1 parent 23958f4 commit 554ebec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ private static boolean isYouTubeMusicEnabled() {
return ExtendedUtils.isPackageEnabled(PACKAGE_NAME_YOUTUBE_MUSIC);
}

// Modified by a patch. Do not touch.
public static String getRVXMusicPackageName() {
return "com.google.android.apps.youtube.music";
}

public static final class HookYouTubeMusicAvailability implements Setting.Availability {
@Override
public boolean isAvailable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ public static boolean ToolBarComponents() {
return false;
}

// Modified by a patch. Do not touch.
public static String RVXMusicPackageName() {
return "com.google.android.apps.youtube.music";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import app.revanced.integrations.youtube.patches.misc.WatchHistoryPatch.WatchHistoryType;
import app.revanced.integrations.youtube.patches.misc.client.AppClient.ClientType;
import app.revanced.integrations.youtube.patches.shorts.AnimationFeedbackPatch.AnimationType;
import app.revanced.integrations.youtube.patches.utils.PatchStatus;
import app.revanced.integrations.youtube.sponsorblock.SponsorBlockSettings;

@SuppressWarnings("unused")
Expand Down Expand Up @@ -191,7 +192,7 @@ public class Settings extends BaseSettings {
public static final StringSetting EXTERNAL_DOWNLOADER_PACKAGE_NAME_PLAYLIST = new StringSetting("revanced_external_downloader_package_name_playlist", "com.deniscerri.ytdl");
public static final BooleanSetting OVERRIDE_YOUTUBE_MUSIC_BUTTON = new BooleanSetting("revanced_override_youtube_music_button", FALSE, true
, new YouTubeMusicActionsPatch.HookYouTubeMusicAvailability());
public static final StringSetting THIRD_PARTY_YOUTUBE_MUSIC_PACKAGE_NAME = new StringSetting("revanced_third_party_youtube_music_package_name", YouTubeMusicActionsPatch.getRVXMusicPackageName(), true
public static final StringSetting THIRD_PARTY_YOUTUBE_MUSIC_PACKAGE_NAME = new StringSetting("revanced_third_party_youtube_music_package_name", PatchStatus.RVXMusicPackageName(), true
, new YouTubeMusicActionsPatch.HookYouTubeMusicPackageNameAvailability());

// PreferenceScreen: General - Settings menu
Expand Down

0 comments on commit 554ebec

Please sign in to comment.