feat(youtube): spoof-app-version patch (#282)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
LisoUseInAIKyrios 2023-01-10 22:27:43 +04:00 committed by GitHub
parent a80fab7070
commit fd818a35f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -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;
@ -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),