feat(YouTube Music): add Spoof client patch

This commit is contained in:
inotia00
2024-12-08 15:49:46 +09:00
parent 96f2db9d3b
commit 481b1537e0
12 changed files with 557 additions and 17 deletions

View File

@ -157,7 +157,7 @@ public class AppClient {
* Device manufacturer.
*/
@Nullable
public final String make;
public final String deviceMake;
/**
* Device model, equivalent to {@link Build#MODEL} (System property: ro.product.model)
@ -197,7 +197,7 @@ public class AppClient {
public final boolean canLogin;
ClientType(int id,
@Nullable String make,
@Nullable String deviceMake,
String deviceModel,
String clientVersion,
@Nullable String osName,
@ -208,7 +208,7 @@ public class AppClient {
) {
this.friendlyName = str("revanced_spoof_streaming_data_type_entry_" + name().toLowerCase());
this.id = id;
this.make = make;
this.deviceMake = deviceMake;
this.deviceModel = deviceModel;
this.clientVersion = clientVersion;
this.osName = osName;

View File

@ -56,8 +56,8 @@ public final class PlayerRoutes {
client.put("clientVersion", clientType.clientVersion);
client.put("deviceModel", clientType.deviceModel);
client.put("osVersion", clientType.osVersion);
if (clientType.make != null) {
client.put("deviceMake", clientType.make);
if (clientType.deviceMake != null) {
client.put("deviceMake", clientType.deviceMake);
}
if (clientType.osName != null) {
client.put("osName", clientType.osName);