Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Merge branch dev to main #4271

Merged
merged 5 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pull_strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
with:
ref: dev
fetch-depth: 0
clean: true

- name: Pull strings
uses: crowdin/github-action@v2
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [5.8.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.8.0...v5.8.1-dev.1) (2025-01-06)


### Bug Fixes

* **YouTube - Spoof video streams:** Add 'Android Creator' ([#4262](https://github.com/ReVanced/revanced-patches/issues/4262)) ([0479dd2](https://github.com/ReVanced/revanced-patches/commit/0479dd265e09b0accdf6ff6b00c8e938dc5b96c7))

# [5.8.0](https://github.com/ReVanced/revanced-patches/compare/v5.7.2...v5.8.0) (2024-12-30)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,24 @@ public enum ClientType {
ANDROID_VR_NO_AUTH(
28,
"ANDROID_VR",
"Oculus",
"Quest 3",
"Android",
"12",
"com.google.android.apps.youtube.vr.oculus/1.56.21 (Linux; U; Android 12; GB) gzip",
"32", // Android 12.1
"1.56.21",
false,
"Android VR No auth"
),
// Chromecast with Google TV 4K.
// https://dumps.tadiphone.dev/dumps/google/kirkwood
ANDROID_UNPLUGGED(
29,
"ANDROID_UNPLUGGED",
"Google",
"Google TV Streamer",
"Android",
"14",
"com.google.android.apps.youtube.unplugged/8.49.0 (Linux; U; Android 14; GB) gzip",
"34",
Expand All @@ -33,38 +39,56 @@ public enum ClientType {
ANDROID_VR(
ANDROID_VR_NO_AUTH.id,
ANDROID_VR_NO_AUTH.clientName,
ANDROID_VR_NO_AUTH.deviceMake,
ANDROID_VR_NO_AUTH.deviceModel,
ANDROID_VR_NO_AUTH.osName,
ANDROID_VR_NO_AUTH.osVersion,
ANDROID_VR_NO_AUTH.userAgent,
ANDROID_VR_NO_AUTH.androidSdkVersion,
ANDROID_VR_NO_AUTH.clientVersion,
true,
"Android VR"
),
IOS_UNPLUGGED(33,
IOS_UNPLUGGED(
33,
"IOS_UNPLUGGED",
"Apple",
forceAVC()
? "iPhone12,5" // 11 Pro Max (last device with iOS 13)
: "iPhone16,2", // 15 Pro Max
"iOS",
// iOS 13 and earlier uses only AVC. 14+ adds VP9 and AV1.
forceAVC()
? "13.7.17H35" // Last release of iOS 13.
: "18.1.1.22B91",
: "18.2.22C152",
forceAVC()
? "com.google.ios.youtubeunplugged/6.45 (iPhone; U; CPU iOS 13_7 like Mac OS X)"
: "com.google.ios.youtubeunplugged/8.33 (iPhone; U; CPU iOS 18_1_1 like Mac OS X)",
? "com.google.ios.youtubeunplugged/6.45 (iPhone12,5; U; CPU iOS 13_7 like Mac OS X)"
: "com.google.ios.youtubeunplugged/8.49 (iPhone16,2; U; CPU iOS 18_2_22 like Mac OS X)",
null,
// Version number should be a valid iOS release.
// https://www.ipa4fun.com/history/152043/
// Some newer versions can also force AVC,
// but 6.45 is the last version that supports iOS 13.
forceAVC()
? "6.45"
: "8.33",
: "8.49",
true,
forceAVC()
? "iOS TV Force AVC"
: "iOS TV"
),
ANDROID_CREATOR(
14,
"ANDROID_CREATOR",
Build.MANUFACTURER,
Build.MODEL,
"Android",
"11",
"com.google.android.apps.youtube.creator/24.45.100 (Linux; U; Android 11) gzip",
"30",
"24.45.100",
true,
"Android Creator"
);

private static boolean forceAVC() {
Expand All @@ -80,10 +104,20 @@ private static boolean forceAVC() {
public final String clientName;

/**
* Device model, equivalent to {@link Build#MODEL} (System property: ro.product.model)
* Device model, equivalent to {@link Build#MANUFACTURER} (System property: ro.product.vendor.manufacturer)
*/
public final String deviceMake;

/**
* Device model, equivalent to {@link Build#MODEL} (System property: ro.product.vendor.model)
*/
public final String deviceModel;

/**
* Device OS name.
*/
public final String osName;

/**
* Device OS version.
*/
Expand Down Expand Up @@ -118,7 +152,9 @@ private static boolean forceAVC() {

ClientType(int id,
String clientName,
String deviceMake,
String deviceModel,
String osName,
String osVersion,
String userAgent,
@Nullable String androidSdkVersion,
Expand All @@ -127,7 +163,9 @@ private static boolean forceAVC() {
String friendlyName) {
this.id = id;
this.clientName = clientName;
this.deviceMake = deviceMake;
this.deviceModel = deviceModel;
this.osName = osName;
this.osVersion = osVersion;
this.userAgent = userAgent;
this.androidSdkVersion = androidSdkVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,19 @@ public static void fetchStreams(String url, Map<String, String> requestHeaders)
return;
}

// 'get_drm_license' has no video id and appears to happen when waiting for a paid video to start.
// 'heartbeat' has no video id and appears to be only after playback has started.
// 'refresh' has no video id and appears to happen when waiting for a livestream to start.
// 'ad_break' has no video id.
if (path.contains("heartbeat") || path.contains("refresh") || path.contains("ad_break")) {
if (path.contains("get_drm_license") || path.contains("heartbeat")
|| path.contains("refresh") || path.contains("ad_break")) {
Logger.printDebug(() -> "Ignoring path: " + path);
return;
}

String id = uri.getQueryParameter("id");
if (id == null) {
Logger.printException(() -> "Ignoring request with no id. Url: " + url);
Logger.printException(() -> "Ignoring request with no id: " + url);
return;
}

Expand Down Expand Up @@ -220,8 +222,8 @@ public static String appendSpoofedClient(String videoFormat) {
public static final class AudioStreamLanguageOverrideAvailability implements Setting.Availability {
@Override
public boolean isAvailable() {
return !BaseSettings.SPOOF_VIDEO_STREAMS.get()
|| BaseSettings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get() == ClientType.ANDROID_VR_NO_AUTH;
return BaseSettings.SPOOF_VIDEO_STREAMS.get()
&& BaseSettings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get() == ClientType.ANDROID_VR_NO_AUTH;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ static String createInnertubeBody(ClientType clientType) {
client.put("hl", language.getLanguage());
client.put("clientName", clientType.clientName);
client.put("clientVersion", clientType.clientVersion);
client.put("deviceMake", clientType.deviceMake);
client.put("deviceModel", clientType.deviceModel);
client.put("osName", clientType.osName);
client.put("osVersion", clientType.osVersion);
if (clientType.androidSdkVersion != null) {
client.put("androidSdkVersion", clientType.androidSdkVersion);
Expand All @@ -76,6 +78,7 @@ static HttpURLConnection getPlayerResponseConnectionFromRoute(Route.CompiledRout

connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("User-Agent", clientType.userAgent);
connection.setRequestProperty("X-YouTube-Client-Version", String.valueOf(clientType.id));

connection.setUseCaches(false);
connection.setDoOutput(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ private static ByteBuffer fetch(String videoId, Map<String, String> playerHeader
// gzip encoding doesn't response with content length (-1),
// but empty response body does.
if (connection.getContentLength() == 0) {
if (BaseSettings.DEBUG.get()) {
Logger.printException(() -> "Ignoring empty client: " + clientType);
if (BaseSettings.DEBUG.get() && BaseSettings.DEBUG_TOAST_ON_ERROR.get()) {
Utils.showToastShort("Ignoring empty spoof stream client: " + clientType);
}
} else {
try (InputStream inputStream = new BufferedInputStream(connection.getInputStream());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,20 @@ private void updateUI() {
(clientType == ClientType.IOS_UNPLUGGED
? "ios_tv"
: "android");
setTitle(str(key + "_title"));
setSummary(str(key + "_summary"));
String title = str(key + "_title");
String summary = str(key + "_summary");

// Android VR supports AV1 but all other clients do not.
if (clientType != ClientType.ANDROID_VR && clientType != ClientType.ANDROID_VR_NO_AUTH) {
summary += '\n' + str("revanced_spoof_video_streams_about_no_av1");

// Android Creator does not support HDR.
if (clientType == ClientType.ANDROID_CREATOR) {
summary += '\n' + str("revanced_spoof_video_streams_about_no_hdr");
}
}

setTitle(title);
setSummary(summary);
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
org.gradle.parallel = true
android.useAndroidX = true
kotlin.code.style = official
version = 5.8.0
version = 5.8.1-dev.1
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,8 @@ AVC لديه حد أقصى للدقة 1080p، لا يتوفر ترميز الص
<string name="revanced_spoof_video_streams_about_android_summary">"• قائمة المقطع الصوتي مفقودة
• مستوى الصوت الثابت غير متاح
• فرض الصوت الأصلي غير متوفر"</string>
<string name="revanced_spoof_video_streams_about_no_av1">• لا يوجد ترميز الفيديو AV1</string>
<string name="revanced_spoof_video_streams_about_no_hdr">• لا يوجد فيديو HDR</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_title">عرض في إحصاءات تقنية</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_on">يتم عرض نوع العميل في إحصاءات تقنية</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_off">تم إخفاء نوع العميل في إحصاءات تقنية</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,8 @@ AVC maksimum 1080p görüntü imkanına malikdir, Opus audio kodlama olmur və v
<string name="revanced_spoof_video_streams_about_android_summary">"• Səs treki menyusu yoxdur
• Sabit səs səviyyəsi yoxdur
• İlkin səsi məcbur etmə mümkün deyil"</string>
<string name="revanced_spoof_video_streams_about_no_av1">• AV1 video kodlayıcı yoxdur</string>
<string name="revanced_spoof_video_streams_about_no_hdr">• HDR video yoxdur</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_title">İstək üçün Statistikada göstər</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_on">Qəbuledici növü Nerdlər üçün statistikada göstərilir</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_off">Qəbuledici nerd üçün Statistikada gizlidir</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,8 @@ AVC мае максімальнае дазвол 1080p, аўдыёкадэк Opu
<string name="revanced_spoof_video_streams_about_android_summary">"• Меню гукавой дарожкі адсутнічае
• Стабільны гук недаступны
• Прымусовае арыгінальнае аўдыё недаступна"</string>
<string name="revanced_spoof_video_streams_about_no_av1">• Няма відэакідавання AV1</string>
<string name="revanced_spoof_video_streams_about_no_hdr">• Няма відэа HDR</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_title">Паказаць у статыстыцы для спецыялістаў</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_on">Тып кліента адлюстроўваецца ў статыстыцы для спецыялістаў</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_off">Кліент схаваны ў статыстыцы для спецыялістаў</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,8 @@ AVC има максимална резолюция от 1080p, Opus аудио
<string name="revanced_spoof_video_streams_about_android_summary">"• Lipsva menju za audio pisti
• Ne e nali4na stabilna glasnost
• Ne e nali4na forsirana originalna audio pista"</string>
<string name="revanced_spoof_video_streams_about_no_av1">• Без AV1 видео кодек</string>
<string name="revanced_spoof_video_streams_about_no_hdr">• Без HDR видео</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_title">Poka6i v Statistiki za nerds</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_on">Tipът na klienta se poka6va v Statistiki za nerds</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_off">Klientът e skriт v Statistiki za nerds</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,8 @@ AVC-এর সর্বোচ্চ রেজোলিউশন হল 1080p, Op
<string name="revanced_spoof_video_streams_about_android_summary">"• অডিও ট্র্যাক মেনু নেই
• স্থির ভলিউম পাওয়া যায় না
• মূল অডিও জোর করে চালু করা যায় না"</string>
<string name="revanced_spoof_video_streams_about_no_av1">• কোনো AV1 ভিডিও কোডেক নেই</string>
<string name="revanced_spoof_video_streams_about_no_hdr">• কোনো HDR ভিডিও নেই</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_title">স্ট্যাটস ফর নার্ডসে দেখান</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_on">স্ট্যাটস ফর নার্ডসে ক্লায়েন্ট প্রকার দেখানো হবে</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_off">স্ট্যাটস ফর নার্ডসে ক্লায়েন্ট লুকানো হবে</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,8 @@ L'AVC té una resolució màxima de 1080p, el còdec d'àudio Opus no està disp
<string name="revanced_spoof_video_streams_about_android_summary">"• Menú de pistes d'àudio no disponible
• El volum estable no està disponible
• Forçar l'àudio original no està disponible"</string>
<string name="revanced_spoof_video_streams_about_no_av1">• Sense còdec de vídeo AV1</string>
<string name="revanced_spoof_video_streams_about_no_hdr">• Sense vídeo HDR</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_title">Mostra a l\'apartat \'Dades per a experts\'</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_on">El tipus de client es mostra a l\'apartat \'Dades per a experts\'</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_off">El client s\'amaga a l\'apartat \'Dades per a experts\'</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,8 @@ AVC má maximální rozlišení 1080p, zvukový kodek Opus není dostupný a př
<string name="revanced_spoof_video_streams_about_android_summary">"• Chybí nabídka zvukových stop
• Není k dispozici stabilní hlasitost
• Není k dispozici možnost vynucení originálního zvuku"</string>
<string name="revanced_spoof_video_streams_about_no_av1">• Žádný video kodek AV1</string>
<string name="revanced_spoof_video_streams_about_no_hdr">• Žádné HDR video</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_title">Zobrazit ve statistikách pro nadšence</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_on">Typ klienta se zobrazuje ve statistikách pro nadšence</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_off">Klient je skrytý ve statistikách pro nadšence</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,8 @@ Videoafspilning virker muligvis ikke"</string>
<string name="revanced_spoof_video_streams_about_android_summary">"• Lydspormenu mangler
• Stabil lydstyrke er ikke tilgængelig
• Gennemtving original lyd er ikke tilgængelig"</string>
<string name="revanced_spoof_video_streams_about_no_av1">• Intet AV1-videokodek</string>
<string name="revanced_spoof_video_streams_about_no_hdr">• Intet HDR-video</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_title">Vis i Statistik for nørder</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_on">Klienttypen vises i Statistik for nørder</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_off">Klienten er skjult i Statistik for nørder</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,8 @@ AVC hat eine maximale Auflösung von 1080p, Opus-Audiocodec ist nicht verfügbar
<string name="revanced_spoof_video_streams_about_android_summary">"• Audiospur-Menü fehlt
• Stabile Lautstärke ist nicht verfügbar
• Original-Audio erzwingen ist nicht verfügbar"</string>
<string name="revanced_spoof_video_streams_about_no_av1">• Kein AV1-Videocodec</string>
<string name="revanced_spoof_video_streams_about_no_hdr">• Keine HDR-Videos</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_title">In Statistiken für Nerds anzeigen</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_on">Der Client-Typ wird in den Statistiken für Nerds angezeigt</string>
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_off">Der Client wird in den Statistiken für Nerds ausgeblendet</string>
Expand Down
Loading
Loading