Skip to content

Commit

Permalink
feat(youtube): spoof-app-version patch (#282)
Browse files Browse the repository at this point in the history
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
  • Loading branch information
LisoUseInAIKyrios and oSumAtrIX committed Jan 10, 2023
1 parent a80fab7 commit fd818a3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
@@ -0,0 +1,15 @@
package app.revanced.integrations.patches;

import app.revanced.integrations.settings.SettingsEnum;

public class SpoofAppVersionPatch {

public static String getYouTubeVersionOverride(String version) {
if (SettingsEnum.SPOOF_APP_VERSION.getBoolean()){
// Override with the most recent version that does not show the new UI player layout.
// If the new UI shows up for some users, then change this to an older version (such as 17.29.34).
return "17.30.34";
}
return version;
}
}
@@ -1,7 +1,6 @@
package app.revanced.integrations.settings;

import android.content.Context;
import android.util.Log;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -68,6 +67,7 @@ public enum SettingsEnum {
DISABLE_STARTUP_SHORTS_PLAYER("revanced_startup_shorts_player_enabled", false, ReturnType.BOOLEAN),
PLAYER_POPUP_PANELS("revanced_player_popup_panels_enabled", false, ReturnType.BOOLEAN),
USE_TABLET_MINIPLAYER("revanced_tablet_miniplayer", false, ReturnType.BOOLEAN, true),
SPOOF_APP_VERSION("revanced_spoof_app_version", false, ReturnType.BOOLEAN, true),
WIDE_SEARCHBAR("revanced_wide_searchbar", false, ReturnType.BOOLEAN, true),
HIDE_ALBUM_CARDS("revanced_hide_album_cards", false, ReturnType.BOOLEAN, true),
HIDE_ARTIST_CARD("revanced_hide_artist_card", false, ReturnType.BOOLEAN),
Expand Down

0 comments on commit fd818a3

Please sign in to comment.