From 4150c488004167587cd029d82e76022e54e47535 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 08:51:34 -0800 Subject: [PATCH 01/75] Catch up to 12.6.32 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- CHANGELOG.md | 2 +- VERSION | 2 +- client/package-lock.json | 4 ++-- client/package.json | 2 +- client/src-tauri/Cargo.lock | 30 ++++++++++++------------ client/src-tauri/Cargo.toml | 2 +- client/src-tauri/tauri.conf.json | 2 +- engine/Cargo.lock | 40 ++++++++++++++++---------------- engine/Cargo.toml | 2 +- payload/include/config.h | 2 +- 10 files changed, 44 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ac02fe7b..9d23251d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ What's new in ps5upload, written for humans. --- -## Unreleased +## 12.6.32 **Storage** - **Files shows the right free space (#944).** Files kept its own copy of the drives, and Refresh didn't read it again, so a chip could show 98 GiB when the drive had 163 GiB. Every screen that shows drives now reads the same list: on Refresh, when a screen comes back, and when a job on that console ends. diff --git a/VERSION b/VERSION index 846141b52..ada43bfb9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.6.31 +12.6.32 diff --git a/client/package-lock.json b/client/package-lock.json index 66f4ccf98..951c6bde5 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "ps5upload-client", - "version": "12.6.31", + "version": "12.6.32", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ps5upload-client", - "version": "12.6.31", + "version": "12.6.32", "dependencies": { "@tauri-apps/api": "^2.12.5", "@tauri-apps/plugin-dialog": "^2.8.4", diff --git a/client/package.json b/client/package.json index a337b5f1a..8521ea10c 100644 --- a/client/package.json +++ b/client/package.json @@ -2,7 +2,7 @@ "name": "ps5upload-client", "private": true, "type": "module", - "version": "12.6.31", + "version": "12.6.32", "description": "The all-in-one PS5 companion app.", "homepage": "https://github.com/phantomptr/ps5upload", "author": "PhantomPtr ", diff --git a/client/src-tauri/Cargo.lock b/client/src-tauri/Cargo.lock index 81ca9682f..c24c2d5a9 100644 --- a/client/src-tauri/Cargo.lock +++ b/client/src-tauri/Cargo.lock @@ -4743,7 +4743,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-exfat" -version = "12.6.31" +version = "12.6.32" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -4752,14 +4752,14 @@ dependencies = [ [[package]] name = "ps5-dump-forge-patch" -version = "12.6.31" +version = "12.6.32" dependencies = [ "crc32fast", ] [[package]] name = "ps5-dump-forge-pfs" -version = "12.6.31" +version = "12.6.32" dependencies = [ "flate2", "ps5-dump-forge-patch", @@ -4768,7 +4768,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-ufs2" -version = "12.6.31" +version = "12.6.32" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -4777,7 +4777,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-zstd" -version = "12.6.31" +version = "12.6.32" dependencies = [ "crc32fast", "getrandom 0.4.3", @@ -4788,7 +4788,7 @@ dependencies = [ [[package]] name = "ps5upload-archive" -version = "12.6.31" +version = "12.6.32" dependencies = [ "anyhow", "crc32fast", @@ -4798,7 +4798,7 @@ dependencies = [ [[package]] name = "ps5upload-ava1" -version = "12.6.31" +version = "12.6.32" dependencies = [ "anyhow", "ava1", @@ -4817,7 +4817,7 @@ dependencies = [ [[package]] name = "ps5upload-convert-core" -version = "12.6.31" +version = "12.6.32" dependencies = [ "blake3", "libc", @@ -4834,7 +4834,7 @@ dependencies = [ [[package]] name = "ps5upload-core" -version = "12.6.31" +version = "12.6.32" dependencies = [ "aes 0.9.2", "aes-gcm 0.11.0", @@ -4868,7 +4868,7 @@ dependencies = [ [[package]] name = "ps5upload-desktop" -version = "12.6.31" +version = "12.6.32" dependencies = [ "anyhow", "ava1", @@ -4910,7 +4910,7 @@ dependencies = [ [[package]] name = "ps5upload-engine" -version = "12.6.31" +version = "12.6.32" dependencies = [ "aes 0.9.2", "aes-gcm 0.11.0", @@ -4974,7 +4974,7 @@ dependencies = [ [[package]] name = "ps5upload-fpkg" -version = "12.6.31" +version = "12.6.32" dependencies = [ "aes 0.9.2", "crc32fast", @@ -4997,7 +4997,7 @@ dependencies = [ [[package]] name = "ps5upload-hub" -version = "12.6.31" +version = "12.6.32" dependencies = [ "axum", "base64 0.23.1", @@ -5011,7 +5011,7 @@ dependencies = [ [[package]] name = "ps5upload-pkg" -version = "12.6.31" +version = "12.6.32" dependencies = [ "aes 0.9.2", "blake3", @@ -5023,7 +5023,7 @@ dependencies = [ [[package]] name = "ps5upload-tailnet" -version = "12.6.31" +version = "12.6.32" dependencies = [ "cc", ] diff --git a/client/src-tauri/Cargo.toml b/client/src-tauri/Cargo.toml index f0e15ac6a..3ca64a1cc 100644 --- a/client/src-tauri/Cargo.toml +++ b/client/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ps5upload-desktop" -version = "12.6.31" +version = "12.6.32" description = "The all-in-one PS5 companion app." license = "GPL-3.0-or-later" edition = "2021" diff --git a/client/src-tauri/tauri.conf.json b/client/src-tauri/tauri.conf.json index 8ff8db38c..cd1bc4a7c 100644 --- a/client/src-tauri/tauri.conf.json +++ b/client/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "PS5Upload", - "version": "12.6.31", + "version": "12.6.32", "identifier": "com.phantomptr.ps5upload", "build": { "beforeDevCommand": "npm run dev:vite", diff --git a/engine/Cargo.lock b/engine/Cargo.lock index 068e43b2d..0e3cf7e47 100644 --- a/engine/Cargo.lock +++ b/engine/Cargo.lock @@ -2561,7 +2561,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-exfat" -version = "12.6.31" +version = "12.6.32" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -2570,14 +2570,14 @@ dependencies = [ [[package]] name = "ps5-dump-forge-patch" -version = "12.6.31" +version = "12.6.32" dependencies = [ "crc32fast", ] [[package]] name = "ps5-dump-forge-pfs" -version = "12.6.31" +version = "12.6.32" dependencies = [ "flate2", "ps5-dump-forge-patch", @@ -2587,7 +2587,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-ufs2" -version = "12.6.31" +version = "12.6.32" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -2597,7 +2597,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-zstd" -version = "12.6.31" +version = "12.6.32" dependencies = [ "crc32fast", "getrandom 0.4.3", @@ -2608,7 +2608,7 @@ dependencies = [ [[package]] name = "ps5upload-apidoc" -version = "12.6.31" +version = "12.6.32" dependencies = [ "proc-macro2", "quote", @@ -2618,7 +2618,7 @@ dependencies = [ [[package]] name = "ps5upload-archive" -version = "12.6.31" +version = "12.6.32" dependencies = [ "anyhow", "crc32fast", @@ -2628,7 +2628,7 @@ dependencies = [ [[package]] name = "ps5upload-ava1" -version = "12.6.31" +version = "12.6.32" dependencies = [ "anyhow", "ava1", @@ -2651,7 +2651,7 @@ dependencies = [ [[package]] name = "ps5upload-convert" -version = "12.6.31" +version = "12.6.32" dependencies = [ "libc", "ps5upload-archive", @@ -2666,7 +2666,7 @@ dependencies = [ [[package]] name = "ps5upload-convert-core" -version = "12.6.31" +version = "12.6.32" dependencies = [ "blake3", "flate2", @@ -2686,7 +2686,7 @@ dependencies = [ [[package]] name = "ps5upload-core" -version = "12.6.31" +version = "12.6.32" dependencies = [ "aes 0.9.4", "aes-gcm 0.11.1", @@ -2720,7 +2720,7 @@ dependencies = [ [[package]] name = "ps5upload-ctest" -version = "12.6.31" +version = "12.6.32" dependencies = [ "anyhow", "ava1", @@ -2736,7 +2736,7 @@ dependencies = [ [[package]] name = "ps5upload-engine" -version = "12.6.31" +version = "12.6.32" dependencies = [ "aes 0.9.4", "aes-gcm 0.11.1", @@ -2804,7 +2804,7 @@ dependencies = [ [[package]] name = "ps5upload-fpkg" -version = "12.6.31" +version = "12.6.32" dependencies = [ "aes 0.9.4", "blake3", @@ -2828,7 +2828,7 @@ dependencies = [ [[package]] name = "ps5upload-hub" -version = "12.6.31" +version = "12.6.32" dependencies = [ "axum", "base64 0.23.1", @@ -2843,7 +2843,7 @@ dependencies = [ [[package]] name = "ps5upload-lab" -version = "12.6.31" +version = "12.6.32" dependencies = [ "anyhow", "ava1", @@ -2861,7 +2861,7 @@ dependencies = [ [[package]] name = "ps5upload-pkg" -version = "12.6.31" +version = "12.6.32" dependencies = [ "aes 0.9.4", "blake3", @@ -2873,14 +2873,14 @@ dependencies = [ [[package]] name = "ps5upload-tailnet" -version = "12.6.31" +version = "12.6.32" dependencies = [ "cc", ] [[package]] name = "ps5upload-tests" -version = "12.6.31" +version = "12.6.32" dependencies = [ "anyhow", "ava1", @@ -2898,7 +2898,7 @@ dependencies = [ [[package]] name = "ps5upload-unrar" -version = "12.6.31" +version = "12.6.32" dependencies = [ "serde", "serde_json", diff --git a/engine/Cargo.toml b/engine/Cargo.toml index 6ca8faf1d..f856f3af2 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -32,7 +32,7 @@ resolver = "2" [workspace.package] edition = "2021" license = "GPL-3.0-or-later" -version = "12.6.31" +version = "12.6.32" [workspace.dependencies] # AVA1 (github.com/phantomptr/ava1): the Rust crate from crates.io; the payload builds the C side diff --git a/payload/include/config.h b/payload/include/config.h index d269e4cbb..cb5a6f71d 100644 --- a/payload/include/config.h +++ b/payload/include/config.h @@ -5,7 +5,7 @@ * UI tell apart an old payload still running from a build that includes * a particular fix, without having to boot the console. Keep in sync * with the desktop app's package.json during releases. */ -#define PS5UPLOAD2_VERSION "12.6.31" +#define PS5UPLOAD2_VERSION "12.6.32" /* Author credit — embedded in the startup toast so anyone looking at * the console screen knows who wrote the software that just loaded. * Kept separate from VERSION so release scripts can bump the version From d6fcdceb7c8f7f3190d1c46ab5c1e357511633e7 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 08:49:50 -0800 Subject: [PATCH 02/75] Upload queue: a reloaded page no longer calls a running upload stopped (#945) After a reload (or when another tab took over the queue) the web UI asked the engine once about each upload that was running, and any failed answer, such as a 503 or a timeout, left the row at "Stopped part-way" with Resume while the engine kept uploading. Now the lookup asks again like the live poll does. The row says it is checking until the engine answers. A job still running, or one that finished while the page was away, is picked up again. "Stopped part-way" shows only when the engine no longer knows the job, the job failed, or there was still no answer after the retries; Resume then checks again before starting anything. The same single-answer pattern is fixed where it could harm a live job: resuming an interrupted Files upload started a second job beside the running one after one failed read, and removing a row or giving up a stopped Files upload could delete the partial file under a job still writing it. The console page has no upload queue of its own. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/src/i18n/locales/ar.ts | 1 + client/src/i18n/locales/bn.ts | 1 + client/src/i18n/locales/de.ts | 1 + client/src/i18n/locales/en.ts | 1 + client/src/i18n/locales/es.ts | 1 + client/src/i18n/locales/fa.ts | 1 + client/src/i18n/locales/fr.ts | 1 + client/src/i18n/locales/hi.ts | 1 + client/src/i18n/locales/hu.ts | 1 + client/src/i18n/locales/id.ts | 1 + client/src/i18n/locales/it.ts | 1 + client/src/i18n/locales/ja.ts | 1 + client/src/i18n/locales/ko.ts | 1 + client/src/i18n/locales/pl.ts | 1 + client/src/i18n/locales/pt-BR.ts | 1 + client/src/i18n/locales/ru.ts | 1 + client/src/i18n/locales/th.ts | 1 + client/src/i18n/locales/tr.ts | 1 + client/src/i18n/locales/vi.ts | 1 + client/src/i18n/locales/zh-CN.ts | 1 + client/src/i18n/locales/zh-TW.ts | 1 + client/src/lib/uploadLeftovers.test.ts | 20 ++++ client/src/lib/uploadLeftovers.ts | 17 +++- client/src/screens/Upload/QueuePanel.tsx | 10 ++ client/src/state/fsUpload.test.ts | 60 ++++++++++++ client/src/state/fsUpload.ts | 34 ++++--- client/src/state/uploadQueue.reattach.test.ts | 96 ++++++++++++++++++- client/src/state/uploadQueue.ts | 73 +++++++++----- scripts/i18n-source-hashes.json | 1 + 29 files changed, 288 insertions(+), 44 deletions(-) diff --git a/client/src/i18n/locales/ar.ts b/client/src/i18n/locales/ar.ts index 14c26ea48..55ce4f3b0 100644 --- a/client/src/i18n/locales/ar.ts +++ b/client/src/i18n/locales/ar.ts @@ -4322,6 +4322,7 @@ trace_profile_name: "مقيس من {n} جلسات لعب", "collection.trash_n_title": "نقل {n} نسخ إلى سلة المهملات؟", "collection.trash_one_title": "نقل \"{name}\" إلى سلة المهملات؟", queue_install_looking: "جارٍ التحقق من نتيجة هذا التثبيت…", +queue_checking_job: "جارٍ التحقق مما إذا كان هذا الرفع لا يزال قيد التشغيل…", queue_install_stop_refused: "لم ينجح الإيقاف، فما زال هذا التثبيت جاريًا. أعد المحاولة، أو ألغِه من PS5.", queue_install_stop_waiting: "لم يتوقف هذا التثبيت بعد. أعد المحاولة، أو ألغِه من PS5.", queue_install_stopped: "تم الإيقاف.", diff --git a/client/src/i18n/locales/bn.ts b/client/src/i18n/locales/bn.ts index ea821eba6..8b8871f86 100644 --- a/client/src/i18n/locales/bn.ts +++ b/client/src/i18n/locales/bn.ts @@ -4322,6 +4322,7 @@ trace_profile_name: "{n}টি খেলার সেশন থেকে মা "collection.trash_n_title": "{n}টি কপি ট্র্যাশে সরাবেন?", "collection.trash_one_title": "\"{name}\" ট্র্যাশে সরাবেন?", queue_install_looking: "এই ইনস্টল কীভাবে শেষ হলো তা দেখা হচ্ছে…", +queue_checking_job: "এই আপলোড এখনও চলছে কি না দেখা হচ্ছে…", queue_install_stop_refused: "থামানো যায়নি, তাই এই ইনস্টল এখনও চলছে। আবার চেষ্টা করুন, অথবা PS5-এ বাতিল করুন।", queue_install_stop_waiting: "এই ইনস্টল এখনও থামেনি। আবার চেষ্টা করুন, অথবা PS5-এ বাতিল করুন।", queue_install_stopped: "থামানো হয়েছে।", diff --git a/client/src/i18n/locales/de.ts b/client/src/i18n/locales/de.ts index 7e5ed88f7..99a3a3bcb 100644 --- a/client/src/i18n/locales/de.ts +++ b/client/src/i18n/locales/de.ts @@ -4330,6 +4330,7 @@ trace_profile_name: "gemessen aus {n} Spielsitzungen", "collection.trash_n_title": "{n} Kopien in den Papierkorb verschieben?", "collection.trash_one_title": "„{name}“ in den Papierkorb verschieben?", queue_install_looking: "Prüfe, wie diese Installation ausgegangen ist…", +queue_checking_job: "Prüfe, ob dieser Upload noch läuft…", queue_install_stop_refused: "Das Stoppen hat nicht geklappt, diese Installation läuft also noch. Versuche es erneut oder brich sie auf der PS5 ab.", queue_install_stop_waiting: "Diese Installation wurde noch nicht beendet. Versuche es erneut oder brich sie auf der PS5 ab.", queue_install_stopped: "Gestoppt.", diff --git a/client/src/i18n/locales/en.ts b/client/src/i18n/locales/en.ts index f6ab55595..8d660e747 100644 --- a/client/src/i18n/locales/en.ts +++ b/client/src/i18n/locales/en.ts @@ -776,6 +776,7 @@ queue_title: "Queue", "queue_retry_via_upload": "Retry via upload", "queue_install_interrupted": "Interrupted when the app closed. Check the game on the PS5, then retry if it isn't installed.", "queue_install_looking": "Checking how this install went…", +"queue_checking_job": "Checking whether this upload is still running…", "queue_install_stop_refused": "The stop did not go through, so this install is still running. Try again, or cancel it on the PS5.", "queue_install_stop_waiting": "This install has not stopped yet. Try again, or cancel it on the PS5.", "queue_install_stopped": "Stopped.", diff --git a/client/src/i18n/locales/es.ts b/client/src/i18n/locales/es.ts index da2dbe389..5dfc985e8 100644 --- a/client/src/i18n/locales/es.ts +++ b/client/src/i18n/locales/es.ts @@ -4275,6 +4275,7 @@ trace_profile_name: "medido en {n} sesiones de juego", "collection.trash_n_title": "¿Mover {n} copias a la Papelera?", "collection.trash_one_title": "¿Mover «{name}» a la Papelera?", queue_install_looking: "Comprobando cómo terminó esta instalación…", +queue_checking_job: "Comprobando si esta subida sigue en curso…", queue_install_stop_refused: "No se pudo detener, así que esta instalación sigue en curso. Vuelve a intentarlo o cancélala en la PS5.", queue_install_stop_waiting: "Esta instalación todavía no se ha detenido. Vuelve a intentarlo o cancélala en la PS5.", queue_install_stopped: "Detenido.", diff --git a/client/src/i18n/locales/fa.ts b/client/src/i18n/locales/fa.ts index 75802879c..7b438e63a 100644 --- a/client/src/i18n/locales/fa.ts +++ b/client/src/i18n/locales/fa.ts @@ -4629,6 +4629,7 @@ trace_profile_name: "سنجیده‌شده از {n} جلسهٔ بازی", "collection.trash_n_title": "{n} نسخه به سطل زباله برود؟", "collection.trash_one_title": "\"{name}\" به سطل زباله برود؟", queue_install_looking: "در حال بررسی نتیجه این نصب…", +queue_checking_job: "در حال بررسی اینکه آیا این بارگذاری هنوز در حال اجراست…", queue_install_stop_refused: "توقف انجام نشد، پس این نصب هنوز در حال اجراست. دوباره تلاش کنید یا آن را روی PS5 لغو کنید.", queue_install_stop_waiting: "این نصب هنوز متوقف نشده است. دوباره تلاش کنید یا آن را روی PS5 لغو کنید.", queue_install_stopped: "متوقف شد.", diff --git a/client/src/i18n/locales/fr.ts b/client/src/i18n/locales/fr.ts index 063dece42..078748397 100644 --- a/client/src/i18n/locales/fr.ts +++ b/client/src/i18n/locales/fr.ts @@ -4338,6 +4338,7 @@ trace_profile_name: "mesuré sur {n} sessions de jeu", "collection.trash_n_title": "Mettre {n} copies à la Corbeille ?", "collection.trash_one_title": "Mettre « {name} » à la Corbeille ?", queue_install_looking: "Vérification de l’issue de cette installation…", +queue_checking_job: "Vérification que ce transfert est toujours en cours…", queue_install_stop_refused: "L'arrêt n'a pas abouti : cette installation continue. Réessaie, ou annule-la sur la PS5.", queue_install_stop_waiting: "Cette installation ne s'est pas encore arrêtée. Réessaie, ou annule-la sur la PS5.", queue_install_stopped: "Arrêté.", diff --git a/client/src/i18n/locales/hi.ts b/client/src/i18n/locales/hi.ts index 0a49545cd..98e4852d4 100644 --- a/client/src/i18n/locales/hi.ts +++ b/client/src/i18n/locales/hi.ts @@ -4336,6 +4336,7 @@ trace_profile_name: "{n} खेल सत्रों से मापा गय "collection.trash_n_title": "{n} कॉपियाँ ट्रैश में भेजें?", "collection.trash_one_title": "\"{name}\" को ट्रैश में भेजें?", queue_install_looking: "जाँच रहे हैं कि यह इंस्टॉल कैसा रहा…", +queue_checking_job: "जाँच हो रही है कि यह अपलोड अभी भी चल रहा है या नहीं…", queue_install_stop_refused: "रोकना सफल नहीं हुआ, इसलिए यह इंस्टॉल अभी चल रहा है। फिर से कोशिश करें, या PS5 पर रद्द करें।", queue_install_stop_waiting: "यह इंस्टॉल अभी रुका नहीं है। फिर से कोशिश करें, या PS5 पर रद्द करें।", queue_install_stopped: "रोक दिया गया।", diff --git a/client/src/i18n/locales/hu.ts b/client/src/i18n/locales/hu.ts index 1b1e790f1..01d7bed7e 100644 --- a/client/src/i18n/locales/hu.ts +++ b/client/src/i18n/locales/hu.ts @@ -4614,6 +4614,7 @@ trace_profile_name: "{n} játékmenetből mérve", "collection.trash_n_title": "{n} példányt a Kukába teszel?", "collection.trash_one_title": "A Kukába teszed: „{name}”?", queue_install_looking: "Ellenőrzés, hogyan ért véget ez a telepítés…", +queue_checking_job: "Annak ellenőrzése, hogy ez a feltöltés még fut-e…", queue_install_stop_refused: "A leállítás nem sikerült, így ez a telepítés még fut. Próbáld újra, vagy szakítsd meg a PS5-ön.", queue_install_stop_waiting: "Ez a telepítés még nem állt le. Próbáld újra, vagy szakítsd meg a PS5-ön.", queue_install_stopped: "Leállítva.", diff --git a/client/src/i18n/locales/id.ts b/client/src/i18n/locales/id.ts index 0da21655b..4fad03d30 100644 --- a/client/src/i18n/locales/id.ts +++ b/client/src/i18n/locales/id.ts @@ -4331,6 +4331,7 @@ trace_profile_name: "diukur dari {n} sesi bermain", "collection.trash_n_title": "Pindahkan {n} salinan ke Tempat Sampah?", "collection.trash_one_title": "Pindahkan \"{name}\" ke Tempat Sampah?", queue_install_looking: "Memeriksa hasil pemasangan ini…", +queue_checking_job: "Memeriksa apakah unggahan ini masih berjalan…", queue_install_stop_refused: "Penghentian gagal, jadi pemasangan ini masih berjalan. Coba lagi, atau batalkan di PS5.", queue_install_stop_waiting: "Pemasangan ini belum berhenti. Coba lagi, atau batalkan di PS5.", queue_install_stopped: "Dihentikan.", diff --git a/client/src/i18n/locales/it.ts b/client/src/i18n/locales/it.ts index 2b543feaa..e2b0b049a 100644 --- a/client/src/i18n/locales/it.ts +++ b/client/src/i18n/locales/it.ts @@ -4275,6 +4275,7 @@ trace_profile_name: "misurato da {n} sessioni di gioco", "collection.trash_n_title": "Spostare {n} copie nel Cestino?", "collection.trash_one_title": "Spostare “{name}” nel Cestino?", queue_install_looking: "Controllo di com’è andata questa installazione…", +queue_checking_job: "Controllo se questo caricamento è ancora in corso…", queue_install_stop_refused: "L'arresto non è riuscito, quindi questa installazione è ancora in corso. Riprova o annullala sulla PS5.", queue_install_stop_waiting: "Questa installazione non si è ancora fermata. Riprova o annullala sulla PS5.", queue_install_stopped: "Arrestato.", diff --git a/client/src/i18n/locales/ja.ts b/client/src/i18n/locales/ja.ts index 5ca118610..9c4ede1d9 100644 --- a/client/src/i18n/locales/ja.ts +++ b/client/src/i18n/locales/ja.ts @@ -4341,6 +4341,7 @@ trace_profile_name: "{n} 回のプレイセッションから計測", "collection.trash_n_title": "{n} 個のコピーをゴミ箱に移しますか?", "collection.trash_one_title": "「{name}」をゴミ箱に移しますか?", queue_install_looking: "このインストールの結果を確認しています…", +queue_checking_job: "このアップロードがまだ実行中か確認しています…", queue_install_stop_refused: "停止できなかったため、このインストールはまだ実行中です。もう一度試すか、PS5 でキャンセルしてください。", queue_install_stop_waiting: "このインストールはまだ停止していません。もう一度試すか、PS5 でキャンセルしてください。", queue_install_stopped: "停止しました。", diff --git a/client/src/i18n/locales/ko.ts b/client/src/i18n/locales/ko.ts index ac464876e..a5ea7bd11 100644 --- a/client/src/i18n/locales/ko.ts +++ b/client/src/i18n/locales/ko.ts @@ -4339,6 +4339,7 @@ trace_profile_name: "플레이 세션 {n}개에서 측정", "collection.trash_n_title": "사본 {n}개를 휴지통으로 옮길까요?", "collection.trash_one_title": "“{name}”을(를) 휴지통으로 옮길까요?", queue_install_looking: "이 설치가 어떻게 끝났는지 확인하는 중…", +queue_checking_job: "이 업로드가 아직 실행 중인지 확인하는 중…", queue_install_stop_refused: "중지하지 못해 이 설치는 아직 진행 중입니다. 다시 시도하거나 PS5에서 취소하세요.", queue_install_stop_waiting: "이 설치가 아직 중지되지 않았습니다. 다시 시도하거나 PS5에서 취소하세요.", queue_install_stopped: "중지되었습니다.", diff --git a/client/src/i18n/locales/pl.ts b/client/src/i18n/locales/pl.ts index 5ee2d055b..b5c951ef7 100644 --- a/client/src/i18n/locales/pl.ts +++ b/client/src/i18n/locales/pl.ts @@ -4559,6 +4559,7 @@ trace_profile_name: "zmierzono z {n} sesji gry", "collection.trash_n_title": "Przenieść kopie do Kosza ({n})?", "collection.trash_one_title": "Przenieść „{name}” do Kosza?", queue_install_looking: "Sprawdzanie, jak zakończyła się ta instalacja…", +queue_checking_job: "Sprawdzanie, czy to przesyłanie nadal trwa…", queue_install_stop_refused: "Zatrzymanie się nie powiodło, więc ta instalacja nadal trwa. Spróbuj ponownie albo anuluj ją na PS5.", queue_install_stop_waiting: "Ta instalacja jeszcze się nie zatrzymała. Spróbuj ponownie albo anuluj ją na PS5.", queue_install_stopped: "Zatrzymano.", diff --git a/client/src/i18n/locales/pt-BR.ts b/client/src/i18n/locales/pt-BR.ts index dd5aabbba..acdca9604 100644 --- a/client/src/i18n/locales/pt-BR.ts +++ b/client/src/i18n/locales/pt-BR.ts @@ -4337,6 +4337,7 @@ trace_profile_name: "medido em {n} sessões de jogo", "collection.trash_n_title": "Mover {n} cópias para a Lixeira?", "collection.trash_one_title": "Mover “{name}” para a Lixeira?", queue_install_looking: "Verificando como esta instalação terminou…", +queue_checking_job: "Verificando se este envio ainda está em andamento…", queue_install_stop_refused: "Não foi possível parar, então esta instalação continua. Tente de novo ou cancele no PS5.", queue_install_stop_waiting: "Esta instalação ainda não parou. Tente de novo ou cancele no PS5.", queue_install_stopped: "Parado.", diff --git a/client/src/i18n/locales/ru.ts b/client/src/i18n/locales/ru.ts index a91c2c06f..a2c248c3f 100644 --- a/client/src/i18n/locales/ru.ts +++ b/client/src/i18n/locales/ru.ts @@ -4275,6 +4275,7 @@ trace_profile_name: "измерено по {n} игровым сессиям", "collection.trash_n_title": "Отправить копии в корзину ({n})?", "collection.trash_one_title": "Отправить «{name}» в корзину?", queue_install_looking: "Проверяем, чем закончилась эта установка…", +queue_checking_job: "Проверяем, идёт ли ещё эта загрузка…", queue_install_stop_refused: "Остановить не удалось, поэтому установка продолжается. Повторите попытку или отмените её на PS5.", queue_install_stop_waiting: "Установка ещё не остановилась. Повторите попытку или отмените её на PS5.", queue_install_stopped: "Остановлено.", diff --git a/client/src/i18n/locales/th.ts b/client/src/i18n/locales/th.ts index 4f672e950..d24aa5042 100644 --- a/client/src/i18n/locales/th.ts +++ b/client/src/i18n/locales/th.ts @@ -4329,6 +4329,7 @@ trace_profile_name: "วัดจาก {n} เซสชันการเล่ "collection.trash_n_title": "ย้ายสำเนา {n} รายการไปถังขยะหรือไม่", "collection.trash_one_title": "ย้าย \"{name}\" ไปถังขยะหรือไม่", queue_install_looking: "กำลังตรวจสอบผลการติดตั้งนี้…", +queue_checking_job: "กำลังตรวจสอบว่าการอัปโหลดนี้ยังทำงานอยู่หรือไม่…", queue_install_stop_refused: "หยุดไม่สำเร็จ การติดตั้งนี้จึงยังทำงานอยู่ ลองอีกครั้งหรือยกเลิกบน PS5", queue_install_stop_waiting: "การติดตั้งนี้ยังไม่หยุด ลองอีกครั้งหรือยกเลิกบน PS5", queue_install_stopped: "หยุดแล้ว", diff --git a/client/src/i18n/locales/tr.ts b/client/src/i18n/locales/tr.ts index 1a18e31a8..ffbaf83b5 100644 --- a/client/src/i18n/locales/tr.ts +++ b/client/src/i18n/locales/tr.ts @@ -4329,6 +4329,7 @@ trace_profile_name: "{n} oyun oturumundan ölçüldü", "collection.trash_n_title": "{n} kopya Çöp Sepeti'ne taşınsın mı?", "collection.trash_one_title": "\"{name}\" Çöp Sepeti'ne taşınsın mı?", queue_install_looking: "Bu yüklemenin nasıl sonuçlandığı kontrol ediliyor…", +queue_checking_job: "Bu yüklemenin hâlâ sürüp sürmediği denetleniyor…", queue_install_stop_refused: "Durdurma başarısız oldu, bu kurulum hâlâ sürüyor. Yeniden dene veya PS5'te iptal et.", queue_install_stop_waiting: "Bu kurulum henüz durmadı. Yeniden dene veya PS5'te iptal et.", queue_install_stopped: "Durduruldu.", diff --git a/client/src/i18n/locales/vi.ts b/client/src/i18n/locales/vi.ts index e47266c56..13259cfab 100644 --- a/client/src/i18n/locales/vi.ts +++ b/client/src/i18n/locales/vi.ts @@ -4324,6 +4324,7 @@ trace_profile_name: "đo từ {n} phiên chơi", "collection.trash_n_title": "Chuyển {n} bản sao vào Thùng rác?", "collection.trash_one_title": "Chuyển \"{name}\" vào Thùng rác?", queue_install_looking: "Đang kiểm tra kết quả lần cài đặt này…", +queue_checking_job: "Đang kiểm tra xem lượt tải lên này còn đang chạy không…", queue_install_stop_refused: "Không dừng được nên bản cài này vẫn đang chạy. Hãy thử lại hoặc hủy trên PS5.", queue_install_stop_waiting: "Bản cài này vẫn chưa dừng. Hãy thử lại hoặc hủy trên PS5.", queue_install_stopped: "Đã dừng.", diff --git a/client/src/i18n/locales/zh-CN.ts b/client/src/i18n/locales/zh-CN.ts index 04c4333bd..4bfa648ec 100644 --- a/client/src/i18n/locales/zh-CN.ts +++ b/client/src/i18n/locales/zh-CN.ts @@ -4281,6 +4281,7 @@ trace_profile_name: "由 {n} 次游玩会话测得", "collection.trash_n_title": "将 {n} 个副本移到废纸篓?", "collection.trash_one_title": "将“{name}”移到废纸篓?", queue_install_looking: "正在确认这次安装的结果…", +queue_checking_job: "正在检查此上传是否仍在进行…", queue_install_stop_refused: "未能停止,此安装仍在进行。请重试,或在 PS5 上取消。", queue_install_stop_waiting: "此安装尚未停止。请重试,或在 PS5 上取消。", queue_install_stopped: "已停止。", diff --git a/client/src/i18n/locales/zh-TW.ts b/client/src/i18n/locales/zh-TW.ts index 237d5692e..0f1f0fc83 100644 --- a/client/src/i18n/locales/zh-TW.ts +++ b/client/src/i18n/locales/zh-TW.ts @@ -4275,6 +4275,7 @@ trace_profile_name: "由 {n} 次遊玩工作階段測得", "collection.trash_n_title": "將 {n} 個副本移到垃圾桶?", "collection.trash_one_title": "將「{name}」移到垃圾桶?", queue_install_looking: "正在確認這次安裝的結果…", +queue_checking_job: "正在檢查此上傳是否仍在進行…", queue_install_stop_refused: "未能停止,此安裝仍在進行。請重試,或在 PS5 上取消。", queue_install_stop_waiting: "此安裝尚未停止。請重試,或在 PS5 上取消。", queue_install_stopped: "已停止。", diff --git a/client/src/lib/uploadLeftovers.test.ts b/client/src/lib/uploadLeftovers.test.ts index f47dfadfc..3a5030f29 100644 --- a/client/src/lib/uploadLeftovers.test.ts +++ b/client/src/lib/uploadLeftovers.test.ts @@ -100,6 +100,26 @@ describe("discardUploadLeftovers", () => { await discardUploadLeftovers(row({ status: "running", jobId: "j" }), () => [], deps); expect(order).toEqual(["running", "ended", "remove", "remove"]); }); + it("stops a job a reopened page was still asking about before deleting its part (#945)", async () => { + const { deps, removed } = consoleWith({}, ["/data/pkg/g.pkg.ava-part"]); + const cancelJob = vi.fn(async () => {}); + vi.mocked(deps.jobRunning).mockResolvedValueOnce(true).mockResolvedValueOnce(true); + await discardUploadLeftovers( + row({ status: "pending", checkingJob: true, interrupted: false, jobId: "j" }), + () => [], + { ...deps, cancelJob }, + ); + expect(cancelJob).toHaveBeenCalledWith("j"); + // Asked first (still running), cancelled, waited out (running, then ended), then deleted. + expect(deps.jobRunning).toHaveBeenCalledTimes(3); + expect(removed).toContain("/data/pkg/g.pkg.ava-part"); + }); + it("keeps the part when the job cannot be asked about", async () => { + const { deps, removed } = consoleWith({}, ["/data/pkg/g.pkg.ava-part"]); + vi.mocked(deps.jobRunning).mockRejectedValue(new Error("Service unavailable")); + await discardUploadLeftovers(row({ status: "pending", interrupted: true, jobId: "j" }), () => [], deps); + expect(removed).toEqual([]); + }); it("deletes nothing while the stopped job will not end", async () => { const { deps, removed } = consoleWith({}, ["/data/pkg/g.pkg.ava-part"]); vi.mocked(deps.jobRunning).mockResolvedValue(true); diff --git a/client/src/lib/uploadLeftovers.ts b/client/src/lib/uploadLeftovers.ts index 4af2d29a4..e37820e6e 100644 --- a/client/src/lib/uploadLeftovers.ts +++ b/client/src/lib/uploadLeftovers.ts @@ -12,6 +12,7 @@ import { fsDelete, fsListDir, jobCancel, jobStatus, resumeTxidForget } from "../api/ps5"; import type { QueueItem } from "../state/uploadQueue"; import { hostOf } from "./addr"; +import { isJobUnknownError, readWithRetries } from "./pollRead"; import { removeUploadPart, type UploadPartDeps } from "./uploadPart"; /** How long a stopped job gets to end (a cancel lands at the next shard boundary). */ @@ -32,11 +33,14 @@ export interface LeftoverDeps extends UploadPartDeps { const realDeps: LeftoverDeps = { listDir: (addr, path) => fsListDir(addr, path), remove: (addr, path) => fsDelete(addr, path), + // A failed read is asked again, and one that never answers throws: "not running" on a 503 + // would delete the part under a job that is still writing it (#945). The caller then keeps it. jobRunning: async (jobId) => { try { - return (await jobStatus(jobId)).status === "running"; - } catch { - return false; // the engine no longer knows it + return (await readWithRetries(() => jobStatus(jobId))).status === "running"; + } catch (e) { + if (isJobUnknownError(e)) return false; // the engine no longer knows it + throw e; } }, cancelJob: (jobId) => jobCancel(jobId), @@ -54,6 +58,7 @@ type LeftoverItem = Pick< | "resolvedDest" | "startedAt" | "interrupted" + | "checkingJob" | "uploadDone" | "jobId" >; @@ -106,8 +111,12 @@ export async function discardUploadLeftovers( } // A row left over from before a window reload can have a job still sending: removing the row // is the person's way of stopping it, and nothing else would. + // So can one whose job a reopened page is still asking about (checkingJob). const orphanJob = - it.status !== "running" && it.interrupted && it.jobId && (await deps.jobRunning(it.jobId)); + it.status !== "running" && + (it.interrupted || it.checkingJob) && + it.jobId && + (await deps.jobRunning(it.jobId)); if (it.status !== "running" && !orphanJob) { await sweep(); return; diff --git a/client/src/screens/Upload/QueuePanel.tsx b/client/src/screens/Upload/QueuePanel.tsx index eb140b607..fae697a73 100644 --- a/client/src/screens/Upload/QueuePanel.tsx +++ b/client/src/screens/Upload/QueuePanel.tsx @@ -1584,6 +1584,16 @@ export function QueueRow({ )} + {isPending && item.checkingJob && ( +
+ {tr( + "queue_checking_job", + undefined, + "Checking whether this upload is still running…", + )} +
+ )} + {showInstallProgress && } diff --git a/client/src/state/fsUpload.test.ts b/client/src/state/fsUpload.test.ts index 1cb4c8bfb..f4c0b2b08 100644 --- a/client/src/state/fsUpload.test.ts +++ b/client/src/state/fsUpload.test.ts @@ -14,6 +14,7 @@ const mem = new globalThis.Map(); }; const { useTaskStore } = await import("./tasks"); +const { MAX_POLL_FAILURES } = await import("../lib/pollRead"); const { useFsUploadStore, fsUploadForHost, @@ -499,6 +500,40 @@ describe("runFsUpload", () => { expect(e.started.map((x) => x.src)).toEqual(["/pc/c.bin"]); }); + it("a failed read of the interrupted run's job is asked again, not answered with a second job (#945)", async () => { + const e = fakeEngine({ + "job-7": [{ status: "running", bytes_sent: 5, total_bytes: 9 } as Snap], + }); + const status = e.deps.jobStatus; + let failed = false; + e.deps.jobStatus = async (id) => { + if (id === "job-7" && !failed) { + failed = true; + throw new Error("Service unavailable"); + } + return status(id); + }; + useFsUploadStore.getState().patch(HOST, { + stopped: { + why: "interrupted", + error: "", + reason: null, + addr: HOST, + destDir: "/data/x", + srcPaths: ["/pc/b.bin", "/pc/c.bin"], + doneCount: 1, + count: 3, + name: "b.bin", + jobId: "job-7", + }, + }); + const r = await resumeFsUpload(HOST, e.deps); + expect(r.ok).toBe(true); + expect(failed).toBe(true); + // b.bin stayed on its old job: no second job wrote the same file. + expect(e.started.map((x) => x.src)).toEqual(["/pc/c.bin"]); + }); + it("dismissing or finishing leaves nothing saved", async () => { const e = fakeEngine({ "job-1": [{ status: "failed", error: "disk full" } as Snap], @@ -896,6 +931,31 @@ describe("giving a stopped run up (R2-1 F10)", () => { expect(c.removed).toEqual([part, "/data/x/G"]); }); + it("keeps the partial while the old job cannot be asked about (#945)", async () => { + const c = console_({ [part]: ["eboot.bin"], "/data/x/G": [] }); + const jobStatus = vi.fn(async () => { + throw new Error("Service unavailable"); + }); + await discardFsUploadPartial( + { ...base, jobId: "job-9", steps: [{ kind: "one", src: "/pc/G", name: "G" }] }, + deps(c, { jobStatus }), + ); + expect(jobStatus).toHaveBeenCalledTimes(MAX_POLL_FAILURES); + expect(c.removed).toEqual([]); + }); + + it("deletes the partial of a job the engine no longer knows", async () => { + const c = console_({ [part]: ["eboot.bin"], "/data/x/G": [] }); + const jobStatus = vi.fn(async () => { + throw new Error("job not found"); + }); + await discardFsUploadPartial( + { ...base, jobId: "job-9", steps: [{ kind: "one", src: "/pc/G", name: "G" }] }, + deps(c, { jobStatus }), + ); + expect(c.removed).toEqual([part, "/data/x/G"]); + }); + it("deletes only the first step's partial: the others never started", async () => { const c = console_({}, ["/data/x/a.bin.ava-part", "/data/x/b.bin.ava-part"]); await discardFsUploadPartial( diff --git a/client/src/state/fsUpload.ts b/client/src/state/fsUpload.ts index efbca871c..090e1abd9 100644 --- a/client/src/state/fsUpload.ts +++ b/client/src/state/fsUpload.ts @@ -15,7 +15,7 @@ import { type FsExistingEntry, type FsUploadStep, } from "./fsUploadPlan"; -import { isJobUnknownError } from "../lib/pollRead"; +import { isJobUnknownError, readWithRetries } from "../lib/pollRead"; /** * An "Add files" / drag-in upload on the Files screen, kept outside the screen. @@ -440,16 +440,14 @@ export async function runFsUpload( // An interrupted run's job may have carried on without the app: watch it rather // than start a second one onto the same files. let jobId = ""; - if (at === 0 && attempt === 0 && req.attachJobId) { - const old = await deps.jobStatus(req.attachJobId).catch(() => null); - if (old?.status === "done") break; - if (old?.status === "running") jobId = req.attachJobId; - } + // A read that failed is no answer (#945): it used to start a second job beside the + // live one. It is asked like an unsettled job instead, below. + if (at === 0 && attempt === 0 && req.attachJobId) unsettledJob = req.attachJobId; if (!jobId && unsettledJob) { const prev = unsettledJob; let old: JobSnapshot | null = null; try { - old = await deps.jobStatus(prev); + old = await readWithRetries(() => deps.jobStatus(prev), deps.sleep); } catch (e) { // Still no answer: starting now could run beside it. This try fails instead. if (!jobNotFound(e)) throw e; @@ -663,15 +661,27 @@ export async function discardFsUploadPartial( if (!step || !deleteRemote || !listDir) return; try { // What the app closed on may still be running: a part deleted under a live job comes back. + // A read that fails after its retries throws (to the catch below: the part stays), since + // "not running" on a 503 would delete it under a job that is still writing it (#945). if (run.jobId) { - const state = await deps.jobStatus(run.jobId).catch(() => null); + const jobId = run.jobId; + const state = await readWithRetries(() => deps.jobStatus(jobId), deps.sleep).catch((e) => { + if (jobNotFound(e)) return null; + throw e; + }); if (state?.status === "running") { await deps.jobCancel(run.jobId).catch(() => {}); - for (let i = 0; i < 60; i++) { - const now = await deps.jobStatus(run.jobId).catch(() => null); - if (now?.status !== "running") break; - await deps.sleep(500); + let ended = false; + for (let i = 0; i < 60 && !ended; i++) { + // A failed read is no answer: wait on, as for a job still running. + const now = await deps.jobStatus(jobId).catch((e: unknown) => + jobNotFound(e) ? null : ("unanswered" as const), + ); + ended = now === null || (now !== "unanswered" && now.status !== "running"); + if (!ended) await deps.sleep(500); } + // Still going (or not answering): deleting now would only be undone. + if (!ended) return; } } if (step.kind === "one") { diff --git a/client/src/state/uploadQueue.reattach.test.ts b/client/src/state/uploadQueue.reattach.test.ts index f87bad5d4..2ea3c2e1a 100644 --- a/client/src/state/uploadQueue.reattach.test.ts +++ b/client/src/state/uploadQueue.reattach.test.ts @@ -25,6 +25,17 @@ vi.mock("../api/ps5", async (importOriginal) => { }; }); +// The hydrate lookup asks again after a failed read (#945): the same retries, without the +// second's wait between them. +vi.mock("../lib/pollRead", async (importOriginal) => { + const actual = await importOriginal(); + return { + ...actual, + readWithRetries: (read: () => Promise) => + actual.readWithRetries(read, () => new Promise((r) => setTimeout(r, 1))), + }; +}); + const { resolveJob, recordInstalled } = vi.hoisted(() => ({ resolveJob: vi.fn(), recordInstalled: vi.fn(), @@ -40,6 +51,7 @@ vi.mock("./pkgLibrary", async (importOriginal) => { import { fsDelete, jobCancel, jobStatus, startTransferFile, uploadQueueLoad } from "../api/ps5"; import { useUploadQueueStore } from "./uploadQueue"; +import { MAX_POLL_FAILURES } from "../lib/pollRead"; const base = { addr: "10.0.0.2:9113", @@ -238,18 +250,94 @@ describe("the web UI re-attaches to running jobs after a reload", () => { expect(row("a")?.attachJobId).toBeUndefined(); }); - it("leaves an item pending when the engine no longer knows its job", async () => { + it("asks again after a failed read instead of calling a live upload stopped (#945)", async () => { + vi.mocked(uploadQueueLoad).mockResolvedValueOnce({ + continueOnFailure: false, + items: [{ ...base, id: "retry", status: "running", jobId: "J2" }], + } as never); + let answer: () => void = () => {}; + const answered = new Promise((r) => (answer = r)); + vi.mocked(jobStatus) + .mockRejectedValueOnce(new Error("Service unavailable")) + .mockImplementationOnce((async () => { + await answered; + return { status: "running", bytes_sent: 5, total_bytes: 10 }; + }) as never) + .mockResolvedValue({ status: "done", bytes_sent: 10, dest: "/data/big.bin" } as never); + + await useUploadQueueStore.getState().hydrate(); + await until(() => vi.mocked(jobStatus).mock.calls.length >= 2); + // Between the failed read and the answer: checking, never "Stopped part-way". + expect(row("retry")?.status).toBe("pending"); + expect(row("retry")?.checkingJob).toBe(true); + expect(row("retry")?.interrupted).toBe(false); + answer(); + + await until(() => row("retry")?.status === "done"); + expect(row("retry")?.jobId).toBe("J2"); + expect(row("retry")?.checkingJob).toBe(false); + expect(row("retry")?.interrupted).toBe(false); + expect(startTransferFile).not.toHaveBeenCalled(); + expect(jobCancel).not.toHaveBeenCalled(); + }); + + it("adopts a job that finished while the page was away", async () => { + vi.mocked(uploadQueueLoad).mockResolvedValueOnce({ + continueOnFailure: false, + items: [{ ...base, id: "fin", status: "running", jobId: "J3" }], + } as never); + vi.mocked(jobStatus).mockResolvedValue({ status: "done", bytes_sent: 10, dest: "/data/big.bin" } as never); + await useUploadQueueStore.getState().hydrate(); + await until(() => row("fin")?.status === "done"); + expect(startTransferFile).not.toHaveBeenCalled(); + expect(row("fin")?.interrupted).toBe(false); + }); + + it("offers Resume when the engine no longer knows its job", async () => { vi.mocked(uploadQueueLoad).mockResolvedValueOnce({ continueOnFailure: false, items: [{ ...base, id: "b", status: "running", jobId: "GONE" }], } as never); - vi.mocked(jobStatus).mockRejectedValue(new Error("404")); + vi.mocked(jobStatus).mockRejectedValue(new Error("job not found")); await useUploadQueueStore.getState().hydrate(); - await until(() => vi.mocked(jobStatus).mock.calls.some((c) => c[0] === "GONE")); - await new Promise((r) => setTimeout(r, 0)); // its refusal handled + await until(() => row("b")?.checkingJob === false); + // Not asked again: the engine's answer cannot change. + expect(vi.mocked(jobStatus).mock.calls.filter((c) => c[0] === "GONE")).toHaveLength(1); expect(row("b")?.status).toBe("pending"); + expect(row("b")?.interrupted).toBe(true); expect(row("b")?.attachJobId).toBeUndefined(); expect(useUploadQueueStore.getState().runningHosts["10.0.0.2"]).toBeFalsy(); + expect(startTransferFile).not.toHaveBeenCalled(); + }); + + it("ends as stopped part-way, not checking forever, when the engine never answers", async () => { + vi.mocked(uploadQueueLoad).mockResolvedValueOnce({ + continueOnFailure: false, + items: [{ ...base, id: "mute", status: "running", jobId: "J4" }], + } as never); + vi.mocked(jobStatus).mockRejectedValue(new Error("Service unavailable")); + await useUploadQueueStore.getState().hydrate(); + await until(() => row("mute")?.checkingJob === false); + expect(vi.mocked(jobStatus).mock.calls.filter((c) => c[0] === "J4")).toHaveLength( + MAX_POLL_FAILURES, + ); + expect(row("mute")?.status).toBe("pending"); + expect(row("mute")?.interrupted).toBe(true); + expect(row("mute")?.attachJobId).toBeUndefined(); + expect(startTransferFile).not.toHaveBeenCalled(); + expect(jobCancel).not.toHaveBeenCalled(); + }); + + it("asks again after a reload that came while it was still checking", async () => { + vi.mocked(uploadQueueLoad).mockResolvedValueOnce({ + continueOnFailure: false, + items: [{ ...base, id: "again", status: "pending", checkingJob: true, jobId: "J5" }], + } as never); + vi.mocked(jobStatus).mockResolvedValue({ status: "done", bytes_sent: 10, dest: "/data/big.bin" } as never); + await useUploadQueueStore.getState().hydrate(); + await until(() => row("again")?.status === "done"); + expect(jobStatus).toHaveBeenCalledWith("J5", "10.0.0.2:9113"); + expect(startTransferFile).not.toHaveBeenCalled(); }); it("Start all during the lookup waits for it instead of spinning (and hanging the tab)", async () => { diff --git a/client/src/state/uploadQueue.ts b/client/src/state/uploadQueue.ts index 2965b4b64..9e3e0c0d5 100644 --- a/client/src/state/uploadQueue.ts +++ b/client/src/state/uploadQueue.ts @@ -136,7 +136,7 @@ import { useConnectionStore } from "./connection"; import { startPs5ToPs5 } from "../api/ava1"; import { isTauriEnv } from "../lib/tauriEnv"; import { createQueueLeader } from "../lib/queueLeader"; -import { isJobUnknownError } from "../lib/pollRead"; +import { isJobUnknownError, readWithRetries } from "../lib/pollRead"; import { krakenGuard } from "../lib/krakenGuard"; /** The engine job id currently uploading on each console (bare host key). @@ -378,6 +378,10 @@ export interface QueueItem { * finished) when the tab closed: the runner adopts this job instead of starting a new * one, then does the item's post-upload steps. Cleared the moment the runner takes it. */ attachJobId?: string; + /** A reopened page is asking the engine whether this item's job (`jobId`) is still running: + * the row says so instead of "Stopped part-way", which only shows once the engine has said + * the job is gone or ended, or could not be asked. */ + checkingJob?: boolean; /** Mount path the runner produced when `mountAfterUpload` is true and * the image upload + mount succeeded. Surfaced to the row so users * see where the image landed without flipping to the Volumes tab. */ @@ -994,31 +998,46 @@ export const useUploadQueueStore = create((rawSet, get) => { Object.values(rh).some(Boolean); let saveTimer: ReturnType | null = null; - /** Web UI only: the engine kept running these items' jobs while the tab was closed. Ask it - * about each; one that is still running, or finished while the tab was away, goes back to its - * item (`attachJobId`) and the console's queue restarts, so the runner adopts the job, - * shows its progress and does the item's post-upload steps. A job the engine no longer knows - * (it restarted) or one that failed leaves the item pending, to be started again and - * resumed from the console's journal as before. Never throws. */ + /** The engine can outlive the page (the web UI's tab, a reloaded desktop window, a remote + * engine), so these items' jobs may have carried on while it was away. Ask the engine about + * each (#945): one that is still running, or finished while the page was away, goes back to + * its item (`attachJobId`) and the console's queue restarts, so the runner adopts the job, + * shows its progress and does the item's post-upload steps. A failed read is asked again + * (readWithRetries): a 503 or a timeout says nothing about the job, and calling a live upload + * "Stopped part-way" is what #945 reported. Only an engine that no longer knows the job, a job + * that ended failed, or no answer after the retries makes the row interrupted: it waits for + * Resume, which asks again before starting anything (liveJobFor adopts a job still going). + * Never throws. */ let reattachLookup: Promise = Promise.resolve(); const reattachRunning = async ( list: Array<{ id: string; jobId: string; addr: string }>, ) => { const hosts = new Set(); - for (const { id, jobId, addr } of list) { - try { - const snap = await jobStatus(jobId, addr); - if (snap.status === "running" || snap.status === "done") { - set((s) => ({ items: patchItem(s.items, id, { attachJobId: jobId }) })); - hosts.add(hostOf(addr)); + const settle = (id: string, patch: Partial) => + set((s) => ({ items: patchItem(s.items, id, { checkingJob: false, ...patch }) })); + // Each item on its own: one console that does not answer must not hold the others' rows. + await Promise.all( + list.map(async ({ id, jobId, addr }) => { + try { + const snap = await readWithRetries(() => jobStatus(jobId, addr)); + if (snap.status === "running" || snap.status === "done") { + settle(id, { attachJobId: jobId, interrupted: false }); + hosts.add(hostOf(addr)); + } else { + settle(id, { interrupted: true }); + } + } catch (e) { + settle(id, { interrupted: true }); + if (!isJobUnknownError(e)) { + console.warn(`[upload-queue] could not ask the engine about job ${jobId}:`, e); + } + } finally { + // Looked up: the runner may take this item now (to adopt its job, or to start it fresh). + reattaching.delete(id); } - } catch { - /* the engine does not know the job: the item stays pending */ - } finally { - // Looked up: the runner may take this item now (to adopt its job, or to start it fresh). - reattaching.delete(id); - } - } + }), + ); + scheduleSave(); for (const h of hosts) void get().startHost(h, { unattended: true }); }; @@ -2706,6 +2725,9 @@ export const useUploadQueueStore = create((rawSet, get) => { const next = { ...it }; // Never carried across a reload: a stale id would adopt a job that is not this item's. delete next.attachJobId; + // A page closed while it was asking about this item's job: ask again below. + const wasChecking = !!next.checkingJob && next.status === "pending"; + delete next.checkingJob; // An install that was running is never re-run by itself: Sony may // already have accepted it, and repeating a patch install can wipe // the base game. @@ -2727,18 +2749,21 @@ export const useUploadQueueStore = create((rawSet, get) => { ); next.completedAt = Date.now(); } - if (next.status === "running" && !installWork) { + if ((next.status === "running" || wasChecking) && !installWork) { // The engine can outlive this page (the web UI's tab, a reloaded desktop window, a // remote engine), so this item's job may still be going: remember it so it can be - // re-attached below. An engine that restarted answers "no such job" and the item - // simply re-runs. + // re-attached below (reattachRunning). Until the engine has answered, the row says + // it is checking, not that it stopped (#945). if (next.jobId) { wasRunning.push({ id: next.id, jobId: next.jobId, addr: next.addr }); // Hold the runner off this item until its job has been looked up. reattaching.add(next.id); + next.checkingJob = true; + next.interrupted = false; + } else { + next.interrupted = true; } next.status = "pending"; - next.interrupted = true; next.stalledForMs = null; } if (!next.txIdHex) next.txIdHex = generateTxIdHex(); diff --git a/scripts/i18n-source-hashes.json b/scripts/i18n-source-hashes.json index 97946e82e..fbd14efec 100644 --- a/scripts/i18n-source-hashes.json +++ b/scripts/i18n-source-hashes.json @@ -6743,6 +6743,7 @@ "queue_avg_speed": "ce572cba 9bEsio6nR0UAhlUrillzQNvM8Z10UAzmQkPHfMFx6m7LnlHf6IWa_hzmQzmQ", "queue_bytes_of": "e7a467ec 7Fw5cly3fbMiomhaG3PU1Y4qvqZ06_Y4qY4qMV_bMiYtYcWcY4qY4qY4qY4q", "queue_cancel_item": "3f0178ea 3pdoS4WxYoioy9W7JDa1_Y7dBrynybtChuAMv55u6SSbLWOl06gOswJmUPXL", + "queue_checking_job": "d457464d -JsOqtiaoZ-TYx0Sh0OPyB59jmsMDXaE8VHd8TjwAlyDpfCGNON0REPOEC2d", "queue_clear": "29a390f9 o_hld2knJndGwWlhaT5NDfAX8ggmNhwwyZFtfdQdQcpVEYee2jGdH3PFBbvC", "queue_clear_confirm_body": "d6ae1f10 XITQNdAZ4B7R9nZzS2bLJuGqWj5DDmreXOZULNrYpyAW5NBJUx38fyifh_ro", "queue_clear_confirm_title": "f250896f MQ3MWUgZSTcajRGwfHGREv5N-PObvwlZDpgbHsjGCMIQz4I0oC_M8vmW9qdI", From 4f2d9f260b00ef774d8db29510f488747be69f6c Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 08:51:04 -0800 Subject: [PATCH 03/75] Cheats: a PS4 game's cheats find its code at 0x400000 (#946) Turning on a cheat for Rayman Legends (CUSA00284) still said "the game's code is not loaded yet" after 12.6.26. With no hook (a toggle) and a plain JSON cheat, that message comes only from a base address of 0, before any cheat location is read. The 12.6.26 fix could still give 0 for a PS4 game: when the module list's handle 0 was named eboot.bin it returned that entry's address even when it was 0, and otherwise it used 0x400000 only if one 16-byte read there worked. A PS4 game now always gets a base: handle 0 when it is the game's eboot.bin at a usable address, else a module named eboot.bin under another handle, else 0x400000. Nothing is written on that alone: every location is read and must hold the cheat's original bytes, and the module check still applies. The module figures #920 and #946 quoted came from PROC_MODULES, which lists the helper's own process, not the game's, so what the game's list holds has not been seen. When a PS4 game's base is not its handle 0, the helper now writes the game's module list (handles, file names, addresses, sizes) once to its log, which the bug report collects, and the "not loaded" errors say what handle 0 was. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- payload/include/cheats_plan.h | 50 +++++++- payload/src/cheats.c | 178 +++++++++++++++++++++------ payload/src/cheats_plan.c | 43 ++++++- payload/tests/cheats_plan_selftest.c | 90 ++++++++++++++ 4 files changed, 321 insertions(+), 40 deletions(-) diff --git a/payload/include/cheats_plan.h b/payload/include/cheats_plan.h index 993ab4c78..fd77d6fc0 100644 --- a/payload/include/cheats_plan.h +++ b/payload/include/cheats_plan.h @@ -91,7 +91,8 @@ int cheat_addr_ok(intptr_t addr, int len); /* Whether a loaded module of the game's process may take a physical write: one of the game's * own. A module loaded from its /app0, or dynlib handle 0 when that is its executable (a path - * ending in eboot.bin, or a path that could not be read, as handle 0 always was). Handle 0 by + * ending in eboot.bin, or a path that could not be read, as handle 0 always was), or a module + * under another handle whose path ends in eboot.bin outside /system* and /preinst (#946). Handle 0 by * number alone is not enough: in a PS4 game's process (#920) it is another module, and a * physical write there lands in every process that maps the page. */ int cheat_module_is_game(uint64_t handle, const char *path); @@ -102,4 +103,51 @@ int cheat_module_is_game(uint64_t handle, const char *path); * 1, or 0 with `why` (may be NULL) saying so. */ int cheat_patch_base_ok(uint64_t handle, const char *path, char *why, size_t why_cap); +/* Where a PS4 executable is loaded: the address GoldHEN-style PS4 cheat offsets are relative to, + * and where a debugger saw Rayman Legends' (CUSA00284) code on a PS5 (#920). */ +#define CHEAT_PS4_EXE_BASE 0x400000ULL + +/* What the game process's module list says about dynlib handle 0 (cheats.c module_info). */ +typedef struct { + int found; /* handle 0 is in the list */ + uint64_t base; /* its mapbase */ + uint64_t size; /* its mapsize */ + char path[256]; +} cheat_exe_seen_t; + +enum { + CHEAT_EXE_NONE = 0, /* no base: the game's code is not there (yet) */ + CHEAT_EXE_HANDLE0 = 1, /* handle 0's load address */ + CHEAT_EXE_PS4_DEFAULT = 2, /* a PS4 game whose module list gives no usable base: 0x400000 */ + CHEAT_EXE_NAMED = 3, /* a PS4 game: the module named eboot.bin, under another handle */ +}; + +/* The address a game's cheat offsets are relative to: its executable's load address. + * + * A PS5 game: handle 0's load address, or none (0) while it has none. + * A PS4 game (`ps4`): handle 0's load address when handle 0 is the game's executable at a usable + * address; else the load address of the module named eboot.bin (`eboot`, may be NULL: the list + * has none, or it is handle 0) when usable; otherwise CHEAT_PS4_EXE_BASE, never 0 (#946). 12.6.26 (#920) fell back to 0x400000 + * only when handle 0 was some other module, and only when one 16-byte read at 0x400000 worked, + * so a handle 0 named eboot.bin whose list entry gives a load address of 0, or that one read + * failing, still left 0 and every toggle said "the game's code is not loaded yet" without + * reading a single cheat location. Taking 0x400000 writes nothing by itself: every location is + * read first and must hold the cheat's original bytes, and a physical write must still pass the + * module check (cheat_module_is_game). + * + * What handle 0 of a PS4 game's process really is has not been seen: the "336 KiB module at + * 0x6988c000" #920 went by (and the "eboot.bin at 0x400000, 344064 bytes" of #946) came from + * PROC_MODULES, which lists the helper's own process (runtime.c handle_proc_modules), not the + * game's. cheats.c log_game_modules writes the game's list to the helper's log when this falls + * back, so a bug report shows it. + * + * `how` (may be NULL) gets a CHEAT_EXE_* value. */ +uint64_t cheat_exe_base_pick(int ps4, const cheat_exe_seen_t *h0, const cheat_exe_seen_t *eboot, + int *how); + +/* What handle 0 is, for an error or the log: "eboot.bin at 0x0, 0x1a4000 bytes", "not in the + * module list". Only the file name of its path (a sandbox path names the title and nothing + * else, but the name is all that is needed). */ +void cheat_exe_describe(const cheat_exe_seen_t *h0, char *out, size_t cap); + #endif /* PS5UPLOAD_CHEATS_PLAN_H */ diff --git a/payload/src/cheats.c b/payload/src/cheats.c index 977fe4f65..a623fc61a 100644 --- a/payload/src/cheats.c +++ b/payload/src/cheats.c @@ -212,37 +212,57 @@ static int module_info(pid_t pid, uint32_t handle, uint64_t *base, uint64_t *siz size_t path_cap); static int game_mem_read(pid_t pid, intptr_t addr, uint8_t *out, size_t len); -/* Where a PS4 executable is loaded in a PS4 game's process on the PS5. */ -#define PS4_EBOOT_BASE ((intptr_t)0x400000) +/* dynlib handle 0 of the game's process, as its module list has it. */ +static void exe_seen(pid_t pid, cheat_exe_seen_t *h0) { + memset(h0, 0, sizeof *h0); + h0->found = module_info(pid, 0, &h0->base, &h0->size, h0->path, sizeof h0->path) == 0; +} + +static int title_is_ps4(const char *title) { return title && strncmp(title, "CUSA", 4) == 0; } + +static void log_game_modules(pid_t pid, const char *title, const cheat_exe_seen_t *h0, + intptr_t base, int how); -/* The load address cheat offsets are relative to: the game's executable. +/* The load address cheat offsets are relative to: the game's executable (cheat_exe_base_pick). * - * For a PS5 game that is dynlib handle 0. In a PS4 game's process (#920, Rayman Legends - * CUSA00284 on FW 11.60) handle 0 is not the game's eboot.bin: it reported a 336 KiB module - * at 0x6988c000 while the game's code was at 0x400000, so every offset past that module's end - * read zeros and the toggle said "the game's code is not loaded yet". So for a PS4 title whose - * handle 0 is not an eboot.bin, the executable at 0x400000 is used when it can be read. A wrong - * guess writes nothing: every location's bytes must equal the cheat's original bytes first. */ + * For a PS5 game that is dynlib handle 0. For a PS4 game it is handle 0 when that is its + * eboot.bin at a usable address, else 0x400000 (#920, #946). `how` (may be NULL) says which. */ +static intptr_t game_exe_base_how(pid_t pid, const char *title, int *how) { + cheat_exe_seen_t h0, eboot; + exe_seen(pid, &h0); + int ps4 = title_is_ps4(title); + memset(&eboot, 0, sizeof eboot); + if (ps4 && !(h0.found && cheat_module_is_game(0, h0.path))) { + /* Handle 0 is not the PS4 game's eboot.bin: the module of that name, if the list has it + * under another handle. */ + uint32_t eh = 0; + if (locked_dynlib_handle(pid, "eboot.bin", &eh) == 0 && eh != 0) + eboot.found = module_info(pid, eh, &eboot.base, &eboot.size, eboot.path, + sizeof eboot.path) == 0; + } + int picked = CHEAT_EXE_NONE; + intptr_t b = (intptr_t)cheat_exe_base_pick(ps4, &h0, &eboot, &picked); + if (how) *how = picked; + /* A PS4 game whose base is not its handle 0: say what the list held. A PS5 game with no base + * yet is the start-up window (the watcher asks every few ms), not worth a log. */ + if (picked == CHEAT_EXE_PS4_DEFAULT || picked == CHEAT_EXE_NAMED) + log_game_modules(pid, title, &h0, b, picked); + return b; +} + static intptr_t game_exe_base(pid_t pid, const char *title) { - intptr_t b = locked_mapbase(pid, 0); - if (!title || strncmp(title, "CUSA", 4) != 0 || b == PS4_EBOOT_BASE) return b; - uint64_t mb = 0, ms = 0; - char path[256] = ""; - if (module_info(pid, 0, &mb, &ms, path, sizeof path) == 0) { - const char *leaf = strrchr(path, '/'); - leaf = leaf ? leaf + 1 : path; - if (strcasecmp(leaf, "eboot.bin") == 0) return b; - } - uint8_t probe[16]; - if (game_mem_read(pid, PS4_EBOOT_BASE, probe, sizeof probe) != 0) return b; - static pid_t told; - if (told != pid) { - told = pid; - fprintf(stderr, "[cheats] %s: PS4 game, handle 0 is %s at 0x%llx; using 0x%lx\n", title, - path[0] ? path : "(no path)", (unsigned long long)mb, - (unsigned long)PS4_EBOOT_BASE); - } - return PS4_EBOOT_BASE; + return game_exe_base_how(pid, title, NULL); +} + +/* "the game's code is not loaded yet; try again", with what handle 0 is (#946). */ +static void exe_not_loaded(pid_t pid, char *err, size_t err_cap) { + if (!err || !err_cap) return; + cheat_exe_seen_t h0; + char h0_text[160]; + exe_seen(pid, &h0); + cheat_exe_describe(&h0, h0_text, sizeof h0_text); + snprintf(err, err_cap, "the game's code is not loaded yet; try again (its executable, module " + "handle 0, is %s)", h0_text); } /* Find the pid + base address of the running big app (game). @@ -507,6 +527,76 @@ static int module_info(pid_t pid, uint32_t handle, uint64_t *base, uint64_t *siz return found; } +/* The game process's module list, once per process, into the helper's log (stderr.log, which + * the app's bug report collects): what the base was taken from when it was not handle 0, so a + * report shows what the console had (#946). Handles, file names (never whole paths), load + * addresses and sizes: nothing of the user's. */ +#define EXE_LOG_MODULES_MAX 64 +static void log_game_modules(pid_t pid, const char *title, const cheat_exe_seen_t *h0, + intptr_t base, int how) { + static pid_t told; + if (told == pid) return; + told = pid; + char h0_text[160]; + cheat_exe_describe(h0, h0_text, sizeof h0_text); + fprintf(stderr, "[cheats] %s pid %d: cheat offsets from 0x%lx (%s); handle 0 is %s\n", + title ? title : "?", (int)pid, (unsigned long)base, + how == CHEAT_EXE_PS4_DEFAULT ? "the PS4 executable address" + : how == CHEAT_EXE_NAMED ? "the module named eboot.bin" + : how == CHEAT_EXE_HANDLE0 ? "handle 0" + : "none yet", + h0_text); + typedef struct { + uint64_t handle, base, size; + int app0; + char leaf[64]; + } mod_row_t; + /* On the heap: the watcher's thread stack is not the place for 6 KiB. */ + mod_row_t *m = (mod_row_t *)calloc(EXE_LOG_MODULES_MAX, sizeof *m); + if (!m) return; + int n = 0, more = 0, walked = 0; + char path[256]; + pthread_mutex_lock(&kernel_rw_lock); + unsigned long kproc = (unsigned long)kernel_get_proc(pid); + unsigned long obj = 0; + if (kproc && kernel_copyout(kproc + 0x3e8, &obj, sizeof(obj)) == 0) { + walked = 1; + for (int guard = 0; guard < 1024; guard++) { + if (kernel_copyout(obj, &obj, sizeof(obj)) != 0 || !obj) break; + dynlib_head_t h; + if (kernel_copyout(obj, &h, sizeof(h)) != 0) break; + if (n >= EXE_LOG_MODULES_MAX) { + more++; + continue; + } + path[0] = '\0'; + if (h.path && kernel_copyout(h.path, path, sizeof(path) - 1) != 0) path[0] = '\0'; + path[sizeof(path) - 1] = '\0'; + const char *leaf = strrchr(path, '/'); + leaf = leaf ? leaf + 1 : path; + m[n].handle = h.handle; + m[n].base = h.mapbase; + m[n].size = h.mapsize; + m[n].app0 = strstr(path, "/app0/") != NULL; + snprintf(m[n].leaf, sizeof m[n].leaf, "%s", leaf[0] ? leaf : "(no path)"); + n++; + } + } + pthread_mutex_unlock(&kernel_rw_lock); + if (!walked) { + fprintf(stderr, "[cheats] %s pid %d: its module list could not be read\n", + title ? title : "?", (int)pid); + free(m); + return; + } + for (int i = 0; i < n; i++) + fprintf(stderr, "[cheats] handle %llu %s%s at 0x%llx, 0x%llx bytes\n", + (unsigned long long)m[i].handle, m[i].leaf, m[i].app0 ? " (app0)" : "", + (unsigned long long)m[i].base, (unsigned long long)m[i].size); + if (more) fprintf(stderr, "[cheats] and %d more\n", more); + free(m); +} + typedef struct { pid_t pid; } game_mem_ctx_t; @@ -1353,7 +1443,7 @@ static int resolve_mod_locs(pid_t pid, intptr_t base, const cheat_mod_t *mod, ch /* No base yet means the module is not mapped: a relative offset would be used as an * absolute address. */ if (base <= 0) { - if (err) snprintf(err, err_cap, "the game's code is not loaded yet; try again"); + exe_not_loaded(pid, err, err_cap); return -2; } int n = mod->mem_count; @@ -1891,7 +1981,15 @@ static int xml_apply_on(pid_t pid, const char *title, cheat_mod_t *mod, const xm return -1; } if (module_info(pid, handle, &mbase, &msize, base_path, sizeof base_path) != 0 || !mbase || !msize) { - if (err) snprintf(err, err_cap, "the game's code is not loaded yet; try again"); + if (handle == 0) { + exe_not_loaded(pid, err, err_cap); + } else if (err) { + cheat_exe_seen_t mod_seen = { .found = 1, .base = mbase, .size = msize }; + char mod_text[160]; + snprintf(mod_seen.path, sizeof mod_seen.path, "%s", m.app_elf); + cheat_exe_describe(&mod_seen, mod_text, sizeof mod_text); + snprintf(err, err_cap, "the game's code is not loaded yet; try again (%s)", mod_text); + } hook_wait(hk); return -1; } @@ -2450,8 +2548,10 @@ static int sess_apply(void *vctx, cheats_session_t *s, const cheats_item_t *it, intptr_t mb = c->base; if (mod->module_name[0]) mb = resolve_module_base(c->pid, mod->module_name); if (mb <= 0) { - snprintf(why, why_cap, "module %s is not loaded yet", - mod->module_name[0] ? mod->module_name : "of the game"); + if (mod->module_name[0]) + snprintf(why, why_cap, "module %s is not loaded yet", mod->module_name); + else + exe_not_loaded(c->pid, why, why_cap); hk.wait = 1; rc = -1; } else { @@ -2804,6 +2904,8 @@ static pid_t g_gate_pid; /* its executable is loaded (or the wait for it is static int g_gate_told; /* "waiting for eboot.bin" was logged */ static pid_t g_base_pid; static intptr_t g_base; /* its eboot's load address (0: not yet) */ +static int g_base_how; /* CHEAT_EXE_*: where g_base came from */ +static uint64_t g_base_at; /* when g_base was looked up (mono_ms) */ /* Applies to a launch wait for the game's own executable: a game execs more than once per launch * (fakelib_overlay.c), and code read before its eboot.bin is there is someone else's. */ @@ -2840,11 +2942,15 @@ static int exe_gate_locked(uint64_t now) { } static intptr_t pass_base(pid_t pid) { - /* A PS4 game's address is looked for again until its code is there (game_exe_base). */ - int ps4_pending = strncmp(g_sess.title, "CUSA", 4) == 0 && g_base != PS4_EBOOT_BASE; - if (g_base_pid != pid || g_base <= 0 || ps4_pending) { - g_base = game_exe_base(pid, g_sess.title); + /* A PS4 game on the 0x400000 default is looked at again (at most once a second) until its + * handle 0 gives the address (game_exe_base_how). */ + uint64_t now = mono_ms(); + int ps4_default = (g_base_how == CHEAT_EXE_PS4_DEFAULT || g_base_how == CHEAT_EXE_NAMED) && + now - g_base_at >= 1000; + if (g_base_pid != pid || g_base <= 0 || ps4_default) { + g_base = game_exe_base_how(pid, g_sess.title, &g_base_how); g_base_pid = pid; + g_base_at = now; } return g_base > 0 ? g_base : 0; } diff --git a/payload/src/cheats_plan.c b/payload/src/cheats_plan.c index 86b538c72..247807051 100644 --- a/payload/src/cheats_plan.c +++ b/payload/src/cheats_plan.c @@ -99,11 +99,14 @@ int cheat_addr_ok(intptr_t addr, int len) { int cheat_module_is_game(uint64_t handle, const char *path) { if (!path) path = ""; if (strstr(path, "/app0/") != NULL) return 1; - if (handle != 0) return 0; - if (!path[0]) return 1; + if (handle == 0 && !path[0]) return 1; const char *leaf = strrchr(path, '/'); leaf = leaf ? leaf + 1 : path; - return strcasecmp(leaf, "eboot.bin") == 0; + if (strcasecmp(leaf, "eboot.bin") != 0) return 0; + /* Handle 0 named eboot.bin, as always. Under another handle (a PS4 game's eboot.bin that is + * not handle 0, #946, from a sandbox path like /mnt/sandbox/pfsmnt/CUSA00284-app0/) only + * outside the system's folders: a system app's eboot.bin is not the game's. */ + return handle == 0 || (strncmp(path, "/system", 7) != 0 && strncmp(path, "/preinst", 8) != 0); } int cheat_patch_base_ok(uint64_t handle, const char *path, char *why, size_t why_cap) { @@ -121,6 +124,40 @@ int cheat_patch_base_ok(uint64_t handle, const char *path, char *why, size_t why return 0; } +uint64_t cheat_exe_base_pick(int ps4, const cheat_exe_seen_t *h0, const cheat_exe_seen_t *eboot, + int *how) { + int found = h0 && h0->found; + uint64_t b = found ? h0->base : 0; + int usable = found && cheat_addr_ok((intptr_t)b, 1); + if (ps4 && usable && cheat_module_is_game(0, h0->path)) { + if (how) *how = CHEAT_EXE_HANDLE0; + return b; + } + if (ps4 && eboot && eboot->found && cheat_addr_ok((intptr_t)eboot->base, 1) && + cheat_module_is_game(1 /* not handle 0 */, eboot->path)) { + if (how) *how = CHEAT_EXE_NAMED; + return eboot->base; + } + if (ps4) { + if (how) *how = CHEAT_EXE_PS4_DEFAULT; + return CHEAT_PS4_EXE_BASE; + } + if (how) *how = usable ? CHEAT_EXE_HANDLE0 : CHEAT_EXE_NONE; + return usable ? b : 0; +} + +void cheat_exe_describe(const cheat_exe_seen_t *h0, char *out, size_t cap) { + if (!out || !cap) return; + if (!h0 || !h0->found) { + snprintf(out, cap, "not in the module list"); + return; + } + const char *leaf = strrchr(h0->path, '/'); + leaf = leaf ? leaf + 1 : h0->path; + snprintf(out, cap, "%s at 0x%llx, 0x%llx bytes", leaf[0] ? leaf : "(no path)", + (unsigned long long)h0->base, (unsigned long long)h0->size); +} + static int overlaps(intptr_t a, int alen, intptr_t b, int blen) { return a < b + (intptr_t)blen && b < a + (intptr_t)alen; } diff --git a/payload/tests/cheats_plan_selftest.c b/payload/tests/cheats_plan_selftest.c index 5c1407dac..994c4a2e9 100644 --- a/payload/tests/cheats_plan_selftest.c +++ b/payload/tests/cheats_plan_selftest.c @@ -165,6 +165,94 @@ static void test_module_is_game(void) { CHECK(!cheat_module_is_game(0, "/system_ex/common_ex/lib/libc.prx")); CHECK(!cheat_module_is_game(3, "/system/common/lib/libkernel.sprx")); CHECK(!cheat_module_is_game(3, "")); + /* #946: a PS4 game's eboot.bin under another handle, from its sandbox path. */ + CHECK(cheat_module_is_game(5, "/mnt/sandbox/pfsmnt/CUSA00284-app0/eboot.bin")); + CHECK(cheat_module_is_game(5, "/mnt/sandbox/CUSA00284_000/app0/eboot.bin")); + /* A system app's eboot.bin is not the game's. */ + CHECK(!cheat_module_is_game(5, "/system/vsh/app/NPXS20001/eboot.bin")); + CHECK(!cheat_module_is_game(5, "/system_ex/app/NPXS40087/eboot.bin")); + CHECK(!cheat_module_is_game(5, "/preinst/app/eboot.bin")); + CHECK(!cheat_module_is_game(5, "/mnt/sandbox/pfsmnt/CUSA00284-app0/libfoo.prx")); +} + +static cheat_exe_seen_t seen(int found, uint64_t base, uint64_t size, const char *path) { + cheat_exe_seen_t s; + memset(&s, 0, sizeof s); + s.found = found; + s.base = base; + s.size = size; + snprintf(s.path, sizeof s.path, "%s", path); + return s; +} + +/* #946: where cheat offsets are relative to. The toggle said "the game's code is not loaded yet" + * (base 0) for Rayman Legends (CUSA00284, PS4) on a PS5 while a debugger saw its code at + * 0x400000. Every case a PS4 game can be in gives a base; a PS5 game gives one only from its + * handle 0. */ +static void test_exe_base_pick(void) { + int how = -1; + /* PS5: handle 0, whatever it is (the write check judges the module). */ + cheat_exe_seen_t ps5 = seen(1, 0x7ff00000000ULL, 0x6000000, "/app0/eboot.bin"); + CHECK(cheat_exe_base_pick(0, &ps5, NULL, &how) == 0x7ff00000000ULL && how == CHEAT_EXE_HANDLE0); + cheat_exe_seen_t none = seen(0, 0, 0, ""); + CHECK(cheat_exe_base_pick(0, &none, NULL, &how) == 0 && how == CHEAT_EXE_NONE); + cheat_exe_seen_t zero = seen(1, 0, 0x6000000, "/app0/eboot.bin"); + CHECK(cheat_exe_base_pick(0, &zero, NULL, &how) == 0 && how == CHEAT_EXE_NONE); + CHECK(cheat_exe_base_pick(0, NULL, NULL, NULL) == 0); + + /* PS4, handle 0 is its eboot.bin at a usable address: that address. */ + cheat_exe_seen_t ps4 = seen(1, 0x400000, 0x1600000, "/mnt/sandbox/pfsmnt/CUSA00284-app0/eboot.bin"); + CHECK(cheat_exe_base_pick(1, &ps4, NULL, &how) == 0x400000 && how == CHEAT_EXE_HANDLE0); + /* PS4, handle 0 named eboot.bin but listed at 0 (12.6.26 returned 0 here: "not loaded"). */ + cheat_exe_seen_t ps4_zero = seen(1, 0, 0x1600000, "/mnt/sandbox/pfsmnt/CUSA00284-app0/eboot.bin"); + CHECK(cheat_exe_base_pick(1, &ps4_zero, NULL, &how) == CHEAT_PS4_EXE_BASE && + how == CHEAT_EXE_PS4_DEFAULT); + /* PS4, handle 0 not in the list at all (12.6.26: 0 unless one read at 0x400000 worked). */ + CHECK(cheat_exe_base_pick(1, &none, NULL, &how) == CHEAT_PS4_EXE_BASE && + how == CHEAT_EXE_PS4_DEFAULT); + CHECK(cheat_exe_base_pick(1, NULL, NULL, &how) == CHEAT_PS4_EXE_BASE); + /* PS4, handle 0 is another module. */ + cheat_exe_seen_t other = seen(1, 0x6988c000ULL, 0x54000, "/system/common/lib/libSceSomething.sprx"); + CHECK(cheat_exe_base_pick(1, &other, NULL, &how) == CHEAT_PS4_EXE_BASE && + how == CHEAT_EXE_PS4_DEFAULT); + /* ... with the game's eboot.bin under another handle: that one. */ + cheat_exe_seen_t named = seen(1, 0x800000, 0x1600000, "/mnt/sandbox/pfsmnt/CUSA00284-app0/eboot.bin"); + CHECK(cheat_exe_base_pick(1, &other, &named, &how) == 0x800000 && how == CHEAT_EXE_NAMED); + /* ... but not a named one at 0, or a system app's. */ + cheat_exe_seen_t named_zero = seen(1, 0, 0x1600000, "/mnt/sandbox/pfsmnt/CUSA00284-app0/eboot.bin"); + CHECK(cheat_exe_base_pick(1, &other, &named_zero, &how) == CHEAT_PS4_EXE_BASE); + cheat_exe_seen_t named_sys = seen(1, 0x900000, 0x1000, "/system/vsh/app/NPXS20001/eboot.bin"); + CHECK(cheat_exe_base_pick(1, &other, &named_sys, &how) == CHEAT_PS4_EXE_BASE); + /* A handle 0 at a kernel address is no base either. */ + cheat_exe_seen_t kern = seen(1, 0xFFFFF04080F57368ULL, 0x1000, "/app0/eboot.bin"); + CHECK(cheat_exe_base_pick(0, &kern, NULL, &how) == 0 && how == CHEAT_EXE_NONE); + CHECK(cheat_exe_base_pick(1, &kern, NULL, &how) == CHEAT_PS4_EXE_BASE); + + /* The Rayman Legends "Infinite Live" location (CUSA00031/CUSA00284 01.00, offset F3A54) + * lands where the debugger read its original bytes 29 F0. */ + uint64_t off = 0; + CHECK(cheat_parse_offset("F3A54", &off) == 0); + CHECK(cheat_exe_base_pick(1, &ps4_zero, NULL, NULL) + off == 0x4F3A54); +} + +static void test_exe_describe(void) { + char out[160]; + cheat_exe_seen_t none = seen(0, 0, 0, ""); + cheat_exe_describe(&none, out, sizeof out); + CHECK(strcmp(out, "not in the module list") == 0); + cheat_exe_describe(NULL, out, sizeof out); + CHECK(strcmp(out, "not in the module list") == 0); + cheat_exe_seen_t e = seen(1, 0, 0x1600000, "/mnt/sandbox/pfsmnt/CUSA00284-app0/eboot.bin"); + cheat_exe_describe(&e, out, sizeof out); + /* The file name only, never the whole path. */ + CHECK(strcmp(out, "eboot.bin at 0x0, 0x1600000 bytes") == 0); + cheat_exe_seen_t np = seen(1, 0x400000, 0x10, ""); + cheat_exe_describe(&np, out, sizeof out); + CHECK(strcmp(out, "(no path) at 0x400000, 0x10 bytes") == 0); + char tiny[6]; + memset(tiny, 'x', sizeof tiny); + cheat_exe_describe(&e, tiny, sizeof tiny); + CHECK(tiny[sizeof tiny - 1] == '\0'); } /* An XML game patch's base module goes by the same rule (it used to take handle 0 by number). */ @@ -408,6 +496,8 @@ int main(void) { test_addr_ok(); test_module_is_game(); test_patch_base_ok(); + test_exe_base_pick(); + test_exe_describe(); test_apply_mock(); if (failures) { fprintf(stderr, "cheats_plan_selftest: %d failure(s)\n", failures); From 45f45f39c2b02722ff9e76d03716d6025d1a6fc9 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:02:19 -0800 Subject: [PATCH 04/75] AVA1 1.0.13: the engine gets the library's last audit fixes The engine's crate pin and both lockfiles move to 1.0.13 (only the version and checksum change; its dependencies are the same), and the submodule to its release. The engine's own sinks forward the new manifest check, so a manifest they refuse leaves no journal behind. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/src-tauri/Cargo.lock | 4 ++-- client/src-tauri/Cargo.toml | 2 +- engine/Cargo.lock | 6 +++--- engine/Cargo.toml | 2 +- engine/crates/ps5upload-ava1/src/download.rs | 17 +++++++++++++++++ third_party/ava1 | 2 +- 6 files changed, 25 insertions(+), 8 deletions(-) diff --git a/client/src-tauri/Cargo.lock b/client/src-tauri/Cargo.lock index c24c2d5a9..a25379b4c 100644 --- a/client/src-tauri/Cargo.lock +++ b/client/src-tauri/Cargo.lock @@ -378,9 +378,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "ava1" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f4d8733610e55bafc3778a02989a64598fa3b565147e1816099c939f996a88" +checksum = "93588081a40c3dcb721a00de27361fd2e217d0e42390cda584b7450afbf9537f" dependencies = [ "blake2 0.11.0", "blake3", diff --git a/client/src-tauri/Cargo.toml b/client/src-tauri/Cargo.toml index 3ca64a1cc..7bc1064c4 100644 --- a/client/src-tauri/Cargo.toml +++ b/client/src-tauri/Cargo.toml @@ -17,7 +17,7 @@ blake3 = "1" [dependencies] # Same version as engine/Cargo.toml (the third_party/ava1 submodule's tag). -ava1 = "=1.0.12" +ava1 = "=1.0.13" # Tauri core + the native file dialogs. File reads/writes go through our # own commands (see commands/save_text_file.rs), and links open through # tauri-plugin-opener below. diff --git a/engine/Cargo.lock b/engine/Cargo.lock index 0e3cf7e47..4ebb8a349 100644 --- a/engine/Cargo.lock +++ b/engine/Cargo.lock @@ -198,9 +198,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "ava1" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f4d8733610e55bafc3778a02989a64598fa3b565147e1816099c939f996a88" +checksum = "93588081a40c3dcb721a00de27361fd2e217d0e42390cda584b7450afbf9537f" dependencies = [ "blake2 0.11.0", "blake3", @@ -216,7 +216,7 @@ dependencies = [ [[package]] name = "ava1-chaos" -version = "1.0.12" +version = "1.0.13" dependencies = [ "tokio", ] diff --git a/engine/Cargo.toml b/engine/Cargo.toml index f856f3af2..028d8ead3 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -40,7 +40,7 @@ version = "12.6.32" # (`make ava1-version-check` fails when they differ). ava1-chaos (a fault-injecting TCP proxy for # the lab and tests) is not published and does not depend on ava1, so the path dep adds no # second ava1 to the graph. -ava1 = "=1.0.12" +ava1 = "=1.0.13" ava1-chaos = { path = "../third_party/ava1/crates/ava1-chaos" } anyhow = "1.0" # "multipart" is for the backport library import (fakelibs_api.rs): users pick diff --git a/engine/crates/ps5upload-ava1/src/download.rs b/engine/crates/ps5upload-ava1/src/download.rs index d0a8661d6..4b68f0306 100644 --- a/engine/crates/ps5upload-ava1/src/download.rs +++ b/engine/crates/ps5upload-ava1/src/download.rs @@ -422,6 +422,18 @@ fn kept_manifest(m: &Manifest) -> io::Result { } impl Sink for CheckedSink { + /// The checks that need nothing from the disk, run by the library before the job's journal + /// or manifest is written (ava1 1.0.13): a manifest refused here leaves no trace. `prepare` + /// runs them again with the disk checks. + fn check(&self, m: &Manifest) -> io::Result<()> { + check_shape_with(m, self.single, self.escape_names)?; + if self.escape_names { + self.inner.check(&kept_manifest(m)?) + } else { + self.inner.check(m) + } + } + fn prepare(&self, m: &Manifest) -> io::Result<()> { check_shape_with(m, self.single, self.escape_names)?; let kept; @@ -729,6 +741,11 @@ impl Drop for ZipSink { } impl Sink for ZipSink { + /// The manifest's shape, checked before the library writes anything of the job. + fn check(&self, m: &Manifest) -> io::Result<()> { + check_shape(m, self.single) + } + /// Truncates: `File::create` discards whatever an earlier attempt left in the part /// file, so two archives' bytes are never mixed. fn prepare(&self, m: &Manifest) -> io::Result<()> { diff --git a/third_party/ava1 b/third_party/ava1 index 3433a2080..ed06b8c90 160000 --- a/third_party/ava1 +++ b/third_party/ava1 @@ -1 +1 @@ -Subproject commit 3433a2080ac6252d52f1a1f008792acd000aedd3 +Subproject commit ed06b8c90805bf4dbb23d7d4b45e6008f92b17a4 From 79dd4165952a6b15a7a568a9d81d7ca838988cb2 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:00:23 -0800 Subject: [PATCH 05/75] Phone app: say why the engine inside the app isn't answering, and Try again (#950) On an iPhone running 12.6.32 every engine call failed with "No route to host (os error 65)" to 127.0.0.1, and the app showed only that socket error. The engine's own start-up result went nowhere the user or a bug report could see: its failure event fired before the page listened, and a panic in its task ended it silently. The phone build now records how the engine inside the app is doing: - It waits up to 20 s for the engine to answer after a start, a retry or a return to the app, and writes the result to engine.log either way ("answering after N ms", or the reason). - A failed bind, a crash or an end of the server task is recorded with its reason. An answer counts only while the app's own server runs (in the iPhone Simulator a desktop engine on the same port used to answer for an in-app engine that failed to start). - "No route to host" to its own port while the engine holds that port is the device refusing the connection (a VPN, filter or system policy), and is said that way. - engine_diagnose carries the reason; the panel shows "The engine inside the app didn't start: " and logs it once, so it reaches the app log and the bug report. - Try again now works on a phone: it starts an ended engine again on the same port, or makes a running one listen again. Text in all 21 languages; engine_err_restart_in_app and engine_problem.phone.fix retired. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/src-tauri/src/engine_in_app.rs | 125 +++++++++++ client/src-tauri/src/engine_mobile.rs | 222 ++++++++++++++++--- client/src-tauri/src/lib.rs | 5 +- client/src/components/EngineProblem.test.tsx | 6 +- client/src/components/EngineProblem.tsx | 50 ++++- client/src/i18n/locales/ar.ts | 6 +- client/src/i18n/locales/bn.ts | 6 +- client/src/i18n/locales/de.ts | 6 +- client/src/i18n/locales/en.ts | 6 +- client/src/i18n/locales/es.ts | 6 +- client/src/i18n/locales/fa.ts | 6 +- client/src/i18n/locales/fr.ts | 6 +- client/src/i18n/locales/hi.ts | 6 +- client/src/i18n/locales/hu.ts | 6 +- client/src/i18n/locales/id.ts | 6 +- client/src/i18n/locales/it.ts | 6 +- client/src/i18n/locales/ja.ts | 6 +- client/src/i18n/locales/ko.ts | 6 +- client/src/i18n/locales/pl.ts | 6 +- client/src/i18n/locales/pt-BR.ts | 6 +- client/src/i18n/locales/ru.ts | 6 +- client/src/i18n/locales/th.ts | 6 +- client/src/i18n/locales/tr.ts | 6 +- client/src/i18n/locales/vi.ts | 6 +- client/src/i18n/locales/zh-CN.ts | 6 +- client/src/i18n/locales/zh-TW.ts | 6 +- client/src/lib/engineDiagnosis.ts | 6 +- client/src/lib/shellError.test.ts | 17 ++ client/src/lib/shellError.ts | 18 +- scripts/i18n-source-hashes.json | 6 +- 30 files changed, 484 insertions(+), 97 deletions(-) create mode 100644 client/src-tauri/src/engine_in_app.rs diff --git a/client/src-tauri/src/engine_in_app.rs b/client/src-tauri/src/engine_in_app.rs new file mode 100644 index 000000000..593c83f28 --- /dev/null +++ b/client/src-tauri/src/engine_in_app.rs @@ -0,0 +1,125 @@ +//! Why the engine inside a phone app is not answering, in the words the renderer shows (#950). +//! +//! On a phone the engine is a task in the app's own process (`engine_mobile.rs`). When it does +//! not answer, the app used to show the socket error and nothing else. These say which of the +//! measured cases it is, as a coded error (`commands/shell_error.rs`) the renderer words in the +//! user's language (`client/src/lib/shellError.ts`); the log and a bug report keep the code and +//! the detail. Separate from `engine_mobile.rs` so the host tests cover it. + +use crate::commands::shell_error::coded; + +/// The engine did not start, or stopped: `detail` says why (the bind error, the panic, or the +/// last connection error). +pub(crate) const FAILED: &str = "engine_in_app_failed"; + +/// The engine holds its port, but the device refused the app's own connection to it. +pub(crate) const BLOCKED: &str = "engine_in_app_blocked"; + +/// The engine's server task ended: with an error from the engine, a panic, or by itself. +pub(crate) enum Ended { + Error(String), + Panic(String), + Stopped, +} + +/// The detail for a server task that ended. +pub(crate) fn ended_detail(ended: &Ended, bind: &str) -> String { + match ended { + Ended::Error(e) => e.clone(), + Ended::Panic(p) => format!("it crashed on {bind}: {p}"), + Ended::Stopped => format!("it stopped serving on {bind}"), + } +} + +/// A connection error that the device itself gave for 127.0.0.1, rather than an engine that is +/// not there: an engine that is down gives "Connection refused" (os error 61 on Apple systems, +/// 111 on Android). "No route to host" (EHOSTUNREACH, 65 on Apple systems, 113 on Android) to +/// loopback is the system declining the connection, as a VPN, a content filter or the system's +/// network policy does. +pub(crate) fn refused_by_device(detail: &str) -> bool { + let d = detail.to_ascii_lowercase(); + d.contains("no route to host") + || d.contains("network is unreachable") + || d.contains("os error 65)") + || d.contains("os error 113)") +} + +/// The coded error for an engine that does not answer: `detail` is the last connection error, +/// `port_held` whether something holds the engine's port (the engine's own listener, since the +/// app picked a free port for it). +pub(crate) fn not_answering(detail: &str, port_held: bool) -> String { + let code = if port_held && refused_by_device(detail) { + BLOCKED + } else { + FAILED + }; + coded(code, serde_json::json!({ "detail": detail })) +} + +/// The coded error for an engine whose server task ended. +pub(crate) fn ended(ended: &Ended, bind: &str) -> String { + coded( + FAILED, + serde_json::json!({ "detail": ended_detail(ended, bind) }), + ) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn parse(s: &str) -> serde_json::Value { + serde_json::from_str(s).unwrap() + } + + /// The error from #950: the device, not a missing engine. + const NO_ROUTE: &str = "error sending request for url (http://127.0.0.1:19113/api/version): \ + client error (Connect): tcp connect error: No route to host (os error 65)"; + const REFUSED: &str = "error sending request for url (http://127.0.0.1:19113/api/version): \ + client error (Connect): tcp connect error: Connection refused (os error 61)"; + + #[test] + fn no_route_to_its_own_port_is_the_device_refusing() { + assert!(refused_by_device(NO_ROUTE)); + assert!(refused_by_device( + "tcp connect error: No route to host (os error 113)" + )); + assert!(!refused_by_device(REFUSED)); + assert!(!refused_by_device("operation timed out")); + // A number that only starts like 65 is not EHOSTUNREACH. + assert!(!refused_by_device("os error 650)")); + + let v = parse(¬_answering(NO_ROUTE, true)); + assert_eq!(v["code"], BLOCKED); + assert_eq!(v["detail"], NO_ROUTE); + } + + #[test] + fn with_nothing_on_the_port_it_did_not_start() { + // No listener: whatever the device said, the engine is not there. + assert_eq!(parse(¬_answering(NO_ROUTE, false))["code"], FAILED); + assert_eq!(parse(¬_answering(REFUSED, false))["code"], FAILED); + // Its listener there and the connection refused or timing out: not the device. + assert_eq!(parse(¬_answering(REFUSED, true))["code"], FAILED); + assert_eq!(parse(¬_answering("timed out", true))["code"], FAILED); + } + + #[test] + fn an_ended_server_says_how_it_ended() { + let bind = "0.0.0.0:19113"; + let e = Ended::Error( + "in-process engine failed to bind 0.0.0.0:19113: Address already in use".into(), + ); + let v = parse(&ended(&e, bind)); + assert_eq!(v["code"], FAILED); + assert!(v["detail"] + .as_str() + .unwrap() + .contains("Address already in use")); + + let v = parse(&ended(&Ended::Panic("no data folder".into()), bind)); + assert_eq!(v["detail"], "it crashed on 0.0.0.0:19113: no data folder"); + let v = parse(&ended(&Ended::Stopped, bind)); + assert_eq!(v["detail"], "it stopped serving on 0.0.0.0:19113"); + } +} diff --git a/client/src-tauri/src/engine_mobile.rs b/client/src-tauri/src/engine_mobile.rs index ffd5c33ee..71bd81c9f 100644 --- a/client/src-tauri/src/engine_mobile.rs +++ b/client/src-tauri/src/engine_mobile.rs @@ -42,9 +42,25 @@ const FALLBACK_PORTS: std::ops::RangeInclusive = 19123..=19132; /// `engine_url_get`). static URL: std::sync::OnceLock = std::sync::OnceLock::new(); +/// The port `start` chose; a retry binds the same one, so the URL the renderer holds stays right. +static PORT_CHOSEN: std::sync::OnceLock = std::sync::OnceLock::new(); + /// `start` has run in this process. static STARTED_ONCE: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false); +/// The engine's server task is running. Its first step is binding the port, and it ends at once +/// when it cannot. +static SERVING: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false); + +/// Why the engine is not answering, as a coded error (`engine_in_app.rs`), until it answers. +/// The renderer reads it through `engine_diagnose`: the startup event alone can fire before the +/// page listens, and it was the only place the reason went (#950). +static FAILURE: std::sync::Mutex> = std::sync::Mutex::new(None); + +/// How long the engine gets to answer after a start, a retry or a return to the app. Its first +/// start sets up its data folder and journal before it serves (about 1.5 s in the simulator). +const ANSWER_WITHIN: std::time::Duration = std::time::Duration::from_secs(20); + /// The first port that can be bound now, 19113 first. A probe bind released at once: the /// engine binds it a moment later on its own task. fn pick_port() -> u16 { @@ -54,10 +70,127 @@ fn pick_port() -> u16 { .unwrap_or(PORT) } -/// Start the engine on a background task. Returns immediately with the -/// loopback URL; the server finishes binding within a few milliseconds. -/// The renderer's engine-status tick tolerates the brief startup race -/// (it retries), matching how the desktop readiness probe is advisory. +fn chosen_port() -> u16 { + PORT_CHOSEN.get().copied().unwrap_or(PORT) +} + +/// One line to the app's engine.log (`mobile_log.rs`), which the bug report carries. +fn log_line(text: &str) { + let _ = crate::crash_hook::stderr_line(&format!("[engine] {text}")); +} + +fn set_failure(app: &AppHandle, coded: String) { + log_line(&format!("in-app engine not answering: {coded}")); + if let Ok(mut f) = FAILURE.lock() { + *f = Some(coded.clone()); + } + let _ = app.emit("ps5upload-engine-startup-error", &coded); +} + +fn clear_failure() { + if let Ok(mut f) = FAILURE.lock() { + *f = None; + } +} + +fn failure() -> Option { + FAILURE.lock().ok().and_then(|f| f.clone()) +} + +/// Something holds the engine's port: binding it fails with "in use". That is the engine's own +/// listener, as the port was free when `start` chose it. +fn port_held() -> bool { + matches!( + std::net::TcpListener::bind((BIND_HOST, chosen_port())), + Err(e) if e.kind() == std::io::ErrorKind::AddrInUse + ) +} + +/// Run the engine's server on a task of its own and record how it ends: its error or its panic. +/// A panic used to end the task with no word anywhere but stderr. +fn spawn_serve(app: &AppHandle) { + use crate::engine_in_app::Ended; + let bind = format!("{BIND_HOST}:{}", chosen_port()); + SERVING.store(true, std::sync::atomic::Ordering::Relaxed); + let task_app = app.clone(); + tokio::spawn(async move { + let serve_bind = bind.clone(); + let served = tokio::spawn(async move { + ps5upload_engine::serve_in_process(&serve_bind, DEFAULT_PS5_ADDR.to_string()).await + }) + .await; + let ended = match served { + Ok(Ok(())) => Ended::Stopped, + Ok(Err(e)) => Ended::Error(format!("{e:#}")), + Err(e) if e.is_panic() => { + let p = e.into_panic(); + Ended::Panic( + p.downcast_ref::<&str>() + .map(|s| s.to_string()) + .or_else(|| p.downcast_ref::().cloned()) + .unwrap_or_else(|| "no message".to_string()), + ) + } + Err(e) => Ended::Error(e.to_string()), + }; + // The reason first: a waiter that sees the task gone finds it. + set_failure(&task_app, crate::engine_in_app::ended(&ended, &bind)); + SERVING.store(false, std::sync::atomic::Ordering::Relaxed); + }); +} + +fn serving() -> bool { + SERVING.load(std::sync::atomic::Ordering::Relaxed) +} + +/// Wait until the engine answers, up to `within`. The last connection error when it does not. +/// An answer counts only while the server task runs: in the iPhone Simulator a desktop engine on +/// the same port answers for an in-app engine that failed to bind. +async fn wait_answering(within: std::time::Duration) -> Result<(), String> { + let deadline = std::time::Instant::now() + within; + loop { + // The server task ended: waiting longer cannot help, and it recorded why. + if !serving() { + return Err("it is not running".to_string()); + } + let last = match probe().await { + Ok(()) if serving() => return Ok(()), + Ok(()) => continue, + Err(e) => e, + }; + if std::time::Instant::now() >= deadline { + return Err(last); + } + tokio::time::sleep(std::time::Duration::from_millis(250)).await; + } +} + +/// Wait for the engine to answer and record the outcome: a line in engine.log either way and, +/// when it does not answer, the reason for the renderer (the coded error). +async fn confirm_answering(app: &AppHandle, what: &str) -> Result<(), String> { + let started = std::time::Instant::now(); + match wait_answering(ANSWER_WITHIN).await { + Ok(()) => { + clear_failure(); + log_line(&format!( + "{what}: answering at {} after {} ms", + url(), + started.elapsed().as_millis() + )); + Ok(()) + } + Err(last) => { + // A server task that ended has said why; otherwise say what was measured. + if serving() || failure().is_none() { + set_failure(app, crate::engine_in_app::not_answering(&last, port_held())); + } + Err(failure().unwrap_or(last)) + } + } +} + +/// Start the engine on a background task. Returns immediately with the loopback URL; a watcher +/// then waits for the engine to answer and records why when it does not. pub async fn start(app: &AppHandle) -> Result<&'static str> { // Android can run setup again when its Activity is recreated while the process lives on; // the engine from the first run still holds the port, and a second bind would only fail @@ -66,30 +199,23 @@ pub async fn start(app: &AppHandle) -> Result<&'static str> { return Ok(url()); } let port = pick_port(); + let _ = PORT_CHOSEN.set(port); // The stream-install URL the console fetches names this port, not the default. // Before the engine task starts, as for `PS5UPLOAD_DATA_DIR` below. std::env::set_var("PS5UPLOAD_ENGINE_PORT", port.to_string()); let _ = URL.set(format!("http://127.0.0.1:{port}")); - let bind = format!("{BIND_HOST}:{port}"); point_engine_at_app_data(app); - let task_app = app.clone(); - tokio::spawn(async move { - if let Err(e) = - ps5upload_engine::serve_in_process(&bind, DEFAULT_PS5_ADDR.to_string()).await - { - let message = format!("in-app engine failed to start on {bind}: {e}"); - let _ = task_app.emit("ps5upload-engine-startup-error", &message); - // Log and let the renderer surface "engine unreachable" via - // its normal probe — don't panic the app over it. - eprintln!("[engine] in-process serve failed: {message}"); - } - }); + spawn_serve(app); let url = url(); if port != PORT { - eprintln!( - "[engine] 19113 is taken (a desktop PS5Upload on this Mac?); in-app engine on {url}" - ); + log_line(&format!( + "19113 is taken (a desktop PS5Upload on this Mac?); in-app engine on {url}" + )); } + let watch_app = app.clone(); + tokio::spawn(async move { + let _ = confirm_answering(&watch_app, "started").await; + }); let _ = app.emit("ps5upload-engine-ready", url); Ok(url) } @@ -151,6 +277,9 @@ pub struct Diagnosis { pub binary_error: Option, pub log_path: Option, pub os: &'static str, + /// Why the engine is not answering, as a coded error (`engine_in_app.rs`). None while it + /// answers, and before it has had its time to start. + pub startup_error: Option, } async fn probe() -> Result<(), String> { @@ -171,25 +300,41 @@ async fn probe() -> Result<(), String> { pub async fn diagnose(_app: &AppHandle) -> Diagnosis { let probe = probe().await; + // Only this engine's answer counts (see `wait_answering`). + let answering = probe.is_ok() && serving(); Diagnosis { url: url().to_string(), local: true, - answering: probe.is_ok(), + answering, probe_error: probe.err(), - child_running: None, - port_taken: None, + child_running: Some(serving()), + port_taken: Some(port_held()), binary_found: None, binary_error: None, log_path: crate::mobile_log::log_path().map(|p| p.display().to_string()), os: std::env::consts::OS, + startup_error: if answering { None } else { failure() }, } } -/// The in-process engine cannot be restarted without restarting the app. -pub async fn restart(_app: &AppHandle) -> Result { - Err(anyhow::anyhow!(crate::commands::shell_error::code_only( - "engine_restart_in_app" - ))) +/// "Try again" for the engine inside the app: a server that ended is started again on the same +/// port, and one still running gets a new listener (as after a return to the app). Then it gets +/// its time to answer. The error is the coded reason when it still does not. +pub async fn restart(app: &AppHandle) -> Result { + if !STARTED_ONCE.load(std::sync::atomic::Ordering::Relaxed) { + start(app).await?; + } else if serving() { + log_line("try again: listening again"); + ps5upload_engine::rebind_in_process(); + } else { + log_line("try again: starting the engine again"); + clear_failure(); + spawn_serve(app); + } + confirm_answering(app, "try again") + .await + .map(|()| url().to_string()) + .map_err(|e| anyhow::anyhow!(e)) } /// No-op on mobile, returning where the proxies stay. The desktop build made the engine URL @@ -205,14 +350,23 @@ pub fn set_url(_url: String) -> String { /// The app is back in front: if the engine has stopped answering, listen again. /// /// iOS can reclaim a suspended app's listening sockets (seen by others; not yet measured on an -/// iPhone here), and every renderer call goes through this one. The engine itself is fine, so -/// only the listener is re-created. -pub async fn check_listener() { +/// iPhone here), and every renderer call goes through this one. A running engine only gets a new +/// listener; one whose server ended is started again. +pub async fn check_listener(app: AppHandle) { if !STARTED_ONCE.load(std::sync::atomic::Ordering::Relaxed) { return; } - if let Err(e) = probe().await { - eprintln!("[engine] not answering after resume ({e}); listening again"); - ps5upload_engine::rebind_in_process(); + if serving() { + if let Err(e) = probe().await { + log_line(&format!( + "not answering after resume ({e}); listening again" + )); + ps5upload_engine::rebind_in_process(); + let _ = confirm_answering(&app, "after resume").await; + } + } else { + log_line("not running after resume; starting it again"); + spawn_serve(&app); + let _ = confirm_answering(&app, "after resume").await; } } diff --git a/client/src-tauri/src/lib.rs b/client/src-tauri/src/lib.rs index 1e21f9be7..4ec589a6d 100644 --- a/client/src-tauri/src/lib.rs +++ b/client/src-tauri/src/lib.rs @@ -39,6 +39,9 @@ mod engine; #[cfg(any(target_os = "android", target_os = "ios"))] #[path = "engine_mobile.rs"] mod engine; +// Why the engine inside a phone app is not answering, as the renderer words it (#950). +#[cfg(any(mobile, test))] +mod engine_in_app; // HTTP client for talking to either engine. `pub` only so // tests/engine_http_proxy.rs can drive it with proxy variables set. pub mod engine_http; @@ -822,7 +825,7 @@ pub fn run() { // Back from the background: iOS may have reclaimed the engine's listening socket. #[cfg(mobile)] if let tauri::RunEvent::Resumed = &event { - tauri::async_runtime::spawn(engine::check_listener()); + tauri::async_runtime::spawn(engine::check_listener(_handle.clone())); } if let tauri::RunEvent::Exit = event { // The window's last size and place, if the delayed save has not written it yet. diff --git a/client/src/components/EngineProblem.test.tsx b/client/src/components/EngineProblem.test.tsx index d168832e6..c373f1dc0 100644 --- a/client/src/components/EngineProblem.test.tsx +++ b/client/src/components/EngineProblem.test.tsx @@ -25,9 +25,11 @@ afterEach(() => { }); describe("the engine problem card", () => { - it("on a phone says to reopen the app, with no computer advice and no Restart", () => { + it("on a phone offers Try again, then reopening the app, with no computer advice (#950)", () => { const html = render(); - expect(html).toContain("Close the app fully and open it again."); + expect(html).toContain("Press Try again."); + expect(html).toContain("close the app fully and open it again."); + expect(html).toContain(">Try again"); expect(html).not.toContain("on this computer"); expect(html).not.toContain("Restart engine"); }); diff --git a/client/src/components/EngineProblem.tsx b/client/src/components/EngineProblem.tsx index e07786dde..dc09b67a0 100644 --- a/client/src/components/EngineProblem.tsx +++ b/client/src/components/EngineProblem.tsx @@ -13,6 +13,7 @@ import { isMobile } from "../lib/platform"; import { isTauriEnv } from "../lib/tauriEnv"; import { useConnectionStore } from "../state/connection"; import { setLiveEngineUrl } from "../state/engine"; +import { log } from "../state/logs"; import { shellErrorText } from "../lib/shellError"; import { useTr } from "../state/lang"; import { Button } from "./Button"; @@ -109,6 +110,18 @@ function explain( } } +/** The last reason the engine inside a phone app gave for not answering, logged once: the app's + * log (and so the bug report) then says why, not only the socket error (#950). */ +let loggedStartupError: string | null = null; + +function noteDiagnosis(d: EngineDiagnosis): void { + const why = d.startup_error ?? null; + if (why && why !== loggedStartupError) { + loggedStartupError = why; + log.error("engine", `the engine inside the app is not answering: ${why}`); + } +} + /** Why the app cannot reach its engine, measured by the desktop shell, with the fix and a * Restart button. In the web UI the engine is the server the page came from, so the panel * only says the connection was lost. */ @@ -127,6 +140,7 @@ export function EngineProblem({ compact = false }: { compact?: boolean }) { let cancelled = false; void engineDiagnose() .then((d) => { + noteDiagnosis(d); if (!cancelled) setDiag(d); }) .catch(() => {}); @@ -143,10 +157,14 @@ export function EngineProblem({ compact = false }: { compact?: boolean }) { setLiveEngineUrl(url); setStatus({ engineStatus: "up", engineError: null }); } catch (e) { - setRestartError(shellErrorText(e instanceof Error ? e.message : String(e), tr)); - void engineDiagnose() - .then(setDiag) - .catch(() => {}); + const raw = e instanceof Error ? e.message : String(e); + const d = await engineDiagnose().catch(() => null); + if (d) { + noteDiagnosis(d); + setDiag(d); + } + // On a phone the reason is already the panel's text: not twice. + if (d?.startup_error !== raw) setRestartError(shellErrorText(raw, tr)); } finally { setRestarting(false); } @@ -167,18 +185,26 @@ export function EngineProblem({ compact = false }: { compact?: boolean }) { "Check that the server (Docker container) is running, then reload this page.", ), }; - // On a phone the engine runs inside the app: Restart can only fail, and the computer advice - // does not apply. + // On a phone the engine runs inside the app: the computer advice does not apply. Try again + // starts it again (or makes it listen again), and the panel says why it is not answering. const phone = desktop && isMobile(); const shown = phone ? { - why: tr("engine_problem.phone.why", undefined, "The engine runs inside this app, and it stopped answering."), - fix: tr("engine_problem.phone.fix", undefined, "Close the app fully and open it again."), + why: diag?.startup_error + ? shellErrorText(diag.startup_error, tr) + : tr("engine_problem.phone.why", undefined, "The engine runs inside this app, and it stopped answering."), + fix: tr( + "engine_problem.phone.fix_v2", + undefined, + "Press Try again. If it still doesn't answer, close the app fully and open it again.", + ), } : text; - const canRestart = desktop && !phone && (diag?.local ?? true); + const canRestart = desktop && (phone || (diag?.local ?? true)); const stopReason = - engineError && engineError !== diag?.probe_error ? shellErrorText(engineError, tr) : null; + engineError && engineError !== diag?.probe_error && engineError !== diag?.startup_error + ? shellErrorText(engineError, tr) + : null; return (
void restart()} > - {tr("engine_problem.restart", undefined, "Restart engine")} + {phone + ? tr("engine_problem.phone.retry", undefined, "Try again") + : tr("engine_problem.restart", undefined, "Restart engine")} )} +
+ {/* Whole, on two lines if it must (a wide font, a long language): the count is the point. */} + + {countLabel} + + {fromLabel && ( + + {fromLabel} + + )} +
+ +
+ ); +} + /** The actions for the selected items, where the bottom navigation is (it hides meanwhile: * `html[data-selection-bar]` in index.css). */ export function PhoneSelectionActions({ diff --git a/client/src/screens/FileSystem/index.tsx b/client/src/screens/FileSystem/index.tsx index 998c25c58..f0195e76e 100644 --- a/client/src/screens/FileSystem/index.tsx +++ b/client/src/screens/FileSystem/index.tsx @@ -283,7 +283,7 @@ import { ltr } from "../../i18n"; import NotificationInbox from "../../layout/NotificationInbox"; import { createLongPress } from "../../lib/longPress"; import { backUpTarget, filesBackStep, folderTitle } from "./phoneFiles"; -import { FilesColumn, PhoneFolderRow, PhoneSelectionActions, PhoneSelectionRow } from "./PhoneBars"; +import { FilesColumn, PhoneFolderRow, PhoneSelectionActions, PhoneSelectionRow, PhoneStagedBar } from "./PhoneBars"; function parent(p: string): string { if (p === "/" || p === "") return "/"; @@ -2443,7 +2443,9 @@ export default function FileSystemScreen() { })); if (items.length === 0) return; clipboard.set(op, items, path); + // Selecting is done: on a phone the staged items' bar takes the selection's place. setSelected(new Set()); + setSelectMode(false); }; // Paste: apply clipboard.op to every item, pasting into `path`. @@ -3144,6 +3146,9 @@ export default function FileSystemScreen() { const selecting = selectMode || selectionActive; /** Selection mode as the phone shows it: checkboxes, the selection row, the bottom bar. */ const phoneSelecting = phone && selecting && view === null; + /** Something staged to copy or move, shown in a bar where the bottom navigation is (#936): + * not while selecting, whose actions have that place. */ + const phoneStaged = phone && clipboardActive && !selecting && view === null; const endSelection = () => { setSelected(new Set()); setSelectMode(false); @@ -3156,12 +3161,20 @@ export default function FileSystemScreen() { } | null>(null); const togglePhoneMenu = (kind: NonNullable["kind"], anchor: DOMRect) => setPhoneMenu((cur) => (cur?.kind === kind ? null : { kind, anchor })); - // Back on the listing once nothing covers it: selection mode first, then up one folder; from - // the drive's root it leaves Files. Menus, dialogs and the inline editors close before that. - const backState = { view: view !== null, selecting, path, driveRoot: currentVolumePath }; + // Back on the listing once nothing covers it: selection mode first, then the staged items' + // bar, then up one folder; from the drive's root it leaves Files. Menus, dialogs and the inline + // editors close before that. + const backState = { + view: view !== null, + selecting, + staged: phoneStaged, + path, + driveRoot: currentVolumePath, + }; useScreenBack(filesBackStep(backState) !== null, () => { const step = filesBackStep(backState); if (step === "end-selection") endSelection(); + else if (step === "cancel-staged") clipboard.clear(); else if (step === "up") { const to = backUpTarget(path, currentVolumePath); if (to !== null) setPath(to); @@ -3173,12 +3186,14 @@ export default function FileSystemScreen() { useBackDismiss(linkInto !== null, () => setLinkInto(null)); // The selection's actions take the bottom navigation's place (index.css hides it). Only while // Files is on show: a kept, hidden screen has its effects torn down. + // The staged items' bar the same way. + const phoneBottomBar = phoneSelecting || phoneStaged; useEffect(() => { - if (!phoneSelecting) return; + if (!phoneBottomBar) return; const root = document.documentElement; root.setAttribute("data-selection-bar", ""); return () => root.removeAttribute("data-selection-bar"); - }, [phoneSelecting]); + }, [phoneBottomBar]); // One bar at the top, not two (#936): on a phone the compact header carries the bell, and the // app's top bar gives it its place (`html[data-screen-bar]`, index.css). Held sideways too, // where the row beside the sidebar gives way and only its console tabs stay: two rows left @@ -4304,9 +4319,10 @@ export default function FileSystemScreen() { {/* Everything under the header: on a phone, the one part that scrolls. */}
{/* Clipboard banner: non-empty clipboard shows what's staged and - where it came from; paste target is always the current path. */} + where it came from; paste target is always the current path. A phone has a bar + at the bottom instead (PhoneStagedBar). */} {clipboardActive && ( -
+
@@ -5128,6 +5144,29 @@ export default function FileSystemScreen() { /> )} + {phoneStaged && ( + <> +
+ void runPaste()} + pasteDisabled={bulkOp.op !== null || !host?.trim()} + cancelLabel={tr("cancel", undefined, "Cancel")} + onCancel={() => clipboard.clear()} + /> + + )}
{preview && ( diff --git a/client/src/screens/FileSystem/phoneFiles.test.ts b/client/src/screens/FileSystem/phoneFiles.test.ts index 27f35d0f6..a9cc66f56 100644 --- a/client/src/screens/FileSystem/phoneFiles.test.ts +++ b/client/src/screens/FileSystem/phoneFiles.test.ts @@ -11,6 +11,13 @@ describe("system Back on the Files listing (#932)", () => { expect(at("/mnt/usb0", { selecting: true })).toBe("end-selection"); }); + it("then lets go of what is staged to copy or move, at a drive's root too (#936)", () => { + expect(at("/mnt/usb0/homebrew", { selecting: true, staged: true })).toBe("end-selection"); + expect(at("/mnt/usb0/homebrew", { staged: true })).toBe("cancel-staged"); + expect(at("/mnt/usb0", { staged: true })).toBe("cancel-staged"); + expect(at("/mnt/usb0/homebrew", { staged: true, view: true })).toBeNull(); + }); + it("then goes up one folder", () => { expect(at("/mnt/usb0/homebrew/games")).toBe("up"); expect(backUpTarget("/mnt/usb0/homebrew/games", "/mnt/usb0")).toBe("/mnt/usb0/homebrew"); diff --git a/client/src/screens/FileSystem/phoneFiles.ts b/client/src/screens/FileSystem/phoneFiles.ts index 690a29e47..4aef76661 100644 --- a/client/src/screens/FileSystem/phoneFiles.ts +++ b/client/src/screens/FileSystem/phoneFiles.ts @@ -3,10 +3,11 @@ /** What one press of system Back does on the Files listing once no menu, sheet or dialog is open * (those close first, lib/systemBack). Null: nothing here, the press leaves Files. */ -export type FilesBackStep = "end-selection" | "up" | null; +export type FilesBackStep = "end-selection" | "cancel-staged" | "up" | null; /** - * Leave selection mode first, then go up one folder, and leave Files from the top. + * Leave selection mode first, then let go of what is staged to copy or move (its bar is where the + * bottom navigation was), then go up one folder, and leave Files from the top. * * The top is the drive's root (/data, /mnt/usb0): a phone's file manager stops at its storage, and * the folders above a drive (/mnt) are not where anyone was. Outside every known drive it is "/". @@ -18,12 +19,15 @@ export function filesBackStep(s: { view: boolean; /** Selection mode: something is selected, or "Select" was picked. */ selecting: boolean; + /** Something is staged to copy or move, and its bar shows (#936). */ + staged?: boolean; path: string; /** The drive the path is on, or null outside every known drive. */ driveRoot: string | null; }): FilesBackStep { if (s.view) return null; if (s.selecting) return "end-selection"; + if (s.staged) return "cancel-staged"; return backUpTarget(s.path, s.driveRoot) === null ? null : "up"; } diff --git a/scripts/i18n-source-hashes.json b/scripts/i18n-source-hashes.json index 571e7fa62..d046e5a70 100644 --- a/scripts/i18n-source-hashes.json +++ b/scripts/i18n-source-hashes.json @@ -3863,6 +3863,9 @@ "fs_paste_conflict_body": "51956c23 ZphiMMcOUt2iyLZBb0Wgg2tam8XABgSOo2qmCtRQEV5DYdFadKYEkog8jw8d", "fs_paste_conflict_ok": "95e15439 N0zOPNSUkdOW687LrU_OI4TD20jMmDe5IWdOxJAxP8wgF8YGHeS5NGExs2PA", "fs_paste_conflict_title": "9ad6506c CgR-za5ajrQ4gF8ZSTceZ5dhLM_tmcofyHAGrezhbhq0hrRWaBnOPaLYhnd7", + "fs_paste_done_copy": "2c3e932e if5SIUzamEUcpgfCQn6covt6m3uN_18qdJTku8PwnTzjWTzynKsQRExwq6eg", + "fs_paste_done_move": "03979e26 YnbtaT_lVcVo096OrloOfc11txxZf_hQswqGHq3BdEf3sLbVtx7yFJfl7bE1", + "fs_paste_failed": "65d981a6 xfvR1UJSQBgw3p8ttIztrh7yhnPGl-wdkaDw3s11_oE5Sr_8OF7la9Pkl6-8", "fs_paste_here": "f86b9174 -RMB_o2AEE-4yxXEQwhojN2Nd4uZo2LNmF0RM0uZxv5c-StkY5udqEd-ZujG", "fs_path_gone": "e01fa28b df1wKPmMmZKwSGZ4VcVn5E3q2Dr2E1K8w407n7ntPWmr2B2evre5nszP6_Kx", "fs_path_gone_body": "5d9ec508 Vt9SQamPMaPqRY4HvxPKrYUwDoW63it8VmYA_gzwaxKQ4H_adWo49Y6dX6dX", @@ -3943,6 +3946,10 @@ "fs_space_here_v2": "33e38909 gjBsMj_9tl-IRzx54JqzGdw8CIGCI_ZBDp4V5hTQ_77zapPUNoPFoKKSjvm_", "fs_space_open_folder": "d79fbeb7 T7eb6nUpCsB-zeP8sRAqiwnSwo9uW5llqkslB6iQr584RfbASvkih3hhFcUb", "fs_space_title": "5e7e7d8c rdqYuBzJGURHaQ_6jgogqeWHVBf_U38tZNDZkflnnAj_gqxZZb2gPsLMPoSq", + "fs_staged_bar": "8bc3b186 muLpt78Z66qlcBolF4hscjlCyMhplWe_sBIRHeuPLiYP-qYj7zTKjWte6gMe", + "fs_staged_copy": "611064f2 -vMJb1m7fVCA1z7T-4qzUjXCwrL7pVnsiMTcn3T8ACVODsEhaTngTuULQWyn", + "fs_staged_from": "0562430e p-DEu7x9ztBUoM3c6wlwXgZzc-9UWFojjC6n_4emz13EGUQo6Z8LpQEdnjBA", + "fs_staged_move": "35038a60 2EQ4TCez8CeFwAf_3E7jZ45bCE_CrKmrlenD029m3DpsRIpBnfy4yRVjKdGg", "fs_tag_folder": "74ccd433 vJBeHKMwKc0LhTELN8tQ7K3HdMzLpXj7D5VYdMzUY5c6DRDoHfmlU3fHgqrx", "fs_task_decompress": "d8134065 i2cbnCjFaS9UmMqyhgqiX5dFQIFAFWihCi3DjOXiiXEhvGeBhWItjXMrUSXH", "fs_task_delete": "3cf8146e jj-qOTR8dcHAjj-gHyUMatFIBycvcsGGBiIJnc1V498klLAIUNZ6Kxec6DTh", From 7dc9f3313e4483d31e340abf5ebed67523d14a40 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:28:34 -0800 Subject: [PATCH 15/75] Files on a phone: the list keeps its room above the bottom bar The column rules sat in a file of their own, while index.css has its Tailwind layers flattened into specificity (postcss.config.mjs): the reset and the utilities outranked them, so the page kept its bottom padding and the list had none, and its last rows ended behind the bottom navigation. The rules now win (!important, except the list's overflow, which a dialog's scroll lock sets inline), and the space for scrolled-into-view rows only applies where the bars float, as on the page itself. The e2e checks the padding moved from the page to the list. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/e2e/files-phone-paste-bar.spec.ts | 4 ++ client/src/screens/FileSystem/filesColumn.css | 55 ++++++++++--------- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/client/e2e/files-phone-paste-bar.spec.ts b/client/e2e/files-phone-paste-bar.spec.ts index 161498551..b1c1b2e08 100644 --- a/client/e2e/files-phone-paste-bar.spec.ts +++ b/client/e2e/files-phone-paste-bar.spec.ts @@ -213,6 +213,10 @@ for (const viewport of PHONES) { return out; }); expect(scrollingAncestors).toEqual([]); + // The room under the end is the list's own now (where the bottom bar floats), not the page's. + expect(await page.locator("[data-scroll-root]").evaluate((el) => getComputedStyle(el).paddingBottom)).toBe("0px"); + if (viewport.width < 768) + expect(parseFloat(await list.evaluate((el) => getComputedStyle(el).paddingBottom))).toBeGreaterThanOrEqual(88); expect(await header(page).evaluate((h) => h.closest("[data-files-scroll]") === null)).toBe(true); // Keyboard and screen-reader order: the header, then the list. expect( diff --git a/client/src/screens/FileSystem/filesColumn.css b/client/src/screens/FileSystem/filesColumn.css index affd714e2..352a63286 100644 --- a/client/src/screens/FileSystem/filesColumn.css +++ b/client/src/screens/FileSystem/filesColumn.css @@ -4,42 +4,47 @@ header moved and stretched with the list. The list keeps the page's side padding as its own, so rows' edges and shadows are not cut off at its sides. Here, not in index.css: that one is in the /join and /pad pages too, which have a size budget, - and this comes with the Files screen's own chunk. */ + and this comes with the Files screen's own chunk. + !important: postcss.config.mjs flattens Tailwind's layers into specificity (the reset is four + ids strong, utilities eight), which a plain selector in a file of its own cannot outrank. Not + the list's overflow-y, which a dialog's scroll lock overrides inline (lib/useScrollLock). */ html[data-files-column] [data-scroll-root] { - display: flex; - flex-direction: column; - overflow-y: hidden; - padding-bottom: 0; + display: flex !important; + flex-direction: column !important; + overflow-y: hidden !important; + padding-bottom: 0 !important; } html[data-files-column] [data-files-page] { --files-pad-x: clamp(2rem, 2.5vw, 3rem); - display: flex; - flex: 1 1 auto; - flex-direction: column; - min-height: 0; - padding-bottom: 0; + display: flex !important; + flex: 1 1 auto !important; + flex-direction: column !important; + min-height: 0 !important; + padding-bottom: 0 !important; } @media (max-width: 767px) { html[data-files-column] [data-files-page] { --files-pad-x: 1rem; } } -html[data-files-column] [data-files-page] > *, -html[data-files-column] [data-files-main] > * { flex-shrink: 0; } html[data-files-column] [data-files-main] { - display: flex; - flex: 1 1 auto; - flex-direction: column; - min-height: 0; + display: flex !important; + flex: 1 1 auto !important; + flex-direction: column !important; + min-height: 0 !important; } +html[data-files-column] [data-files-page] > :not([data-files-main]), +html[data-files-column] [data-files-main] > :not([data-files-scroll]) { flex-shrink: 0 !important; } html[data-files-column] [data-files-scroll] { - flex: 1 1 auto; - min-height: 0; - margin-inline: calc(-1 * var(--files-pad-x)); - padding-inline: var(--files-pad-x); - padding-bottom: var(--float-bottom); + flex: 1 1 auto !important; + min-height: 0 !important; + margin-inline: calc(-1 * var(--files-pad-x)) !important; + padding-inline: var(--files-pad-x) !important; + padding-bottom: var(--float-bottom) !important; overflow-x: hidden; overflow-y: auto; - overscroll-behavior: contain; - scroll-padding-bottom: calc(var(--float-bottom) + 4.5rem); + overscroll-behavior: contain !important; +} +/* As the page's own scroller (`.tab-room`, index.css): what is scrolled into view stops above the + floating bars, where they float. */ +@media (max-width: 767.98px) { + html[data-files-column] [data-files-scroll] { scroll-padding-bottom: calc(var(--float-bottom) + 4.5rem) !important; } } -html[data-files-column] [data-files-page] > [data-files-main], -html[data-files-column] [data-files-main] > [data-files-scroll] { flex-shrink: 1; } From 046c045559687583894787ae82d33fa6fb7d35d5 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:31:45 -0800 Subject: [PATCH 16/75] Files on a phone: Back goes up folders while something is staged, and lets go of it at the drive's root Back is how one reaches the folder to paste into, so it must not drop a cut. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/e2e/files-phone-paste-bar.spec.ts | 16 ++++++++++------ client/src/screens/FileSystem/phoneFiles.test.ts | 3 ++- client/src/screens/FileSystem/phoneFiles.ts | 9 +++++---- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/client/e2e/files-phone-paste-bar.spec.ts b/client/e2e/files-phone-paste-bar.spec.ts index b1c1b2e08..6f2540938 100644 --- a/client/e2e/files-phone-paste-bar.spec.ts +++ b/client/e2e/files-phone-paste-bar.spec.ts @@ -7,7 +7,8 @@ import { expect, test, type Locator, type Page, type Route } from "@playwright/t // that its box does not change when the list is scrolled to its end and further. // - What is staged to copy or move shows in a bar at the bottom (Paste here, Cancel) instead of a // banner over the list; it goes once the paste is done (a copy as well as a cut, and when the -// source is deleted), a toast says so and goes by itself, and Back lets go of it. +// source is deleted), a toast says so and goes by itself, and Back keeps it while going up folders +// and lets go of it at the drive's root. // Tablets and computers keep the banner, which now goes after a paste as well. const HOST = "192.168.0.5"; @@ -319,7 +320,7 @@ for (const viewport of PHONES) { await expect(toast).toHaveCount(0, { timeout: 8_000 }); }); - test("cut: pasted items leave the clipboard; Back lets go of what is staged", async ({ page }) => { + test("cut: pasted items leave the clipboard; Back keeps what is staged up to the drive's root", async ({ page }) => { const ops = await openFiles(page, { wideFont }); await stage(page, "cut", ["file-02.pkg", "file-03.pkg"]); const bar = stagedBar(page); @@ -338,13 +339,16 @@ for (const viewport of PHONES) { await expect(title(page)).toHaveText("homebrew"); await stage(page, "copy", ["file-04.pkg"]); await expect(bar).toBeVisible(); + // Back goes up a folder and keeps what is staged: that is how one gets to the folder to + // paste into. expect(await back(page)).toBe(true); - await expect(bar).toHaveCount(0); - await expect(title(page)).toHaveText("homebrew"); - if (viewport.width < 768) await expect(page.locator("[data-bottom-nav]")).toBeVisible(); - // Then up a folder, as before. + await expect(title(page)).toHaveText("usb0"); + await expect(bar).toBeVisible(); + // At the drive's root, Back lets go of it, and the folder stays. expect(await back(page)).toBe(true); + await expect(bar).toHaveCount(0); await expect(title(page)).toHaveText("usb0"); + if (viewport.width < 768) await expect(page.locator("[data-bottom-nav]")).toBeVisible(); // Cancel on the bar lets go too. await row(page, "homebrew").getByRole("button", { name: "homebrew", exact: true }).tap(); diff --git a/client/src/screens/FileSystem/phoneFiles.test.ts b/client/src/screens/FileSystem/phoneFiles.test.ts index a9cc66f56..c68f21dff 100644 --- a/client/src/screens/FileSystem/phoneFiles.test.ts +++ b/client/src/screens/FileSystem/phoneFiles.test.ts @@ -13,7 +13,8 @@ describe("system Back on the Files listing (#932)", () => { it("then lets go of what is staged to copy or move, at a drive's root too (#936)", () => { expect(at("/mnt/usb0/homebrew", { selecting: true, staged: true })).toBe("end-selection"); - expect(at("/mnt/usb0/homebrew", { staged: true })).toBe("cancel-staged"); + // Staged items stay while Back goes up to the folder to paste into; at the top Back lets go. + expect(at("/mnt/usb0/homebrew", { staged: true })).toBe("up"); expect(at("/mnt/usb0", { staged: true })).toBe("cancel-staged"); expect(at("/mnt/usb0/homebrew", { staged: true, view: true })).toBeNull(); }); diff --git a/client/src/screens/FileSystem/phoneFiles.ts b/client/src/screens/FileSystem/phoneFiles.ts index 4aef76661..0f5e1a39b 100644 --- a/client/src/screens/FileSystem/phoneFiles.ts +++ b/client/src/screens/FileSystem/phoneFiles.ts @@ -6,8 +6,9 @@ export type FilesBackStep = "end-selection" | "cancel-staged" | "up" | null; /** - * Leave selection mode first, then let go of what is staged to copy or move (its bar is where the - * bottom navigation was), then go up one folder, and leave Files from the top. + * Leave selection mode first, then go up one folder, and leave Files from the top. What is staged to + * copy or move stays while Back goes up (that is how one gets to the folder to paste into); at the + * top, Back lets go of it first (its bar is where the bottom navigation was), then leaves Files. * * The top is the drive's root (/data, /mnt/usb0): a phone's file manager stops at its storage, and * the folders above a drive (/mnt) are not where anyone was. Outside every known drive it is "/". @@ -27,8 +28,8 @@ export function filesBackStep(s: { }): FilesBackStep { if (s.view) return null; if (s.selecting) return "end-selection"; - if (s.staged) return "cancel-staged"; - return backUpTarget(s.path, s.driveRoot) === null ? null : "up"; + if (backUpTarget(s.path, s.driveRoot) !== null) return "up"; + return s.staged ? "cancel-staged" : null; } /** Where Back goes up to from `path`, or null at the top (see filesBackStep). */ From 1300716bac21e21692bae3a41311cccada823bf4 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 08:46:01 -0800 Subject: [PATCH 17/75] Tar listing: refuse archives past 2 000 000 entries or 512 MiB of names The tar listing keeps one record per file and folder with no limit, so an archive of millions of empty members could grow it without end. The largest known game has about 223 000 files; the listing now stops at 2 000 000 files and folders, or when the names add up to more than 512 MiB, with a plain message. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- .../crates/ps5upload-core/src/tar_archive.rs | 52 ++++++++++++- .../ps5upload-core/src/tar_archive/tests.rs | 75 +++++++++++++++++++ 2 files changed, 126 insertions(+), 1 deletion(-) diff --git a/engine/crates/ps5upload-core/src/tar_archive.rs b/engine/crates/ps5upload-core/src/tar_archive.rs index ca842f56a..3156ad5a1 100644 --- a/engine/crates/ps5upload-core/src/tar_archive.rs +++ b/engine/crates/ps5upload-core/src/tar_archive.rs @@ -740,6 +740,49 @@ fn unread_after(kind: &Kind, size: u64) -> u64 { } } +/// The most entries (files and folders) one listing keeps. The listing holds a record per +/// entry (about 100 bytes plus its name), so an archive of millions of empty members would +/// otherwise grow it without end. The largest known game has about 223 000 files and 19 000 +/// folders; this is eight times that, and a listing this long holds about 400 MiB. +pub const MAX_TAR_ENTRIES: usize = 2_000_000; + +/// The most name bytes (every kept path added up) one listing holds: a real game's names come +/// to some tens of MiB, long names on millions of entries to far more. +pub const MAX_TAR_NAME_BYTES: u64 = 512 << 20; + +#[cfg(test)] +thread_local! { + /// Lower caps for one test thread, so a test archive needs not two million members. + static TEST_CAPS: std::cell::Cell> = const { std::cell::Cell::new(None) }; +} + +fn listing_caps() -> (usize, u64) { + #[cfg(test)] + if let Some(c) = TEST_CAPS.with(|c| c.get()) { + return c; + } + (MAX_TAR_ENTRIES, MAX_TAR_NAME_BYTES) +} + +/// Refuses a listing that has grown past [`MAX_TAR_ENTRIES`] or [`MAX_TAR_NAME_BYTES`]. +fn check_listing_size(entries: usize, name_bytes: u64) -> io::Result<()> { + let (max_entries, max_bytes) = listing_caps(); + if entries > max_entries { + return Err(fault(TarFault::Unsupported(format!( + "the archive has more than {max_entries} files and folders, more than any game: \ + it is not opened" + )))); + } + if name_bytes > max_bytes { + return Err(fault(TarFault::Unsupported(format!( + "the archive's file names add up to more than {} MiB, more than any game: it is \ + not opened", + max_bytes >> 20 + )))); + } + Ok(()) +} + fn headers_too_big() -> io::Error { corrupt(format!( "one entry's headers (its long name or PAX header) are over {} MiB, which no real \ @@ -1088,6 +1131,7 @@ fn list(path: &Path, watch: TarWatch<'_>) -> io::Result { let mut dirs: BTreeSet = BTreeSet::new(); let (mut links, mut special) = (0u64, 0u64); let mut param: Option<(usize, String, Vec)> = None; + let mut name_bytes = 0u64; let result = (|| -> io::Result<()> { let mut ar = tar::Archive::new(&mut opened); let mut entries = entries(&mut ar, codec == Codec::None).map_err(classify)?; @@ -1119,13 +1163,19 @@ fn list(path: &Path, watch: TarWatch<'_>) -> io::Result { // `./` (the archive's own root) carries nothing; an unsafe folder name is // ignored, its files are refused by name. if let Some(rel) = sanitize_zip_entry(&name) { - dirs.insert(rel); + let len = rel.len() as u64; + if dirs.insert(rel) { + name_bytes = name_bytes.saturating_add(len); + check_listing_size(files.len() + dirs.len(), name_bytes)?; + } } } Kind::File => { let Some(rel) = sanitize_zip_entry(&name) else { return Err(fault(TarFault::UnsafePath(format!("{name:?}")))); }; + name_bytes = name_bytes.saturating_add(rel.len() as u64); + check_listing_size(files.len() + dirs.len() + 1, name_bytes)?; let size = entry.size(); let mtime = entry.header().mtime().unwrap_or(0); let mode = match entry.header().mode().unwrap_or(0) & 0o777 { diff --git a/engine/crates/ps5upload-core/src/tar_archive/tests.rs b/engine/crates/ps5upload-core/src/tar_archive/tests.rs index 44136c7d7..c95040dae 100644 --- a/engine/crates/ps5upload-core/src/tar_archive/tests.rs +++ b/engine/crates/ps5upload-core/src/tar_archive/tests.rs @@ -815,6 +815,81 @@ fn convert_unpacks_tars_and_zstd_zips_and_the_zip_preview_reads_a_zstd_param_jso .is_err()); } +/// A tar of `files` empty files under `folders` folders, compressed with `codec`. +fn many_entries(path: &Path, folders: usize, files: usize, codec: Codec) { + let mut b = tar::Builder::new(Vec::new()); + for i in 0..folders { + let mut h = header(tar::EntryType::Directory, 0); + b.append_data(&mut h, format!("game/d{i}/"), io::empty()) + .unwrap(); + } + for i in 0..files { + let mut h = header(tar::EntryType::Regular, 0); + b.append_data(&mut h, format!("game/f{i}.bin"), io::empty()) + .unwrap(); + } + let tar = b.into_inner().unwrap(); + let bytes = match codec { + Codec::None => tar, + c => compress(c, &tar), + }; + std::fs::write(path, bytes).unwrap(); +} + +#[test] +fn a_listing_past_the_entry_or_name_cap_is_refused_in_plain_words() { + const { + assert!( + MAX_TAR_ENTRIES >= 2_000_000, + "far above a real game's 223 000 files" + ) + }; + let d = temp_dir("entry-cap"); + let set = |c: Option<(usize, u64)>| TEST_CAPS.with(|t| t.set(c)); + for codec in [Codec::None, Codec::Zstd] { + let tag = codec.name(); + // Files and folders count together: 20 + 30 is at the cap, one more is past it. + set(Some((50, u64::MAX))); + let at = d.join(format!("at-{tag}.tar")); + many_entries(&at, 20, 30, codec); + let l = tar_layout(&at).unwrap(); + assert_eq!((l.files.len(), l.dirs.len()), (30, 21), "{tag}"); + let past = d.join(format!("past-{tag}.tar")); + many_entries(&past, 20, 31, codec); + let e = tar_layout(&past).unwrap_err(); + assert!( + matches!(tar_fault_of(&e), Some(TarFault::Unsupported(m)) + if m.contains("more than 50 files and folders")), + "{tag}: {e}" + ); + // A folder past the cap is refused too. + let past = d.join(format!("past-dirs-{tag}.tar")); + many_entries(&past, 60, 0, codec); + assert!(tar_layout(&past).is_err(), "{tag}"); + // The names' bytes have their own cap. + set(Some((usize::MAX, 1 << 20))); + let long = d.join(format!("long-{tag}.tar")); + let mut b = tar::Builder::new(Vec::new()); + for i in 0..300 { + let mut h = header(tar::EntryType::Regular, 0); + let name = format!("game/{}/{i}.bin", "n".repeat(4000)); + b.append_data(&mut h, name, io::empty()).unwrap(); + } + let tar = b.into_inner().unwrap(); + let bytes = match codec { + Codec::None => tar, + c => compress(c, &tar), + }; + std::fs::write(&long, bytes).unwrap(); + let e = tar_layout(&long).unwrap_err(); + assert!( + matches!(tar_fault_of(&e), Some(TarFault::Unsupported(m)) if m.contains("1 MiB")), + "{tag}: {e}" + ); + } + set(None); +} + /// Decode speed of real archives: the listing, then a full walk. /// `PS5UPLOAD_TAR_BENCH=a.tar.zst:b.tgz cargo test --release -p ps5upload-core --lib tar_bench -- --ignored --nocapture` #[test] From 37bba478e888dcb0f981e7e05f953e448f78082f Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 08:54:52 -0800 Subject: [PATCH 18/75] Play Together: a kicked guest's late input never reaches the stream's controller The stream's controller was keyed by console only, so input a guest sent just before being kicked could still land on it, even after another guest took the seat. The seat now remembers which guest has it, and a guest's input is dropped unless they are that guest. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- engine/crates/ps5upload-engine/src/join.rs | 47 ++++---- .../ps5upload-engine/src/rp_stream_api.rs | 102 ++++++++++++++---- 2 files changed, 107 insertions(+), 42 deletions(-) diff --git a/engine/crates/ps5upload-engine/src/join.rs b/engine/crates/ps5upload-engine/src/join.rs index 82c6f7055..3d724ea66 100644 --- a/engine/crates/ps5upload-engine/src/join.rs +++ b/engine/crates/ps5upload-engine/src/join.rs @@ -1116,10 +1116,11 @@ pub(crate) enum Effect { Say(mpsc::Sender, Out), Link(link::Cmd), Log(String), - /// The guest on [`STREAM_SEAT`]'s controller state (None: let go). - SeatPad(Option), - /// Whether a guest has the stream's controller, so the host's page is kept off it. - Seat(bool), + /// The guest (by id) on [`STREAM_SEAT`]'s controller state (None: let go). Dropped unless + /// they are the one who has it, so a kicked guest's late input never lands. + SeatPad(u64, Option), + /// Which guest has the stream's controller (None: none), so the host's page is kept off it. + Seat(Option), /// Move this guest off the stream's controller onto a helper pad ([`move_off_seat`]). MoveOff(u64), } @@ -1337,7 +1338,7 @@ impl Party { } if g.player == STREAM_SEAT { g.seat_input_at = None; - fx.push(Effect::SeatPad(None)); + fx.push(Effect::SeatPad(g.id, None)); } } } @@ -1378,8 +1379,8 @@ impl Party { // (One moving off it already let it go.) if g.player == STREAM_SEAT && g.seat_move == SeatMove::No { g.seat_input_at = None; - fx.push(Effect::SeatPad(None)); - fx.push(Effect::Seat(false)); + fx.push(Effect::SeatPad(g.id, None)); + fx.push(Effect::Seat(None)); } g.seat_move = SeatMove::No; let s = &g.stats; @@ -1520,8 +1521,8 @@ impl Party { } else { SeatMove::Wanted }; - fx.push(Effect::SeatPad(None)); - fx.push(Effect::Seat(false)); + fx.push(Effect::SeatPad(g.id, None)); + fx.push(Effect::Seat(None)); fx.push(Effect::Log(format!( "join: the stream's controller on {console} goes back to the host ({why}); its guest moves to a pad of their own" ))); @@ -1639,13 +1640,15 @@ impl Party { .is_some_and(|t| now.duration_since(t) >= vpad::NEUTRAL_AFTER) { g.seat_input_at = None; - fx.push(Effect::SeatPad(None)); + fx.push(Effect::SeatPad(g.id, None)); } } // Held while a guest keeps it (also on a session that replaced the old one), and let go // when none does: a claim racing a give-back (the picture back on) heals here. if live.is_some() { - fx.push(Effect::Seat(self.guests.iter().any(|g| g.on_seat()))); + fx.push(Effect::Seat( + self.guests.iter().find(|g| g.on_seat()).map(|g| g.id), + )); } for id in gone { fx.extend(self.leave(id, "timeout", now)); @@ -1842,8 +1845,8 @@ fn apply(console: &str, fx: Vec) { } Effect::Link(c) => link::send(console, c), Effect::Log(s) => crate::log_at!(Info, "together", "{s}"), - Effect::SeatPad(state) => crate::rp_stream_api::push_guest_pad(console, state), - Effect::Seat(on) => crate::rp_stream_api::guest_seat(console, on), + Effect::SeatPad(id, state) => crate::rp_stream_api::push_guest_pad(console, id, state), + Effect::Seat(guest) => crate::rp_stream_api::guest_seat(console, guest), Effect::MoveOff(id) => match tokio::runtime::Handle::try_current() { Ok(h) => { h.spawn(move_off_seat(console.to_string(), id)); @@ -2693,7 +2696,7 @@ async fn resume(socket: &mut S, token: &str) -> Option { let fx = if g.seat_move == SeatMove::No { g.seat_input_at = None; g.playing = false; - vec![Effect::SeatPad(None), Effect::Seat(false)] + vec![Effect::SeatPad(id, None), Effect::Seat(None)] } else { Vec::new() }; @@ -3009,7 +3012,7 @@ async fn ask( if !ok { return Some(Admit::Refused("closed")); } - crate::rp_stream_api::guest_seat(&console, true); + crate::rp_stream_api::guest_seat(&console, Some(gid)); crate::log_at!( Info, "together", @@ -3202,7 +3205,7 @@ fn forward_pad(key: &str, console: &str, id: u64, gen: u64, mut st: PadState) { if let Some((slot, strip, token)) = mask.flatten() { st.buttons &= !strip; if slot == STREAM_SEAT { - crate::rp_stream_api::push_guest_pad(console, Some(controller_state(&st))); + crate::rp_stream_api::push_guest_pad(console, id, Some(controller_state(&st))); } else { link::send( console, @@ -6012,20 +6015,22 @@ mod tests { let session = p.session; let seat_pads = |fx: &[Effect]| { fx.iter() - .filter(|e| matches!(e, Effect::SeatPad(None))) + .filter(|e| matches!(e, Effect::SeatPad(_, None))) .count() }; p.guest_mut(id).unwrap().seat_input_at = Some(t); let (fx, _) = p.tick(t + Duration::from_millis(100), Some(session)); assert_eq!(seat_pads(&fx), 0, "still fresh"); - assert!(fx.iter().any(|e| matches!(e, Effect::Seat(true)))); + assert!(fx + .iter() + .any(|e| matches!(e, Effect::Seat(Some(g)) if *g == id))); let (fx, _) = p.tick(t + vpad::NEUTRAL_AFTER, Some(session)); assert_eq!(seat_pads(&fx), 1, "quiet: nothing stays held"); let (fx, _) = p.tick(t + vpad::NEUTRAL_AFTER * 2, Some(session)); assert_eq!(seat_pads(&fx), 0, "and only once"); let fx = p.leave(id, "left", t); assert_eq!(seat_pads(&fx), 1); - assert!(fx.iter().any(|e| matches!(e, Effect::Seat(false)))); + assert!(fx.iter().any(|e| matches!(e, Effect::Seat(None)))); assert!( !fx.iter().any(|e| matches!(e, Effect::Link(_))), "no helper pad was ever made for it" @@ -6060,7 +6065,7 @@ mod tests { fn seat_claims(fx: &[Effect]) -> Vec { fx.iter() .filter_map(|e| match e { - Effect::Seat(on) => Some(*on), + Effect::Seat(on) => Some(on.is_some()), _ => None, }) .collect() @@ -6107,7 +6112,7 @@ mod tests { // the guest moves to a pad of their own. let (fx, _) = p.tick_seat(t, Some(s), false); assert_eq!(moves(&fx), vec![id]); - assert!(fx.iter().any(|e| matches!(e, Effect::SeatPad(None)))); + assert!(fx.iter().any(|e| matches!(e, Effect::SeatPad(_, None)))); assert_eq!( seat_claims(&fx), vec![false, false], diff --git a/engine/crates/ps5upload-engine/src/rp_stream_api.rs b/engine/crates/ps5upload-engine/src/rp_stream_api.rs index bc932d864..2dccb8a96 100644 --- a/engine/crates/ps5upload-engine/src/rp_stream_api.rs +++ b/engine/crates/ps5upload-engine/src/rp_stream_api.rs @@ -293,8 +293,9 @@ struct Live { pad: Mutex>, /// Every controller's latest state: the page (source 0) and phones (pad_link.rs). sources: crate::pad_link::PadSources, - /// A Play Together guest has the stream's controller: see [`guest_seat`]. - guest_seat: AtomicBool, + /// The Play Together guest (their id, 0: none) who has the stream's controller: see + /// [`guest_seat`]. Only their input lands on it, so a kicked guest's late input is dropped. + guest_seat: AtomicU64, stop: AtomicBool, viewer: Mutex>, /// Since when no page has been attached. @@ -635,16 +636,17 @@ pub(crate) fn stream_seat_kept(host: &str) -> bool { /// A guest has the stream's controller, or no longer. The page stays off it meanwhile; the /// picture back on takes it back from the guest ([`Live::set_picture`]), so two people never share /// one player. -pub(crate) fn guest_seat(host: &str, on: bool) { +pub(crate) fn guest_seat(host: &str, guest: Option) { if let Some(l) = live_on(host) { - l.set_guest_seat(on); + l.set_guest_seat(guest); } } -/// The guest's state on the stream's controller (None: let go). -pub(crate) fn push_guest_pad(host: &str, state: Option) { +/// Guest `guest`'s state on the stream's controller (None: let go). Dropped unless they are the +/// one who has it: a kicked guest's input still on its way never lands. +pub(crate) fn push_guest_pad(host: &str, guest: u64, state: Option) { if let Some(l) = live_on(host) { - l.push_pad(GUEST_SEAT_SOURCE, state); + l.push_guest_pad(guest, state); } } @@ -990,7 +992,7 @@ impl Live { keep_alive, pad: Default::default(), sources: Default::default(), - guest_seat: AtomicBool::new(false), + guest_seat: AtomicU64::new(0), stop: AtomicBool::new(false), viewer: Mutex::new(None), alone_since: Mutex::new(None), @@ -1167,8 +1169,8 @@ impl Live { } // The host's controller plays again at once: a friend on it moves to a pad of // their own (join.rs), never sharing Player 1 with the host (#720). - if self.guest_seat.load(Ordering::Relaxed) { - self.set_guest_seat(false); + if self.seat_held() { + self.set_guest_seat(None); crate::join::seat_needed(&self.host, "the picture is back on"); } if let Some(h) = self.video_header.lock().ok().and_then(|g| g.clone()) { @@ -1203,9 +1205,7 @@ impl Live { /// Free for a guest: the picture off here, no guest on it, nothing held on it, and no /// linked phone playing (`phones_playing`: one quiet a moment still merges into it, #720). fn seat_free_given(&self, phones_playing: bool) -> bool { - self.seat_kept_given(phones_playing) - && !self.guest_seat.load(Ordering::Relaxed) - && self.sources.is_empty() + self.seat_kept_given(phones_playing) && !self.seat_held() && self.sources.is_empty() } /// The guest on the stream's controller may keep it: the picture is still off here and no @@ -1214,8 +1214,29 @@ impl Live { self.picture_off() && !phones_playing } - fn set_guest_seat(&self, on: bool) { - if self.guest_seat.swap(on, Ordering::Relaxed) == on { + /// A guest has the stream's controller. + fn seat_held(&self) -> bool { + self.guest_seat.load(Ordering::Relaxed) != 0 + } + + /// Guest `guest`'s state on the stream's controller, when they are the one who has it. + fn push_guest_pad(&self, guest: u64, state: Option) { + if guest == 0 || self.guest_seat.load(Ordering::Relaxed) != guest { + return; + } + self.push_pad(GUEST_SEAT_SOURCE, state); + } + + /// Guest `guest` has the stream's controller (None: no guest has it). + fn set_guest_seat(&self, guest: Option) { + let id = guest.unwrap_or(0); + let had = self.guest_seat.swap(id, Ordering::Relaxed); + let on = id != 0; + if had != 0 && had != id && on { + // Straight from one guest to another: what the one before held is let go. + self.push_pad(GUEST_SEAT_SOURCE, None); + } + if (had != 0) == on { // Off and already off: a guest's last state pushed just after the give-back (its // frame raced the seat being taken back) would otherwise stay held on the host's // controller for good. The tick says off every 250 ms, so this clears it. @@ -1236,7 +1257,7 @@ impl Live { /// The page's controller counts: its picture is on and no guest has the stream's controller. fn page_pad_open(&self) -> bool { - !self.picture_off() && !self.guest_seat.load(Ordering::Relaxed) + !self.picture_off() && !self.seat_held() } /// With no page attached, the session still has a reason to run: the picture is off here on @@ -1373,9 +1394,9 @@ impl Live { if state.is_some() && source != PAGE_SOURCE && source != GUEST_SEAT_SOURCE - && self.guest_seat.load(Ordering::Relaxed) + && self.seat_held() { - self.set_guest_seat(false); + self.set_guest_seat(None); let host = self.host.clone(); if let Ok(rt) = tokio::runtime::Handle::try_current() { rt.spawn(async move { crate::join::seat_needed(&host, "a phone plays") }); @@ -2663,13 +2684,13 @@ mod tests { l.set_picture(false); assert!(l.seat_free_given(false), "the picture is off: it sits idle"); - l.set_guest_seat(true); + l.set_guest_seat(Some(7)); assert!(!l.seat_free(), "one guest has it"); let cross = ControllerState { buttons: 1, ..Default::default() }; - l.push_pad(GUEST_SEAT_SOURCE, Some(cross)); + l.push_guest_pad(7, Some(cross)); assert_eq!(l.pad.lock().unwrap().back().map(|p| p.buttons), Some(1)); assert!(!l.page_pad_open()); @@ -2681,7 +2702,7 @@ mod tests { l.page_pad_open(), "picture back: the stream's controller is the host's" ); - assert!(!l.guest_seat.load(Ordering::Relaxed)); + assert!(!l.seat_held()); assert_eq!( l.pad.lock().unwrap().back().map(|p| p.buttons), Some(0), @@ -2689,6 +2710,45 @@ mod tests { ); } + #[test] + fn a_kicked_guests_late_input_never_lands_on_the_stream_controller() { + let l = Live::new("ps5-test".into(), false, Duration::from_secs(60)); + l.playing.store(true, Ordering::Relaxed); + l.set_picture(false); + let pressed = |b: u32| ControllerState { + buttons: b, + ..Default::default() + }; + let last = |l: &Live| l.pad.lock().unwrap().back().map(|p| p.buttons); + l.set_guest_seat(Some(7)); + l.push_guest_pad(7, Some(pressed(1))); + assert_eq!(last(&l), Some(1), "the guest who has it plays"); + + // Kicked: their seat is let go, then input already on its way arrives. + l.set_guest_seat(None); + assert_eq!(last(&l), Some(0)); + l.push_guest_pad(7, Some(pressed(2))); + assert_eq!(last(&l), Some(0), "a kicked guest's late input is dropped"); + assert!(!l.sources.contains(GUEST_SEAT_SOURCE)); + assert!( + l.seat_free_given(false), + "nothing is held: the seat is free again" + ); + + // The next guest has it: the one before still cannot reach it. + l.set_guest_seat(Some(8)); + l.push_guest_pad(7, Some(pressed(4))); + assert_eq!(last(&l), Some(0), "not the one before's"); + l.push_guest_pad(8, Some(pressed(8))); + assert_eq!(last(&l), Some(8)); + // Handed straight to another guest: what the one before held is let go. + l.set_guest_seat(Some(9)); + assert_eq!(last(&l), Some(0)); + l.push_guest_pad(8, None); + l.push_guest_pad(0, Some(pressed(16))); + assert_eq!(last(&l), Some(0), "nobody has id 0"); + } + #[test] fn a_linked_phone_is_someone_using_the_stream_controller() { let l = Live::new("10.0.0.7".into(), false, Duration::from_secs(60)); From 15a84370d1f377e239d1aab3c782f943c8723846 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:22:29 -0800 Subject: [PATCH 19/75] Convert on the PS5 can keep the AMPR emulator when it unpacks asset packs Settings > This PS5 has a new button, "Put the AMPR emulator on this PS5". It copies ampr_emu 0.4.2.1 (the same download, checksum and cache the desktop app uses for games) to /data/ps5upload/convert/runtime/ ampr_emu-0.4.2.1/libSceAmpr.sprx. It only happens when the user asks. When that file is there and checks out, the console converter puts it into an unpacked .pkg wherever the game's own emulator has to go, exactly as the desktop app does, with a fresh ampr_emu.index. The console page then lets the user keep the emulator. Without it, the refusal stays and now points to the app's button. New route POST /api/ps5/convert-ampr-emu {host}. The inspection answer has a new optional "ampr_emu" version, and "unpack_keeps_emulator" is true when the emulator is on the console, so older pages work too. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/e2e/console-page-convert.spec.ts | 17 +- client/src/api/consoleFiles.test.ts | 17 +- client/src/api/consoleFiles.ts | 19 ++ client/src/console/convert/Convert.test.tsx | 2 +- client/src/console/convert/Convert.tsx | 2 +- client/src/console/convert/model.test.ts | 8 +- client/src/console/convert/model.ts | 2 +- client/src/console/locales/ar.json | 2 +- client/src/console/locales/bn.json | 2 +- client/src/console/locales/de.json | 2 +- client/src/console/locales/en.json | 2 +- client/src/console/locales/es.json | 2 +- client/src/console/locales/fa.json | 2 +- client/src/console/locales/fr.json | 2 +- client/src/console/locales/hi.json | 2 +- client/src/console/locales/hu.json | 2 +- client/src/console/locales/id.json | 2 +- client/src/console/locales/it.json | 2 +- client/src/console/locales/ja.json | 2 +- client/src/console/locales/ko.json | 2 +- client/src/console/locales/pl.json | 2 +- client/src/console/locales/pt-BR.json | 2 +- client/src/console/locales/ru.json | 2 +- client/src/console/locales/th.json | 2 +- client/src/console/locales/tr.json | 2 +- client/src/console/locales/vi.json | 2 +- client/src/console/locales/zh-CN.json | 2 +- client/src/console/locales/zh-TW.json | 2 +- client/src/i18n/locales/ar.ts | 5 +- client/src/i18n/locales/bn.ts | 5 +- client/src/i18n/locales/de.ts | 5 +- client/src/i18n/locales/en.ts | 5 +- client/src/i18n/locales/es.ts | 5 +- client/src/i18n/locales/fa.ts | 5 +- client/src/i18n/locales/fr.ts | 5 +- client/src/i18n/locales/hi.ts | 5 +- client/src/i18n/locales/hu.ts | 5 +- client/src/i18n/locales/id.ts | 5 +- client/src/i18n/locales/it.ts | 5 +- client/src/i18n/locales/ja.ts | 5 +- client/src/i18n/locales/ko.ts | 5 +- client/src/i18n/locales/pl.ts | 5 +- client/src/i18n/locales/pt-BR.ts | 5 +- client/src/i18n/locales/ru.ts | 5 +- client/src/i18n/locales/th.ts | 5 +- client/src/i18n/locales/tr.ts | 5 +- client/src/i18n/locales/vi.ts | 5 +- client/src/i18n/locales/zh-CN.ts | 5 +- client/src/i18n/locales/zh-TW.ts | 5 +- .../screens/Settings/MinionSettings.test.tsx | 28 ++- .../src/screens/Settings/MinionSettings.tsx | 130 ++++++++--- .../src/unpack_packs.rs | 188 +++++++++++++++- engine/crates/ps5upload-convert/src/job.rs | 172 +++++++++++++-- engine/crates/ps5upload-convert/src/lib.rs | 13 +- .../crates/ps5upload-engine/api/openapi.json | 67 ++++++ .../ps5upload-engine/src/convert_runtime.rs | 208 +++++++++++++++++- engine/crates/ps5upload-engine/src/lib.rs | 4 + .../src/mcp/catalog_routes.rs | 1 + payload/convert/HARDWARE.md | 17 ++ payload/include/console_convert.h | 17 +- scripts/i18n-source-hashes.json | 5 +- 61 files changed, 942 insertions(+), 122 deletions(-) diff --git a/client/e2e/console-page-convert.spec.ts b/client/e2e/console-page-convert.spec.ts index 1c9a9a34d..ab04099f4 100644 --- a/client/e2e/console-page-convert.spec.ts +++ b/client/e2e/console-page-convert.spec.ts @@ -156,7 +156,7 @@ test("a game whose emulator can't stay with plain files holds Convert until it i const blocked = page.locator('[data-convert-blocked="emulator"]'); await expect(blocked).toContainText("has no emulator that works with plain files"); - await expect(blocked).toContainText("PS5Upload on your computer"); + await expect(blocked).toContainText("Put the AMPR emulator on this PS5 from the app"); await expect(go(page)).toBeDisabled(); await leaveOut(page).click(); @@ -168,6 +168,21 @@ test("a game whose emulator can't stay with plain files holds Convert until it i expect(errors).toEqual([]); }); +test("with the AMPR emulator put on this PS5 from the app, the same game keeps an emulator", async ({ page }) => { + const errors: string[] = []; + const started: unknown[] = []; + // The helper's answer when ampr_emu is on the console: the emulator can stay, and which. + await openOnGame(page, errors, inspection({ unpack_keeps_emulator: true, ampr_emu: "0.4.2.1" }), started); + await page.locator('[data-action="convert-format-pkg"]').click(); + await expect(leaveOut(page)).toHaveAttribute("aria-checked", "false"); + await expect(page.locator("[data-convert-blocked]")).toHaveCount(0); + await go(page).click(); + await expect.poll(() => started.length).toBe(1); + expect(started[0]).toMatchObject({ format: "pkg", unpack_packs: true }); + expect(started[0]).not.toHaveProperty("leave_out_ampr_emu"); + expect(errors).toEqual([]); +}); + test("a game that is not in packs, or read by an older helper, has no unpack switch", async ({ page }) => { const errors: string[] = []; const started: unknown[] = []; diff --git a/client/src/api/consoleFiles.test.ts b/client/src/api/consoleFiles.test.ts index b8d635cf2..1f000361c 100644 --- a/client/src/api/consoleFiles.test.ts +++ b/client/src/api/consoleFiles.test.ts @@ -1,5 +1,5 @@ import { afterEach, describe, expect, it, vi } from "vitest"; -import { fetchConsoleStat, importLocalCheat, minionSet } from "./consoleFiles"; +import { fetchConsoleStat, importLocalCheat, minionSet, putAmprEmu } from "./consoleFiles"; vi.mock("../state/engine", () => ({ getEngineUrl: () => "http://engine" })); afterEach(() => vi.unstubAllGlobals()); function reply(body: object, status = 200) { @@ -113,4 +113,19 @@ describe("paired console controls", () => { "already exists", ); }); + it("puts the AMPR emulator on the console only when asked, and says why it could not", async () => { + const fetcher = reply({ version: "0.4.2.1", path: "/data/ps5upload/convert/runtime/ampr_emu-0.4.2.1/libSceAmpr.sprx", written: true }); + expect(await putAmprEmu("ps5-test")).toEqual({ + version: "0.4.2.1", + path: "/data/ps5upload/convert/runtime/ampr_emu-0.4.2.1/libSceAmpr.sprx", + written: true, + }); + expect(fetcher.mock.calls[0][0]).toBe("http://engine/api/ps5/convert-ampr-emu"); + expect(fetcher.mock.calls[0][1].method).toBe("POST"); + expect(JSON.parse(fetcher.mock.calls[0][1].body)).toEqual({ host: "ps5-test" }); + reply({ error: "ampr_emu 0.4.2.1 could not be had on this computer: offline" }, 502); + await expect(putAmprEmu("ps5-test")).rejects.toThrow("could not be had"); + reply({ version: 1 }); + await expect(putAmprEmu("ps5-test")).rejects.toThrow("Invalid AMPR emulator reply"); + }); }); diff --git a/client/src/api/consoleFiles.ts b/client/src/api/consoleFiles.ts index 975ca64a0..8b0196dcc 100644 --- a/client/src/api/consoleFiles.ts +++ b/client/src/api/consoleFiles.ts @@ -198,6 +198,25 @@ export async function putZstdRuntime(host: string): Promise { + const res = await fetch(`${getEngineUrl()}/api/ps5/convert-ampr-emu`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ host: consoleAddr(host) }), + signal: AbortSignal.timeout(180_000), + }); + const b = (await res.json().catch(() => ({}))) as Record; + if (!res.ok) + throw new Error(typeof b.error === "string" && b.error ? b.error : `request failed (${res.status})`); + if (typeof b.version !== "string" || typeof b.path !== "string" || typeof b.written !== "boolean") + throw new Error("Invalid AMPR emulator reply"); + return { version: b.version, path: b.path, written: b.written }; +} + export async function importLocalCheat( host: string, path: string, diff --git a/client/src/console/convert/Convert.test.tsx b/client/src/console/convert/Convert.test.tsx index 67f764c43..2f5c4c2fe 100644 --- a/client/src/console/convert/Convert.test.tsx +++ b/client/src/console/convert/Convert.test.tsx @@ -140,7 +140,7 @@ describe("Convert", () => { const stuck = info({ unpackKeepsEmulator: false }); const h = html(pkg({ inspected: stuck })); expect(h).toContain('data-convert-blocked="emulator"'); - expect(h).toContain(esc(t("cw_convert_unpack_needs_emulator"))); + expect(h).toContain(esc(t("cw_convert_unpack_needs_emulator_v2"))); expect(h).toMatch(/data-action="convert-go"[^>]*disabled/); // Either way out builds: the emulator left out, or the packs kept as they are. for (const way of [{ leaveOutEmulator: true }, { unpack: false }]) { diff --git a/client/src/console/convert/Convert.tsx b/client/src/console/convert/Convert.tsx index 2bb64cf3b..8e4a42786 100644 --- a/client/src/console/convert/Convert.tsx +++ b/client/src/console/convert/Convert.tsx @@ -294,7 +294,7 @@ export function ConvertView(p: ConvertViewProps) { ) : null} {needsEmulator ? (

- {t("cw_convert_unpack_needs_emulator")} + {t("cw_convert_unpack_needs_emulator_v2")}

) : null}
diff --git a/client/src/console/convert/model.test.ts b/client/src/console/convert/model.test.ts index e417119dc..fb3701168 100644 --- a/client/src/console/convert/model.test.ts +++ b/client/src/console/convert/model.test.ts @@ -210,8 +210,14 @@ describe("names and requests", () => { expect(unpackNeedsEmulator(packed, { unpack: false, leaveOutEmulator: false })).toBe(false); const fine = parseInspection({ path: "/g", format: "folder", packed: "lz4", unpacked_bytes: 50, unpack_keeps_emulator: true }); expect(unpackNeedsEmulator(fine, keep)).toBe(false); + // ampr_emu that the app put on this PS5: the helper says the emulator can stay, and the + // keep choice builds (its version is extra; an older page reads only the yes/no). + const onConsole = parseInspection({ path: "/g", format: "folder", packed: "zstd", unpacked_bytes: 50, unpack_keeps_emulator: true, ampr_emu: "0.4.2.1" }); + expect(unpackNeedsEmulator(onConsole, keep)).toBe(false); + // The refusal names the way out: the app's button. + expect(t("cw_convert_unpack_needs_emulator_v2")).toContain("Put the AMPR emulator on this PS5"); // The converter's own refusal of it reads as the same sentence the page shows beforehand. - expect(convertFailureText("convert_unpack_needs_emulator")).toBe(t("cw_convert_unpack_needs_emulator")); + expect(convertFailureText("convert_unpack_needs_emulator")).toBe(t("cw_convert_unpack_needs_emulator_v2")); expect(convertFailureText("convert_not_packed")).toBe(t("cw_convert_err_not_packed")); expect(packed && bytesToWrite(packed, keep)).toBe(50); diff --git a/client/src/console/convert/model.ts b/client/src/console/convert/model.ts index 62035c6fb..6d63e60bf 100644 --- a/client/src/console/convert/model.ts +++ b/client/src/console/convert/model.ts @@ -235,7 +235,7 @@ export const CONVERT_CAUSES: Record = { convert_partial_in_the_way: "cw_convert_err_partial_in_the_way", convert_no_zstd_runtime: "cw_convert_zstd_no_runtime", convert_not_packable: "cw_convert_err_not_packable", - convert_unpack_needs_emulator: "cw_convert_unpack_needs_emulator", + convert_unpack_needs_emulator: "cw_convert_unpack_needs_emulator_v2", convert_not_packed: "cw_convert_err_not_packed", convert_dest_read_only: "cw_convert_err_dest_read_only", convert_too_big_for_drive: "cw_convert_err_too_big_for_drive", diff --git a/client/src/console/locales/ar.json b/client/src/console/locales/ar.json index a7d3da0fd..475f4995c 100644 --- a/client/src/console/locales/ar.json +++ b/client/src/console/locales/ar.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "أُوقف. لم يُحتفظ بشيء مما كتبه.", "cw_convert_title": "تحويل", "cw_convert_unpack": "فك حزم الأصول (ملفات عادية من جديد)", - "cw_convert_unpack_needs_emulator": "هذه اللعبة تقرأ ملفاتها عبر AMPR وليس فيها محاكٍ يعمل مع الملفات العادية. لا يستطيع جهاز PS5 تنزيل محاكٍ آخر. فعّل «استبعاد محاكي AMPR»، أو أنشئ هذه الحزمة باستخدام PS5Upload على حاسوبك.", + "cw_convert_unpack_needs_emulator_v2": "هذه اللعبة تقرأ ملفاتها عبر AMPR وليس فيها محاكٍ يعمل مع الملفات العادية. ضع محاكي AMPR على جهاز PS5 هذا من التطبيق (الإعدادات › جهاز PS5 هذا)، أو فعّل «استبعاد محاكي AMPR».", "cw_convert_unpack_note": "هذه اللعبة في حزم أصول {kind}. عند التفعيل، تحتوي الحزمة على كل ملف كملف عادي دون حزم الأصول، فيصبح حجمها قريبًا من حجم اللعبة قبل التحزيم ({size}). عند التعطيل، تدخل حزم الأصول كما هي، ولا يقرؤها إلا المحاكي.", "cw_convert_verify": "التحقق بعد الكتابة", "cw_convert_verify_fast": "تحقق سريع", diff --git a/client/src/console/locales/bn.json b/client/src/console/locales/bn.json index 91fceb480..0dd20bb3c 100644 --- a/client/src/console/locales/bn.json +++ b/client/src/console/locales/bn.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "থামানো হয়েছে। এর লেখা কিছুই রাখা হয়নি।", "cw_convert_title": "রূপান্তর", "cw_convert_unpack": "অ্যাসেট প্যাক খুলুন (আবার সাধারণ ফাইল)", - "cw_convert_unpack_needs_emulator": "এই গেমটি AMPR দিয়ে তার ফাইল পড়ে, আর এতে সাধারণ ফাইলের সঙ্গে কাজ করে এমন কোনো এমুলেটর নেই। PS5 সেটি ডাউনলোড করতে পারে না। “AMPR এমুলেটর বাদ দিন” চালু করুন, অথবা আপনার কম্পিউটারে PS5Upload দিয়ে এই প্যাকেজটি তৈরি করুন।", + "cw_convert_unpack_needs_emulator_v2": "এই গেমটি AMPR দিয়ে তার ফাইল পড়ে, আর এতে সাধারণ ফাইলের সঙ্গে কাজ করে এমন কোনো এমুলেটর নেই। অ্যাপ থেকে এই PS5-এ AMPR এমুলেটর রাখুন (সেটিংস › এই PS5), অথবা “AMPR এমুলেটর বাদ দিন” চালু করুন।", "cw_convert_unpack_note": "এই গেমটি {kind} অ্যাসেট প্যাকে আছে। চালু থাকলে প্যাকেজে প্রতিটি ফাইল সাধারণ ফাইল হিসেবে থাকে আর প্যাকগুলো বাদ যায়, তাই এটি প্যাক করার আগের গেমের প্রায় সমান বড় হয় ({size})। বন্ধ থাকলে প্যাকগুলো যেমন আছে তেমনই ঢোকে, আর শুধু এমুলেটরই সেগুলো পড়তে পারে।", "cw_convert_verify": "লেখার পরে যাচাই", "cw_convert_verify_fast": "দ্রুত যাচাই", diff --git a/client/src/console/locales/de.json b/client/src/console/locales/de.json index cf5896c90..f94bb2f6e 100644 --- a/client/src/console/locales/de.json +++ b/client/src/console/locales/de.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Gestoppt. Nichts, was geschrieben wurde, wurde behalten.", "cw_convert_title": "Konvertieren", "cw_convert_unpack": "Asset-Packs entpacken (wieder normale Dateien)", - "cw_convert_unpack_needs_emulator": "Dieses Spiel liest seine Dateien über AMPR und hat keinen Emulator, der mit normalen Dateien funktioniert. Die PS5 kann keinen herunterladen. Schalte „AMPR-Emulator weglassen“ ein oder erstelle dieses Paket mit PS5Upload auf deinem Computer.", + "cw_convert_unpack_needs_emulator_v2": "Dieses Spiel liest seine Dateien über AMPR und hat keinen Emulator, der mit normalen Dateien funktioniert. Bring den AMPR-Emulator aus der App auf diese PS5 (Einstellungen › Diese PS5) oder schalte „AMPR-Emulator weglassen“ ein.", "cw_convert_unpack_note": "Dieses Spiel liegt in {kind}-Asset-Packs. An: Das Paket enthält jede Datei als normale Datei und lässt die Packs weg, sodass es etwa so groß ist wie das Spiel vor dem Packen ({size}). Aus: Die Packs kommen unverändert hinein, und nur der Emulator kann sie lesen.", "cw_convert_verify": "Nach dem Schreiben prüfen", "cw_convert_verify_fast": "Schnelle Prüfung", diff --git a/client/src/console/locales/en.json b/client/src/console/locales/en.json index 133df415c..a20a5af1e 100644 --- a/client/src/console/locales/en.json +++ b/client/src/console/locales/en.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Stopped. Nothing it wrote was kept.", "cw_convert_title": "Convert", "cw_convert_unpack": "Unpack the asset packs (plain files again)", - "cw_convert_unpack_needs_emulator": "This game reads its files through AMPR and has no emulator that works with plain files. The PS5 can't download one. Turn on Leave out the AMPR emulator, or make this package with PS5Upload on your computer.", + "cw_convert_unpack_needs_emulator_v2": "This game reads its files through AMPR and has no emulator that works with plain files. Put the AMPR emulator on this PS5 from the app (Settings › This PS5), or turn on Leave out the AMPR emulator.", "cw_convert_unpack_note": "This game is in {kind} asset packs. On, the package holds every file as a plain file and leaves the packs out, so it is about as large as the game was before packing ({size}). Off, the packs go in as they are, and only the emulator can read them.", "cw_convert_verify": "Check after writing", "cw_convert_verify_fast": "Quick check", diff --git a/client/src/console/locales/es.json b/client/src/console/locales/es.json index af66b6705..db48136ef 100644 --- a/client/src/console/locales/es.json +++ b/client/src/console/locales/es.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Detenido. No se conservó nada de lo escrito.", "cw_convert_title": "Convertir", "cw_convert_unpack": "Desempaquetar los paquetes de recursos (archivos normales de nuevo)", - "cw_convert_unpack_needs_emulator": "Este juego lee sus archivos mediante AMPR y no tiene un emulador que funcione con archivos normales. La PS5 no puede descargar uno. Activa «Omitir el emulador AMPR» o crea este paquete con PS5Upload en tu ordenador.", + "cw_convert_unpack_needs_emulator_v2": "Este juego lee sus archivos a través de AMPR y no tiene un emulador que funcione con archivos normales. Pon el emulador AMPR en esta PS5 desde la app (Configuración › Esta PS5) o activa Omitir el emulador AMPR.", "cw_convert_unpack_note": "Este juego está en paquetes de recursos {kind}. Si está activado, el paquete guarda cada archivo como archivo normal y omite los paquetes de recursos, así que ocupa más o menos lo que el juego antes de empaquetarlo ({size}). Si está desactivado, los paquetes de recursos entran tal cual y solo el emulador puede leerlos.", "cw_convert_verify": "Comprobar después de escribir", "cw_convert_verify_fast": "Comprobación rápida", diff --git a/client/src/console/locales/fa.json b/client/src/console/locales/fa.json index cf0255d88..a3851a908 100644 --- a/client/src/console/locales/fa.json +++ b/client/src/console/locales/fa.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "متوقف شد. چیزی از آنچه نوشته بود نگه داشته نشد.", "cw_convert_title": "تبدیل", "cw_convert_unpack": "باز کردن بسته‌های دارایی (دوباره فایل‌های ساده)", - "cw_convert_unpack_needs_emulator": "این بازی فایل‌هایش را از راه AMPR می‌خواند و شبیه‌سازی ندارد که با فایل‌های ساده کار کند. PS5 نمی‌تواند شبیه‌ساز دیگری دانلود کند. «کنار گذاشتن شبیه‌ساز AMPR» را روشن کنید، یا این ‎.pkg را با PS5Upload روی رایانه‌تان بسازید.", + "cw_convert_unpack_needs_emulator_v2": "این بازی فایل‌هایش را از راه AMPR می‌خواند و شبیه‌سازی ندارد که با فایل‌های ساده کار کند. شبیه‌ساز AMPR را از برنامه روی این PS5 بگذار (تنظیمات › این PS5)، یا «کنار گذاشتن شبیه‌ساز AMPR» را روشن کن.", "cw_convert_unpack_note": "این بازی در بسته‌های دارایی {kind} است. اگر روشن باشد، فایل ‎.pkg هر فایل را به‌صورت فایل ساده در خود دارد و بسته‌های دارایی را کنار می‌گذارد، پس تقریباً به اندازهٔ بازی پیش از بسته‌بندی است ({size}). اگر خاموش باشد، بسته‌های دارایی همان‌طور که هستند وارد می‌شوند و فقط شبیه‌ساز می‌تواند آن‌ها را بخواند.", "cw_convert_verify": "بررسی پس از نوشتن", "cw_convert_verify_fast": "بررسی سریع", diff --git a/client/src/console/locales/fr.json b/client/src/console/locales/fr.json index 0c848917f..11bb5aa2c 100644 --- a/client/src/console/locales/fr.json +++ b/client/src/console/locales/fr.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Arrêté. Rien de ce qui a été écrit n'a été conservé.", "cw_convert_title": "Convertir", "cw_convert_unpack": "Décompresser les packs de ressources (fichiers ordinaires à nouveau)", - "cw_convert_unpack_needs_emulator": "Ce jeu lit ses fichiers via AMPR et n'a pas d'émulateur qui fonctionne avec des fichiers ordinaires. La PS5 ne peut pas en télécharger un. Activez « Omettre l'émulateur AMPR », ou créez ce paquet avec PS5Upload sur votre ordinateur.", + "cw_convert_unpack_needs_emulator_v2": "Ce jeu lit ses fichiers via AMPR et n'a pas d'émulateur qui fonctionne avec des fichiers ordinaires. Installez l'émulateur AMPR sur cette PS5 depuis l'application (Paramètres › Cette PS5), ou activez Omettre l'émulateur AMPR.", "cw_convert_unpack_note": "Ce jeu est en packs de ressources {kind}. Activé, le paquet contient chaque fichier comme fichier ordinaire et omet les packs : il fait donc à peu près la taille du jeu avant la mise en packs ({size}). Désactivé, les packs y entrent tels quels, et seul l'émulateur peut les lire.", "cw_convert_verify": "Vérifier après l'écriture", "cw_convert_verify_fast": "Vérification rapide", diff --git a/client/src/console/locales/hi.json b/client/src/console/locales/hi.json index 14b34be0d..066bba33f 100644 --- a/client/src/console/locales/hi.json +++ b/client/src/console/locales/hi.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "रोक दिया गया। इसका लिखा कुछ भी नहीं रखा गया।", "cw_convert_title": "कन्वर्ट", "cw_convert_unpack": "एसेट पैक खोलें (फिर से सादी फ़ाइलें)", - "cw_convert_unpack_needs_emulator": "यह गेम अपनी फ़ाइलें AMPR से पढ़ता है और इसमें ऐसा कोई एमुलेटर नहीं है जो सादी फ़ाइलों के साथ काम करे। PS5 उसे डाउनलोड नहीं कर सकता। “AMPR एमुलेटर छोड़ दें” चालू करें, या यह पैकेज अपने कंप्यूटर पर PS5Upload से बनाएँ।", + "cw_convert_unpack_needs_emulator_v2": "यह गेम अपनी फ़ाइलें AMPR से पढ़ता है और इसमें ऐसा कोई एमुलेटर नहीं है जो सादी फ़ाइलों के साथ काम करे। ऐप से इस PS5 पर AMPR एमुलेटर रखें (सेटिंग्स › यह PS5), या \"AMPR एमुलेटर छोड़ दें\" चालू करें।", "cw_convert_unpack_note": "यह गेम {kind} एसेट पैक में है। चालू होने पर पैकेज में हर फ़ाइल सादी फ़ाइल के रूप में रहती है और पैक छोड़ दिए जाते हैं, इसलिए यह लगभग उतना ही बड़ा होता है जितना पैक करने से पहले गेम था ({size})। बंद होने पर पैक जैसे हैं वैसे ही जाते हैं, और उन्हें सिर्फ़ एमुलेटर पढ़ सकता है।", "cw_convert_verify": "लिखने के बाद जाँचें", "cw_convert_verify_fast": "त्वरित जाँच", diff --git a/client/src/console/locales/hu.json b/client/src/console/locales/hu.json index 8e6d34ba7..1d1cfd548 100644 --- a/client/src/console/locales/hu.json +++ b/client/src/console/locales/hu.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Leállítva. Semmi sem maradt meg abból, amit kiírt.", "cw_convert_title": "Átalakítás", "cw_convert_unpack": "Elemcsomagok kibontása (újra sima fájlok)", - "cw_convert_unpack_needs_emulator": "Ez a játék AMPR-en keresztül olvassa a fájljait, és nincs benne olyan emulátor, amely sima fájlokkal működik. A PS5 nem tud ilyet letölteni. Kapcsold be az „AMPR-emulátor kihagyása” lehetőséget, vagy készítsd el ezt a csomagot a PS5Uploaddal a számítógépeden.", + "cw_convert_unpack_needs_emulator_v2": "Ez a játék AMPR-en keresztül olvassa a fájljait, és nincs olyan emulátora, amely sima fájlokkal működik. Töltsd fel az AMPR-emulátort erre a PS5-re az appból (Beállítások › Ez a PS5), vagy kapcsold be az AMPR-emulátor kihagyása lehetőséget.", "cw_convert_unpack_note": "Ez a játék {kind} elemcsomagokban van. Bekapcsolva a csomag minden fájlt sima fájlként tartalmaz, az elemcsomagok kimaradnak, így nagyjából akkora, mint a játék csomagolás előtt ({size}). Kikapcsolva az elemcsomagok változatlanul kerülnek bele, és csak az emulátor tudja olvasni őket.", "cw_convert_verify": "Ellenőrzés írás után", "cw_convert_verify_fast": "Gyors ellenőrzés", diff --git a/client/src/console/locales/id.json b/client/src/console/locales/id.json index fc719f94d..984540d51 100644 --- a/client/src/console/locales/id.json +++ b/client/src/console/locales/id.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Dihentikan. Tidak ada yang ditulisnya yang disimpan.", "cw_convert_title": "Konversi", "cw_convert_unpack": "Bongkar paket aset (kembali jadi file biasa)", - "cw_convert_unpack_needs_emulator": "Game ini membaca filenya lewat AMPR dan tidak punya emulator yang bekerja dengan file biasa. PS5 tidak bisa mengunduhnya. Nyalakan “Jangan sertakan emulator AMPR”, atau buat paket ini dengan PS5Upload di komputer.", + "cw_convert_unpack_needs_emulator_v2": "Game ini membaca filenya lewat AMPR dan tidak punya emulator yang bekerja dengan file biasa. Taruh emulator AMPR di PS5 ini dari aplikasi (Pengaturan › PS5 ini), atau aktifkan Jangan sertakan emulator AMPR.", "cw_convert_unpack_note": "Game ini dalam paket aset {kind}. Jika nyala, paket .pkg berisi setiap file sebagai file biasa dan paket aset tidak disertakan, jadi ukurannya kira-kira sama dengan game sebelum dikemas ({size}). Jika mati, paket aset dimasukkan apa adanya, dan hanya emulator yang bisa membacanya.", "cw_convert_verify": "Periksa setelah ditulis", "cw_convert_verify_fast": "Pemeriksaan cepat", diff --git a/client/src/console/locales/it.json b/client/src/console/locales/it.json index b0724e108..02d15b75f 100644 --- a/client/src/console/locales/it.json +++ b/client/src/console/locales/it.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Interrotto. Niente di ciò che aveva scritto è stato mantenuto.", "cw_convert_title": "Converti", "cw_convert_unpack": "Spacchetta i pacchetti di risorse (di nuovo file normali)", - "cw_convert_unpack_needs_emulator": "Questo gioco legge i suoi file tramite AMPR e non ha un emulatore che funzioni con i file normali. La PS5 non può scaricarne uno. Attiva «Ometti l'emulatore AMPR», oppure crea questo pacchetto con PS5Upload sul computer.", + "cw_convert_unpack_needs_emulator_v2": "Questo gioco legge i suoi file tramite AMPR e non ha un emulatore che funzioni con file normali. Metti l'emulatore AMPR su questa PS5 dall'app (Impostazioni › Questa PS5) oppure attiva Ometti l'emulatore AMPR.", "cw_convert_unpack_note": "Questo gioco è in pacchetti di risorse {kind}. Se attivo, il pacchetto contiene ogni file come file normale e tralascia i pacchetti di risorse, quindi è grande più o meno quanto il gioco prima dell'impacchettamento ({size}). Se disattivo, i pacchetti di risorse entrano così come sono e solo l'emulatore può leggerli.", "cw_convert_verify": "Verifica dopo la scrittura", "cw_convert_verify_fast": "Verifica rapida", diff --git a/client/src/console/locales/ja.json b/client/src/console/locales/ja.json index 8e1b914e1..c2db4bf66 100644 --- a/client/src/console/locales/ja.json +++ b/client/src/console/locales/ja.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "停止しました。書き込んだものは残していません。", "cw_convert_title": "変換", "cw_convert_unpack": "アセットパックを展開(通常のファイルに戻す)", - "cw_convert_unpack_needs_emulator": "このゲームは AMPR 経由でファイルを読みますが、通常のファイルで動くエミュレーターが入っていません。PS5 ではダウンロードできません。「AMPR エミュレーターを含めない」をオンにするか、コンピューターの PS5Upload でこのパッケージを作ってください。", + "cw_convert_unpack_needs_emulator_v2": "このゲームは AMPR 経由でファイルを読み込みますが、通常のファイルで動くエミュレーターがありません。アプリから AMPR エミュレーターをこの PS5 に配置する(設定 › この PS5)か、「AMPR エミュレーターを含めない」をオンにしてください。", "cw_convert_unpack_note": "このゲームは {kind} アセットパックです。オンにすると、パッケージにはすべてのファイルが通常のファイルとして入り、パックは含めません。そのためサイズはパック化する前のゲームとほぼ同じになります({size})。オフにすると、パックはそのまま入り、それを読めるのはエミュレーターだけです。", "cw_convert_verify": "書き込み後に確認", "cw_convert_verify_fast": "簡易確認", diff --git a/client/src/console/locales/ko.json b/client/src/console/locales/ko.json index fad86e580..2fec5eb0b 100644 --- a/client/src/console/locales/ko.json +++ b/client/src/console/locales/ko.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "중지했습니다. 쓴 내용은 남기지 않았습니다.", "cw_convert_title": "변환", "cw_convert_unpack": "에셋 팩 풀기(일반 파일로 되돌리기)", - "cw_convert_unpack_needs_emulator": "이 게임은 AMPR로 파일을 읽는데, 일반 파일에서 작동하는 에뮬레이터가 들어 있지 않습니다. PS5에서는 내려받을 수 없습니다. 'AMPR 에뮬레이터 빼기'를 켜거나, 컴퓨터의 PS5Upload로 이 패키지를 만드세요.", + "cw_convert_unpack_needs_emulator_v2": "이 게임은 AMPR로 파일을 읽는데, 일반 파일에서 작동하는 에뮬레이터가 없습니다. 앱에서 이 PS5에 AMPR 에뮬레이터를 넣거나(설정 › 이 PS5) 'AMPR 에뮬레이터 빼기'를 켜세요.", "cw_convert_unpack_note": "이 게임은 {kind} 에셋 팩으로 되어 있습니다. 켜면 패키지에 모든 파일이 일반 파일로 들어가고 팩은 빠지므로, 크기는 팩으로 만들기 전의 게임과 비슷합니다({size}). 끄면 팩이 그대로 들어가며, 에뮬레이터만 그 팩을 읽을 수 있습니다.", "cw_convert_verify": "쓴 뒤 확인", "cw_convert_verify_fast": "빠른 확인", diff --git a/client/src/console/locales/pl.json b/client/src/console/locales/pl.json index 134d140c3..156553212 100644 --- a/client/src/console/locales/pl.json +++ b/client/src/console/locales/pl.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Zatrzymano. Nic z tego, co zapisano, nie zostało zachowane.", "cw_convert_title": "Konwersja", "cw_convert_unpack": "Rozpakuj paczki zasobów (znów zwykłe pliki)", - "cw_convert_unpack_needs_emulator": "Ta gra czyta swoje pliki przez AMPR i nie ma emulatora, który działa ze zwykłymi plikami. PS5 nie może go pobrać. Włącz „Pomiń emulator AMPR” albo utwórz ten pakiet w PS5Upload na komputerze.", + "cw_convert_unpack_needs_emulator_v2": "Ta gra czyta swoje pliki przez AMPR i nie ma emulatora, który działa ze zwykłymi plikami. Umieść emulator AMPR na tej PS5 z aplikacji (Ustawienia › Ta PS5) albo włącz Pomiń emulator AMPR.", "cw_convert_unpack_note": "Ta gra jest w paczkach zasobów {kind}. Gdy włączone, pakiet zawiera każdy plik jako zwykły plik i pomija paczki, więc jest mniej więcej tak duży jak gra przed spakowaniem ({size}). Gdy wyłączone, paczki trafiają do pakietu bez zmian i tylko emulator może je czytać.", "cw_convert_verify": "Sprawdź po zapisie", "cw_convert_verify_fast": "Szybkie sprawdzenie", diff --git a/client/src/console/locales/pt-BR.json b/client/src/console/locales/pt-BR.json index f39fd2ad8..6ed873009 100644 --- a/client/src/console/locales/pt-BR.json +++ b/client/src/console/locales/pt-BR.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Interrompido. Nada do que foi gravado foi mantido.", "cw_convert_title": "Converter", "cw_convert_unpack": "Desempacotar os pacotes de recursos (arquivos comuns de novo)", - "cw_convert_unpack_needs_emulator": "Este jogo lê os arquivos pelo AMPR e não tem um emulador que funcione com arquivos comuns. O PS5 não consegue baixar um. Ative “Deixar de fora o emulador AMPR” ou crie este pacote com o PS5Upload no seu computador.", + "cw_convert_unpack_needs_emulator_v2": "Este jogo lê seus arquivos pelo AMPR e não tem um emulador que funcione com arquivos comuns. Coloque o emulador AMPR neste PS5 pelo app (Configurações › Este PS5) ou ative Deixar de fora o emulador AMPR.", "cw_convert_unpack_note": "Este jogo está em pacotes de recursos {kind}. Ativado, o pacote guarda cada arquivo como arquivo comum e deixa os pacotes de recursos de fora, então fica mais ou menos do tamanho do jogo antes de ser empacotado ({size}). Desativado, os pacotes de recursos entram como estão, e só o emulador consegue lê-los.", "cw_convert_verify": "Conferir depois de gravar", "cw_convert_verify_fast": "Conferência rápida", diff --git a/client/src/console/locales/ru.json b/client/src/console/locales/ru.json index d308f3257..e118ecaf7 100644 --- a/client/src/console/locales/ru.json +++ b/client/src/console/locales/ru.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Остановлено. Ничего из записанного не сохранено.", "cw_convert_title": "Конвертация", "cw_convert_unpack": "Распаковать пакеты ресурсов (снова обычные файлы)", - "cw_convert_unpack_needs_emulator": "Эта игра читает свои файлы через AMPR, и в ней нет эмулятора, который работает с обычными файлами. PS5 не может его скачать. Включите «Не включать эмулятор AMPR» или создайте этот пакет в PS5Upload на компьютере.", + "cw_convert_unpack_needs_emulator_v2": "Эта игра читает свои файлы через AMPR, и у неё нет эмулятора, который работает с обычными файлами. Установите эмулятор AMPR на эту PS5 из приложения (Настройки › Эта PS5) или включите «Не включать эмулятор AMPR».", "cw_convert_unpack_note": "Эта игра в пакетах ресурсов {kind}. Если включено, в пакете каждый файл лежит обычным файлом, а пакеты ресурсов не включаются, поэтому он примерно такого же размера, как игра до упаковки ({size}). Если выключено, пакеты ресурсов попадают внутрь как есть, и прочитать их может только эмулятор.", "cw_convert_verify": "Проверить после записи", "cw_convert_verify_fast": "Быстрая проверка", diff --git a/client/src/console/locales/th.json b/client/src/console/locales/th.json index 188246b4d..72d36115d 100644 --- a/client/src/console/locales/th.json +++ b/client/src/console/locales/th.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "หยุดแล้ว ไม่ได้เก็บสิ่งที่เขียนไว้เลย", "cw_convert_title": "แปลง", "cw_convert_unpack": "แยกแพ็กแอสเซ็ต (กลับเป็นไฟล์ธรรมดา)", - "cw_convert_unpack_needs_emulator": "เกมนี้อ่านไฟล์ผ่าน AMPR และไม่มีอีมูเลเตอร์ที่ใช้กับไฟล์ธรรมดาได้ PS5 ดาวน์โหลดอีมูเลเตอร์ไม่ได้ ให้เปิด “ไม่ใส่อีมูเลเตอร์ AMPR” หรือสร้างแพ็กเกจนี้ด้วย PS5Upload บนคอมพิวเตอร์ของคุณ", + "cw_convert_unpack_needs_emulator_v2": "เกมนี้อ่านไฟล์ผ่าน AMPR และไม่มีอีมูเลเตอร์ที่ใช้กับไฟล์ธรรมดาได้ ใส่อีมูเลเตอร์ AMPR ลงใน PS5 เครื่องนี้จากแอป (การตั้งค่า › PS5 เครื่องนี้) หรือเปิด \"ไม่ใส่อีมูเลเตอร์ AMPR\"", "cw_convert_unpack_note": "เกมนี้อยู่ในแพ็กแอสเซ็ต {kind} หากเปิด แพ็กเกจจะเก็บทุกไฟล์เป็นไฟล์ธรรมดาและไม่รวมแพ็ก จึงมีขนาดราวเท่ากับเกมก่อนแพ็ก ({size}) หากปิด แพ็กจะถูกใส่ไปตามเดิม และมีเพียงอีมูเลเตอร์เท่านั้นที่อ่านได้", "cw_convert_verify": "ตรวจสอบหลังเขียน", "cw_convert_verify_fast": "ตรวจสอบแบบเร็ว", diff --git a/client/src/console/locales/tr.json b/client/src/console/locales/tr.json index 7470cbc18..236fb1da2 100644 --- a/client/src/console/locales/tr.json +++ b/client/src/console/locales/tr.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Durduruldu. Yazdığı hiçbir şey tutulmadı.", "cw_convert_title": "Dönüştür", "cw_convert_unpack": "Varlık paketlerini aç (yeniden düz dosyalar)", - "cw_convert_unpack_needs_emulator": "Bu oyun dosyalarını AMPR üzerinden okuyor ve düz dosyalarla çalışan bir öykünücüsü yok. PS5 bir tane indiremez. “AMPR öykünücüsünü dahil etme” seçeneğini açın ya da bu paketi bilgisayarınızda PS5Upload ile oluşturun.", + "cw_convert_unpack_needs_emulator_v2": "Bu oyun dosyalarını AMPR üzerinden okuyor ve düz dosyalarla çalışan bir öykünücüsü yok. AMPR öykünücüsünü uygulamadan bu PS5'e koy (Ayarlar › Bu PS5) ya da AMPR öykünücüsünü dahil etme seçeneğini aç.", "cw_convert_unpack_note": "Bu oyun {kind} varlık paketlerinde. Açıksa paket her dosyayı düz dosya olarak içerir ve varlık paketlerini dışarıda bırakır; böylece boyutu oyunun paketlenmeden önceki haline yakındır ({size}). Kapalıysa varlık paketleri olduğu gibi girer ve onları yalnızca öykünücü okuyabilir.", "cw_convert_verify": "Yazdıktan sonra denetle", "cw_convert_verify_fast": "Hızlı denetim", diff --git a/client/src/console/locales/vi.json b/client/src/console/locales/vi.json index 1202b6b17..06cc73777 100644 --- a/client/src/console/locales/vi.json +++ b/client/src/console/locales/vi.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Đã dừng. Không giữ lại gì đã ghi.", "cw_convert_title": "Chuyển đổi", "cw_convert_unpack": "Giải nén gói tài nguyên (trở lại tệp thường)", - "cw_convert_unpack_needs_emulator": "Game này đọc tệp qua AMPR và không có trình giả lập nào chạy được với tệp thường. PS5 không tải về được. Hãy bật “Bỏ trình giả lập AMPR”, hoặc tạo gói này bằng PS5Upload trên máy tính.", + "cw_convert_unpack_needs_emulator_v2": "Trò chơi này đọc tệp qua AMPR và không có trình giả lập nào chạy được với tệp thường. Hãy đặt trình giả lập AMPR vào PS5 này từ ứng dụng (Cài đặt › PS5 này), hoặc bật Bỏ trình giả lập AMPR.", "cw_convert_unpack_note": "Game này ở dạng gói tài nguyên {kind}. Khi bật, gói .pkg chứa mọi tệp dưới dạng tệp thường và bỏ các gói tài nguyên đi, nên nó lớn xấp xỉ game trước khi đóng gói ({size}). Khi tắt, các gói tài nguyên được đưa vào nguyên trạng và chỉ trình giả lập đọc được chúng.", "cw_convert_verify": "Kiểm tra sau khi ghi", "cw_convert_verify_fast": "Kiểm tra nhanh", diff --git a/client/src/console/locales/zh-CN.json b/client/src/console/locales/zh-CN.json index 85e76c12a..b11e62d8b 100644 --- a/client/src/console/locales/zh-CN.json +++ b/client/src/console/locales/zh-CN.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "已停止。已写入的内容均未保留。", "cw_convert_title": "转换", "cw_convert_unpack": "解开资源包(恢复为普通文件)", - "cw_convert_unpack_needs_emulator": "此游戏通过 AMPR 读取文件,但其中没有能配合普通文件使用的模拟器。PS5 无法下载。请开启“不包含 AMPR 模拟器”,或在电脑上用 PS5Upload 制作此封包。", + "cw_convert_unpack_needs_emulator_v2": "这个游戏通过 AMPR 读取文件,但没有能用于普通文件的模拟器。请在应用里把 AMPR 模拟器放到这台 PS5 上(设置 › 这台 PS5),或打开“不包含 AMPR 模拟器”。", "cw_convert_unpack_note": "此游戏使用 {kind} 资源包。开启后,封包中的每个文件都是普通文件,不包含资源包,因此大小与打包前的游戏差不多({size})。关闭时,资源包按原样放入,只有模拟器能读取它们。", "cw_convert_verify": "写入后校验", "cw_convert_verify_fast": "快速校验", diff --git a/client/src/console/locales/zh-TW.json b/client/src/console/locales/zh-TW.json index 47165126a..f9460e686 100644 --- a/client/src/console/locales/zh-TW.json +++ b/client/src/console/locales/zh-TW.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "已停止。已寫入的內容均未保留。", "cw_convert_title": "轉換", "cw_convert_unpack": "解開資源包(還原為一般檔案)", - "cw_convert_unpack_needs_emulator": "此遊戲透過 AMPR 讀取檔案,但其中沒有能搭配一般檔案使用的模擬器。PS5 無法下載。請開啟「不包含 AMPR 模擬器」,或在電腦上用 PS5Upload 製作此封包。", + "cw_convert_unpack_needs_emulator_v2": "這個遊戲透過 AMPR 讀取檔案,但沒有能用於一般檔案的模擬器。請在應用程式裡把 AMPR 模擬器放到這台 PS5 上(設定 › 這台 PS5),或開啟「不包含 AMPR 模擬器」。", "cw_convert_unpack_note": "此遊戲使用 {kind} 資源包。開啟後,封包中的每個檔案都是一般檔案,不包含資源包,因此大小與打包前的遊戲差不多({size})。關閉時,資源包按原樣放入,只有模擬器能讀取它們。", "cw_convert_verify": "寫入後驗證", "cw_convert_verify_fast": "快速驗證", diff --git a/client/src/i18n/locales/ar.ts b/client/src/i18n/locales/ar.ts index c0e9b34dd..ee76c4b51 100644 --- a/client/src/i18n/locales/ar.ts +++ b/client/src/i18n/locales/ar.ts @@ -868,7 +868,7 @@ home_low_space_body: "يعثر التنظيف على التحديثات والح "cw_convert_unpack_note": "هذه اللعبة في حزم أصول {kind}. عند التفعيل، تحتوي الحزمة على كل ملف كملف عادي دون حزم الأصول، فيصبح حجمها قريبًا من حجم اللعبة قبل التحزيم ({size}). عند التعطيل، تدخل حزم الأصول كما هي، ولا يقرؤها إلا المحاكي.", "cw_convert_leave_out_emu": "استبعاد محاكي AMPR", "cw_convert_leave_out_emu_note": "عندها لا تحتوي الحزمة على fakelib/libSceAmpr.sprx، وتقرأ اللعبة ملفاتها عبر مكتبة النظام الخاصة بجهاز PS5. جُرّب هذا مع لعبة واحدة فقط على البرنامج الثابت 5.10. إذا لم تبدأ اللعبة، فأنشئ الحزمة من جديد مع إيقاف هذا الخيار.", -"cw_convert_unpack_needs_emulator": "هذه اللعبة تقرأ ملفاتها عبر AMPR وليس فيها محاكٍ يعمل مع الملفات العادية. لا يستطيع جهاز PS5 تنزيل محاكٍ آخر. فعّل «استبعاد محاكي AMPR»، أو أنشئ هذه الحزمة باستخدام PS5Upload على حاسوبك.", +"cw_convert_unpack_needs_emulator_v2": "هذه اللعبة تقرأ ملفاتها عبر AMPR وليس فيها محاكٍ يعمل مع الملفات العادية. ضع محاكي AMPR على جهاز PS5 هذا من التطبيق (الإعدادات › جهاز PS5 هذا)، أو فعّل «استبعاد محاكي AMPR».", "cw_convert_err_not_packed": "هذه اللعبة ليست في حزم أصول، فلا يوجد ما يُفك. عطّل «فك حزم الأصول».", "cw_convert_reading": "جارٍ قراءة اللعبة…", "cw_convert_running": "جارٍ تحويل {name}…", @@ -6651,6 +6651,9 @@ library_compressed_hint: "تحتاج الصور المضغوطة إلى ShadowMo "minion_zstd_runtime_note": "يحتاج التحويل على PS5 إلى بيئة تشغيل zstd (ampr-emu-ng) على الجهاز لكتابة حزم zstd. يضعها التطبيق هناك من تلقاء نفسه عند اتصال جهاز PS5 هذا.", "minion_zstd_runtime_put": "ضع بيئة تشغيل zstd على جهاز PS5 هذا", "minion_zstd_runtime_done": "ampr-emu-ng {version} موجود على جهاز PS5 هذا.", +"minion_ampr_emu_note": "للإبقاء على محاكي AMPR عندما يفك التحويل على PS5 حزم الأصول، يحتاج الجهاز إلى ampr_emu. يضعه التطبيق هناك فقط عندما تطلب ذلك.", +"minion_ampr_emu_put": "ضع محاكي AMPR على جهاز PS5 هذا", +"minion_ampr_emu_done": "ampr_emu {version} موجود على جهاز PS5 هذا.", "remove_ps5u_console_busy": "الـ PS5 مشغول بعملية بدأها PS5Upload. انتظر حتى تنتهي، ثم حاول مرة أخرى.", "remove_ps5u_console_converting": "«تحويل» يعمل على لعبة في الـ PS5. انتظر حتى ينتهي، ثم حاول مرة أخرى.", "remove_ps5u_console_extracting": "الـ PS5 يستخرج أرشيفًا. انتظر حتى ينتهي، ثم حاول مرة أخرى.", diff --git a/client/src/i18n/locales/bn.ts b/client/src/i18n/locales/bn.ts index 7a2fd5151..0d8370d56 100644 --- a/client/src/i18n/locales/bn.ts +++ b/client/src/i18n/locales/bn.ts @@ -868,7 +868,7 @@ home_low_space_body: "ক্লিন আপ মুছে ফেলা যায "cw_convert_unpack_note": "এই গেমটি {kind} অ্যাসেট প্যাকে আছে। চালু থাকলে প্যাকেজে প্রতিটি ফাইল সাধারণ ফাইল হিসেবে থাকে আর প্যাকগুলো বাদ যায়, তাই এটি প্যাক করার আগের গেমের প্রায় সমান বড় হয় ({size})। বন্ধ থাকলে প্যাকগুলো যেমন আছে তেমনই ঢোকে, আর শুধু এমুলেটরই সেগুলো পড়তে পারে।", "cw_convert_leave_out_emu": "AMPR এমুলেটর বাদ দিন", "cw_convert_leave_out_emu_note": "তখন প্যাকেজে fakelib/libSceAmpr.sprx থাকে না, আর গেমটি PS5-এর নিজস্ব সিস্টেম লাইব্রেরি দিয়ে তার ফাইল পড়ে। এটি শুধু একটি গেমে, ফার্মওয়্যার 5.10-এ চেষ্টা করা হয়েছে। গেম চালু না হলে এটি বন্ধ রেখে প্যাকেজটি আবার তৈরি করুন।", -"cw_convert_unpack_needs_emulator": "এই গেমটি AMPR দিয়ে তার ফাইল পড়ে, আর এতে সাধারণ ফাইলের সঙ্গে কাজ করে এমন কোনো এমুলেটর নেই। PS5 সেটি ডাউনলোড করতে পারে না। “AMPR এমুলেটর বাদ দিন” চালু করুন, অথবা আপনার কম্পিউটারে PS5Upload দিয়ে এই প্যাকেজটি তৈরি করুন।", +"cw_convert_unpack_needs_emulator_v2": "এই গেমটি AMPR দিয়ে তার ফাইল পড়ে, আর এতে সাধারণ ফাইলের সঙ্গে কাজ করে এমন কোনো এমুলেটর নেই। অ্যাপ থেকে এই PS5-এ AMPR এমুলেটর রাখুন (সেটিংস › এই PS5), অথবা “AMPR এমুলেটর বাদ দিন” চালু করুন।", "cw_convert_err_not_packed": "এই গেমটি অ্যাসেট প্যাকে নেই, তাই খোলার মতো কিছু নেই। “অ্যাসেট প্যাক খুলুন” বন্ধ করুন।", "cw_convert_reading": "গেম পড়া হচ্ছে…", "cw_convert_running": "{name} রূপান্তর হচ্ছে…", @@ -6651,6 +6651,9 @@ library_compressed_hint: "সংকুচিত ইমেজ চালাতে "minion_zstd_runtime_note": "PS5-এ রূপান্তর করতে zstd প্যাক লেখার জন্য কনসোলে zstd রানটাইম (ampr-emu-ng) লাগে। এই PS5 সংযুক্ত হলে অ্যাপ নিজেই এটি সেখানে রেখে দেয়।", "minion_zstd_runtime_put": "এই PS5-এ zstd রানটাইম রাখুন", "minion_zstd_runtime_done": "ampr-emu-ng {version} এই PS5-এ আছে।", +"minion_ampr_emu_note": "PS5-এ রূপান্তর যখন অ্যাসেট প্যাক খোলে, তখন AMPR এমুলেটর রাখতে কনসোলে ampr_emu লাগে। আপনি চাইলে তবেই অ্যাপ এটি সেখানে রাখে।", +"minion_ampr_emu_put": "এই PS5-এ AMPR এমুলেটর রাখুন", +"minion_ampr_emu_done": "ampr_emu {version} এই PS5-এ আছে।", "remove_ps5u_console_busy": "PS5Upload-এর শুরু করা একটি কাজে PS5 ব্যস্ত। শেষ হওয়া পর্যন্ত অপেক্ষা করুন, তারপর আবার চেষ্টা করুন।", "remove_ps5u_console_converting": "রূপান্তর PS5-এ একটি গেমে কাজ করছে। শেষ হওয়া পর্যন্ত অপেক্ষা করুন, তারপর আবার চেষ্টা করুন।", "remove_ps5u_console_extracting": "PS5 একটি আর্কাইভ এক্সট্র্যাক্ট করছে। শেষ হওয়া পর্যন্ত অপেক্ষা করুন, তারপর আবার চেষ্টা করুন।", diff --git a/client/src/i18n/locales/de.ts b/client/src/i18n/locales/de.ts index bcf729b40..ebfa96024 100644 --- a/client/src/i18n/locales/de.ts +++ b/client/src/i18n/locales/de.ts @@ -869,7 +869,7 @@ home_low_space_body: "Aufräumen findet Updates, übrig gebliebene Pakete und ni "cw_convert_unpack_note": "Dieses Spiel liegt in {kind}-Asset-Packs. An: Das Paket enthält jede Datei als normale Datei und lässt die Packs weg, sodass es etwa so groß ist wie das Spiel vor dem Packen ({size}). Aus: Die Packs kommen unverändert hinein, und nur der Emulator kann sie lesen.", "cw_convert_leave_out_emu": "AMPR-Emulator weglassen", "cw_convert_leave_out_emu_note": "Das Paket enthält dann keine fakelib/libSceAmpr.sprx, und das Spiel liest seine Dateien über die eigene Systembibliothek der PS5. Das wurde mit einem Spiel auf Firmware 5.10 ausprobiert. Startet das Spiel nicht, erstelle das Paket erneut mit dieser Option aus.", -"cw_convert_unpack_needs_emulator": "Dieses Spiel liest seine Dateien über AMPR und hat keinen Emulator, der mit normalen Dateien funktioniert. Die PS5 kann keinen herunterladen. Schalte „AMPR-Emulator weglassen“ ein oder erstelle dieses Paket mit PS5Upload auf deinem Computer.", +"cw_convert_unpack_needs_emulator_v2": "Dieses Spiel liest seine Dateien über AMPR und hat keinen Emulator, der mit normalen Dateien funktioniert. Bring den AMPR-Emulator aus der App auf diese PS5 (Einstellungen › Diese PS5) oder schalte „AMPR-Emulator weglassen“ ein.", "cw_convert_err_not_packed": "Dieses Spiel liegt nicht in Asset-Packs, es gibt also nichts zu entpacken. Schalte „Asset-Packs entpacken“ aus.", "cw_convert_reading": "Spiel wird gelesen…", "cw_convert_running": "{name} wird konvertiert…", @@ -6659,6 +6659,9 @@ library_compressed_hint: "Komprimierte Images benötigen ShadowMount+ zum Spiele "minion_zstd_runtime_note": "Konvertieren auf der PS5 braucht die zstd-Laufzeitumgebung (ampr-emu-ng) auf der Konsole, um zstd-Packs zu schreiben. Die App legt sie von selbst dort ab, wenn sich diese PS5 verbindet.", "minion_zstd_runtime_put": "zstd-Laufzeitumgebung auf diese PS5 bringen", "minion_zstd_runtime_done": "ampr-emu-ng {version} ist auf dieser PS5.", +"minion_ampr_emu_note": "Damit Konvertieren auf der PS5 beim Entpacken von Asset-Packs einen AMPR-Emulator behalten kann, braucht die Konsole ampr_emu. Die App legt ihn nur dort ab, wenn du darum bittest.", +"minion_ampr_emu_put": "AMPR-Emulator auf diese PS5 bringen", +"minion_ampr_emu_done": "ampr_emu {version} ist auf dieser PS5.", "remove_ps5u_console_busy": "Die PS5 ist mit etwas beschäftigt, das PS5Upload gestartet hat. Warte, bis es fertig ist, und versuche es dann erneut.", "remove_ps5u_console_converting": "Konvertieren arbeitet gerade an einem Spiel auf der PS5. Warte, bis es fertig ist, und versuche es dann erneut.", "remove_ps5u_console_extracting": "Die PS5 entpackt gerade ein Archiv. Warte, bis es fertig ist, und versuche es dann erneut.", diff --git a/client/src/i18n/locales/en.ts b/client/src/i18n/locales/en.ts index 9da8fb53a..27784f446 100644 --- a/client/src/i18n/locales/en.ts +++ b/client/src/i18n/locales/en.ts @@ -1443,7 +1443,7 @@ home_low_space_body: "Clean up finds updates, leftover packages and games you ne "cw_convert_unpack_note": "This game is in {kind} asset packs. On, the package holds every file as a plain file and leaves the packs out, so it is about as large as the game was before packing ({size}). Off, the packs go in as they are, and only the emulator can read them.", "cw_convert_leave_out_emu": "Leave out the AMPR emulator", "cw_convert_leave_out_emu_note": "The package then has no fakelib/libSceAmpr.sprx, and the game reads its files through the PS5's own system library. This has been tried with one game, on firmware 5.10. If the game doesn't start, make the package again with this off.", -"cw_convert_unpack_needs_emulator": "This game reads its files through AMPR and has no emulator that works with plain files. The PS5 can't download one. Turn on Leave out the AMPR emulator, or make this package with PS5Upload on your computer.", +"cw_convert_unpack_needs_emulator_v2": "This game reads its files through AMPR and has no emulator that works with plain files. Put the AMPR emulator on this PS5 from the app (Settings › This PS5), or turn on Leave out the AMPR emulator.", "cw_convert_err_not_packed": "This game isn't in asset packs, so there is nothing to unpack. Turn off Unpack the asset packs.", "cw_convert_reading": "Reading the game…", "cw_convert_running": "Converting {name}…", @@ -6962,6 +6962,9 @@ library_compressed_hint: "Compressed images need ShadowMount+ to play. To edit, "minion_zstd_runtime_note": "Convert on the PS5 needs the zstd runtime (ampr-emu-ng) on the console to write zstd packs. The app puts it there on its own when this PS5 connects.", "minion_zstd_runtime_put": "Put the zstd runtime on this PS5", "minion_zstd_runtime_done": "ampr-emu-ng {version} is on this PS5.", +"minion_ampr_emu_note": "To keep an AMPR emulator when Convert on the PS5 unpacks asset packs, the console needs ampr_emu. The app puts it there only when you ask.", +"minion_ampr_emu_put": "Put the AMPR emulator on this PS5", +"minion_ampr_emu_done": "ampr_emu {version} is on this PS5.", "remove_ps5u_console_busy": "The PS5 is busy with something PS5Upload started. Wait for it to finish, then try again.", "remove_ps5u_console_converting": "Convert is working on a game on the PS5. Wait for it to finish, then try again.", "remove_ps5u_console_extracting": "The PS5 is extracting an archive. Wait for it to finish, then try again.", diff --git a/client/src/i18n/locales/es.ts b/client/src/i18n/locales/es.ts index 6bed5f295..d7900d16e 100644 --- a/client/src/i18n/locales/es.ts +++ b/client/src/i18n/locales/es.ts @@ -868,7 +868,7 @@ home_low_space_body: "Limpiar encuentra actualizaciones, paquetes sobrantes y ju "cw_convert_unpack_note": "Este juego está en paquetes de recursos {kind}. Si está activado, el paquete guarda cada archivo como archivo normal y omite los paquetes de recursos, así que ocupa más o menos lo que el juego antes de empaquetarlo ({size}). Si está desactivado, los paquetes de recursos entran tal cual y solo el emulador puede leerlos.", "cw_convert_leave_out_emu": "Omitir el emulador AMPR", "cw_convert_leave_out_emu_note": "El paquete no lleva entonces fakelib/libSceAmpr.sprx, y el juego lee sus archivos con la biblioteca del sistema de la propia PS5. Se ha probado con un solo juego, en el firmware 5.10. Si el juego no arranca, vuelve a crear el paquete con esta opción desactivada.", -"cw_convert_unpack_needs_emulator": "Este juego lee sus archivos mediante AMPR y no tiene un emulador que funcione con archivos normales. La PS5 no puede descargar uno. Activa «Omitir el emulador AMPR» o crea este paquete con PS5Upload en tu ordenador.", +"cw_convert_unpack_needs_emulator_v2": "Este juego lee sus archivos a través de AMPR y no tiene un emulador que funcione con archivos normales. Pon el emulador AMPR en esta PS5 desde la app (Configuración › Esta PS5) o activa Omitir el emulador AMPR.", "cw_convert_err_not_packed": "Este juego no está en paquetes de recursos, así que no hay nada que desempaquetar. Desactiva «Desempaquetar los paquetes de recursos».", "cw_convert_reading": "Leyendo el juego…", "cw_convert_running": "Convirtiendo {name}…", @@ -6604,6 +6604,9 @@ library_compressed_hint: "Las imágenes comprimidas necesitan ShadowMount+ para "minion_zstd_runtime_note": "Convertir en la PS5 necesita el runtime de zstd (ampr-emu-ng) en la consola para escribir paquetes zstd. La app lo coloca allí por sí sola cuando esta PS5 se conecta.", "minion_zstd_runtime_put": "Poner el runtime de zstd en esta PS5", "minion_zstd_runtime_done": "ampr-emu-ng {version} está en esta PS5.", +"minion_ampr_emu_note": "Para conservar un emulador AMPR cuando Convertir en la PS5 desempaqueta paquetes de recursos, la consola necesita ampr_emu. La app solo lo coloca allí cuando tú lo pides.", +"minion_ampr_emu_put": "Poner el emulador AMPR en esta PS5", +"minion_ampr_emu_done": "ampr_emu {version} está en esta PS5.", "remove_ps5u_console_busy": "La PS5 está ocupada con algo que inició PS5Upload. Espera a que termine y vuelve a intentarlo.", "remove_ps5u_console_converting": "Convertir está trabajando en un juego en la PS5. Espera a que termine y vuelve a intentarlo.", "remove_ps5u_console_extracting": "La PS5 está extrayendo un archivo comprimido. Espera a que termine y vuelve a intentarlo.", diff --git a/client/src/i18n/locales/fa.ts b/client/src/i18n/locales/fa.ts index 21a0ae5e6..b5cda2242 100644 --- a/client/src/i18n/locales/fa.ts +++ b/client/src/i18n/locales/fa.ts @@ -1350,7 +1350,7 @@ home_low_space_body: "پاک‌سازی به‌روزرسانی‌ها، بست "cw_convert_unpack_note": "این بازی در بسته‌های دارایی {kind} است. اگر روشن باشد، فایل ‎.pkg هر فایل را به‌صورت فایل ساده در خود دارد و بسته‌های دارایی را کنار می‌گذارد، پس تقریباً به اندازهٔ بازی پیش از بسته‌بندی است ({size}). اگر خاموش باشد، بسته‌های دارایی همان‌طور که هستند وارد می‌شوند و فقط شبیه‌ساز می‌تواند آن‌ها را بخواند.", "cw_convert_leave_out_emu": "کنار گذاشتن شبیه‌ساز AMPR", "cw_convert_leave_out_emu_note": "در این صورت فایل ‎.pkg هیچ fakelib/libSceAmpr.sprx ندارد و بازی فایل‌هایش را با کتابخانهٔ سیستمی خود PS5 می‌خواند. این فقط با یک بازی، روی فریم‌ور 5.10، امتحان شده است. اگر بازی اجرا نشد، ‎.pkg را دوباره با خاموش بودن این گزینه بسازید.", -"cw_convert_unpack_needs_emulator": "این بازی فایل‌هایش را از راه AMPR می‌خواند و شبیه‌سازی ندارد که با فایل‌های ساده کار کند. PS5 نمی‌تواند شبیه‌ساز دیگری دانلود کند. «کنار گذاشتن شبیه‌ساز AMPR» را روشن کنید، یا این ‎.pkg را با PS5Upload روی رایانه‌تان بسازید.", +"cw_convert_unpack_needs_emulator_v2": "این بازی فایل‌هایش را از راه AMPR می‌خواند و شبیه‌سازی ندارد که با فایل‌های ساده کار کند. شبیه‌ساز AMPR را از برنامه روی این PS5 بگذار (تنظیمات › این PS5)، یا «کنار گذاشتن شبیه‌ساز AMPR» را روشن کن.", "cw_convert_err_not_packed": "این بازی در بسته‌های دارایی نیست، پس چیزی برای باز کردن وجود ندارد. «باز کردن بسته‌های دارایی» را خاموش کنید.", "cw_convert_reading": "در حال خواندن بازی…", "cw_convert_running": "در حال تبدیل {name}…", @@ -6929,6 +6929,9 @@ library_compressed_hint: "برای اجرای ایمیج فشرده به ShadowM "minion_zstd_runtime_note": "تبدیل روی PS5 برای نوشتن بسته‌های zstd به محیط اجرای zstd (ampr-emu-ng) روی کنسول نیاز دارد. برنامه خودش آن را هنگام وصل شدن این PS5 آنجا می‌گذارد.", "minion_zstd_runtime_put": "محیط اجرای zstd را روی این PS5 بگذار", "minion_zstd_runtime_done": "ampr-emu-ng {version} روی این PS5 هست.", +"minion_ampr_emu_note": "برای نگه داشتن شبیه‌ساز AMPR وقتی تبدیل روی PS5 بسته‌های دارایی را باز می‌کند، کنسول به ampr_emu نیاز دارد. برنامه فقط وقتی خودت بخواهی آن را آنجا می‌گذارد.", +"minion_ampr_emu_put": "شبیه‌ساز AMPR را روی این PS5 بگذار", +"minion_ampr_emu_done": "ampr_emu {version} روی این PS5 هست.", "remove_ps5u_console_busy": "PS5 مشغول کاری است که PS5Upload شروع کرده. صبر کنید تمام شود، سپس دوباره امتحان کنید.", "remove_ps5u_console_converting": "تبدیل در حال کار روی یک بازی در PS5 است. صبر کنید تمام شود، سپس دوباره امتحان کنید.", "remove_ps5u_console_extracting": "PS5 در حال استخراج یک آرشیو است. صبر کنید تمام شود، سپس دوباره امتحان کنید.", diff --git a/client/src/i18n/locales/fr.ts b/client/src/i18n/locales/fr.ts index 9fae4f056..1770006ec 100644 --- a/client/src/i18n/locales/fr.ts +++ b/client/src/i18n/locales/fr.ts @@ -868,7 +868,7 @@ home_low_space_body: "Nettoyer trouve les mises à jour, les paquets restants et "cw_convert_unpack_note": "Ce jeu est en packs de ressources {kind}. Activé, le paquet contient chaque fichier comme fichier ordinaire et omet les packs : il fait donc à peu près la taille du jeu avant la mise en packs ({size}). Désactivé, les packs y entrent tels quels, et seul l'émulateur peut les lire.", "cw_convert_leave_out_emu": "Omettre l'émulateur AMPR", "cw_convert_leave_out_emu_note": "Le paquet n'a alors pas de fakelib/libSceAmpr.sprx, et le jeu lit ses fichiers avec la bibliothèque système de la PS5. Cela a été essayé avec un seul jeu, sur le firmware 5.10. Si le jeu ne démarre pas, refaites le paquet avec cette option décochée.", -"cw_convert_unpack_needs_emulator": "Ce jeu lit ses fichiers via AMPR et n'a pas d'émulateur qui fonctionne avec des fichiers ordinaires. La PS5 ne peut pas en télécharger un. Activez « Omettre l'émulateur AMPR », ou créez ce paquet avec PS5Upload sur votre ordinateur.", +"cw_convert_unpack_needs_emulator_v2": "Ce jeu lit ses fichiers via AMPR et n'a pas d'émulateur qui fonctionne avec des fichiers ordinaires. Installez l'émulateur AMPR sur cette PS5 depuis l'application (Paramètres › Cette PS5), ou activez Omettre l'émulateur AMPR.", "cw_convert_err_not_packed": "Ce jeu n'est pas en packs de ressources : il n'y a rien à décompresser. Désactivez « Décompresser les packs de ressources ».", "cw_convert_reading": "Lecture du jeu…", "cw_convert_running": "Conversion de {name}…", @@ -6667,6 +6667,9 @@ library_compressed_hint: "Les images compressées nécessitent ShadowMount+ pour "minion_zstd_runtime_note": "La conversion sur la PS5 a besoin du runtime zstd (ampr-emu-ng) sur la console pour écrire des packs zstd. L'application l'y place d'elle-même quand cette PS5 se connecte.", "minion_zstd_runtime_put": "Installer le runtime zstd sur cette PS5", "minion_zstd_runtime_done": "ampr-emu-ng {version} est sur cette PS5.", +"minion_ampr_emu_note": "Pour garder un émulateur AMPR quand la conversion sur la PS5 décompresse des packs de ressources, la console a besoin d'ampr_emu. L'application ne l'y place que si vous le demandez.", +"minion_ampr_emu_put": "Installer l'émulateur AMPR sur cette PS5", +"minion_ampr_emu_done": "ampr_emu {version} est sur cette PS5.", "remove_ps5u_console_busy": "La PS5 est occupée par une tâche lancée par PS5Upload. Attendez qu'elle se termine, puis réessayez.", "remove_ps5u_console_converting": "Convertir traite un jeu sur la PS5. Attendez la fin, puis réessayez.", "remove_ps5u_console_extracting": "La PS5 extrait une archive. Attendez la fin, puis réessayez.", diff --git a/client/src/i18n/locales/hi.ts b/client/src/i18n/locales/hi.ts index e9164fc87..bc29b9fb2 100644 --- a/client/src/i18n/locales/hi.ts +++ b/client/src/i18n/locales/hi.ts @@ -869,7 +869,7 @@ home_low_space_body: "क्लीन अप ऐसे अपडेट, बच "cw_convert_unpack_note": "यह गेम {kind} एसेट पैक में है। चालू होने पर पैकेज में हर फ़ाइल सादी फ़ाइल के रूप में रहती है और पैक छोड़ दिए जाते हैं, इसलिए यह लगभग उतना ही बड़ा होता है जितना पैक करने से पहले गेम था ({size})। बंद होने पर पैक जैसे हैं वैसे ही जाते हैं, और उन्हें सिर्फ़ एमुलेटर पढ़ सकता है।", "cw_convert_leave_out_emu": "AMPR एमुलेटर छोड़ दें", "cw_convert_leave_out_emu_note": "तब पैकेज में fakelib/libSceAmpr.sprx नहीं होती, और गेम अपनी फ़ाइलें PS5 की अपनी सिस्टम लाइब्रेरी से पढ़ता है। इसे सिर्फ़ एक गेम पर, फ़र्मवेयर 5.10 पर आज़माया गया है। अगर गेम शुरू न हो, तो इसे बंद करके पैकेज फिर से बनाएँ।", -"cw_convert_unpack_needs_emulator": "यह गेम अपनी फ़ाइलें AMPR से पढ़ता है और इसमें ऐसा कोई एमुलेटर नहीं है जो सादी फ़ाइलों के साथ काम करे। PS5 उसे डाउनलोड नहीं कर सकता। “AMPR एमुलेटर छोड़ दें” चालू करें, या यह पैकेज अपने कंप्यूटर पर PS5Upload से बनाएँ।", +"cw_convert_unpack_needs_emulator_v2": "यह गेम अपनी फ़ाइलें AMPR से पढ़ता है और इसमें ऐसा कोई एमुलेटर नहीं है जो सादी फ़ाइलों के साथ काम करे। ऐप से इस PS5 पर AMPR एमुलेटर रखें (सेटिंग्स › यह PS5), या \"AMPR एमुलेटर छोड़ दें\" चालू करें।", "cw_convert_err_not_packed": "यह गेम एसेट पैक में नहीं है, इसलिए खोलने के लिए कुछ नहीं है। “एसेट पैक खोलें” बंद करें।", "cw_convert_reading": "गेम पढ़ा जा रहा है…", "cw_convert_running": "{name} कन्वर्ट हो रहा है…", @@ -6665,6 +6665,9 @@ library_compressed_hint: "संपीड़ित इमेज चलाने "minion_zstd_runtime_note": "PS5 पर कन्वर्ट को zstd पैक लिखने के लिए कंसोल पर zstd रनटाइम (ampr-emu-ng) चाहिए। यह PS5 जुड़ने पर ऐप इसे अपने आप वहाँ रख देता है।", "minion_zstd_runtime_put": "इस PS5 पर zstd रनटाइम रखें", "minion_zstd_runtime_done": "ampr-emu-ng {version} इस PS5 पर है।", +"minion_ampr_emu_note": "PS5 पर कन्वर्ट जब एसेट पैक खोलता है, तब AMPR एमुलेटर रखने के लिए कंसोल पर ampr_emu चाहिए। ऐप इसे वहाँ तभी रखता है जब आप कहें।", +"minion_ampr_emu_put": "इस PS5 पर AMPR एमुलेटर रखें", +"minion_ampr_emu_done": "ampr_emu {version} इस PS5 पर है।", "remove_ps5u_console_busy": "PS5 किसी ऐसे काम में व्यस्त है जिसे PS5Upload ने शुरू किया था। उसके पूरा होने तक रुकें, फिर दोबारा कोशिश करें।", "remove_ps5u_console_converting": "कन्वर्ट PS5 पर एक गेम पर काम कर रहा है। उसके पूरा होने तक रुकें, फिर दोबारा कोशिश करें।", "remove_ps5u_console_extracting": "PS5 एक आर्काइव निकाल रहा है। उसके पूरा होने तक रुकें, फिर दोबारा कोशिश करें।", diff --git a/client/src/i18n/locales/hu.ts b/client/src/i18n/locales/hu.ts index 4ae819881..f82a587b8 100644 --- a/client/src/i18n/locales/hu.ts +++ b/client/src/i18n/locales/hu.ts @@ -1163,7 +1163,7 @@ home_low_space_body: "A Takarítás megkeresi a frissítéseket, a maradék csom "cw_convert_unpack_note": "Ez a játék {kind} elemcsomagokban van. Bekapcsolva a csomag minden fájlt sima fájlként tartalmaz, az elemcsomagok kimaradnak, így nagyjából akkora, mint a játék csomagolás előtt ({size}). Kikapcsolva az elemcsomagok változatlanul kerülnek bele, és csak az emulátor tudja olvasni őket.", "cw_convert_leave_out_emu": "AMPR-emulátor kihagyása", "cw_convert_leave_out_emu_note": "A csomagban ekkor nincs fakelib/libSceAmpr.sprx, és a játék a PS5 saját rendszerkönyvtárán keresztül olvassa a fájljait. Ezt egyetlen játékkal, 5.10-es firmware-en próbálták ki. Ha a játék nem indul el, készítsd el újra a csomagot ezzel kikapcsolva.", -"cw_convert_unpack_needs_emulator": "Ez a játék AMPR-en keresztül olvassa a fájljait, és nincs benne olyan emulátor, amely sima fájlokkal működik. A PS5 nem tud ilyet letölteni. Kapcsold be az „AMPR-emulátor kihagyása” lehetőséget, vagy készítsd el ezt a csomagot a PS5Uploaddal a számítógépeden.", +"cw_convert_unpack_needs_emulator_v2": "Ez a játék AMPR-en keresztül olvassa a fájljait, és nincs olyan emulátora, amely sima fájlokkal működik. Töltsd fel az AMPR-emulátort erre a PS5-re az appból (Beállítások › Ez a PS5), vagy kapcsold be az AMPR-emulátor kihagyása lehetőséget.", "cw_convert_err_not_packed": "Ez a játék nincs elemcsomagokban, így nincs mit kibontani. Kapcsold ki az „Elemcsomagok kibontása” lehetőséget.", "cw_convert_reading": "A játék beolvasása…", "cw_convert_running": "{name} átalakítása…", @@ -6943,6 +6943,9 @@ library_compressed_hint: "A tömörített képfájlok futtatásához ShadowMount "minion_zstd_runtime_note": "A PS5-ön végzett átalakításhoz a konzolon kell lennie a zstd futtatókörnyezetnek (ampr-emu-ng), hogy zstd csomagokat írhasson. Az app magától odateszi, amikor ez a PS5 csatlakozik.", "minion_zstd_runtime_put": "A zstd futtatókörnyezet feltöltése erre a PS5-re", "minion_zstd_runtime_done": "Az ampr-emu-ng {version} megvan ezen a PS5-ön.", +"minion_ampr_emu_note": "Ahhoz, hogy a PS5-ön végzett átalakítás az elemcsomagok kibontásakor megtarthasson egy AMPR-emulátort, a konzolon ampr_emu kell. Az app csak akkor teszi oda, ha kéred.", +"minion_ampr_emu_put": "Az AMPR-emulátor feltöltése erre a PS5-re", +"minion_ampr_emu_done": "Az ampr_emu {version} megvan ezen a PS5-ön.", "remove_ps5u_console_busy": "A PS5 a PS5Upload által indított feladattal van elfoglalva. Várd meg, amíg befejeződik, majd próbáld újra.", "remove_ps5u_console_converting": "Az Átalakítás egy játékon dolgozik a PS5-ön. Várd meg, amíg befejeződik, majd próbáld újra.", "remove_ps5u_console_extracting": "A PS5 egy archívumot csomagol ki. Várd meg, amíg befejeződik, majd próbáld újra.", diff --git a/client/src/i18n/locales/id.ts b/client/src/i18n/locales/id.ts index ae6b10536..2e4fa1d39 100644 --- a/client/src/i18n/locales/id.ts +++ b/client/src/i18n/locales/id.ts @@ -868,7 +868,7 @@ home_low_space_body: "Bersihkan menemukan pembaruan, paket sisa, dan game yang t "cw_convert_unpack_note": "Game ini dalam paket aset {kind}. Jika nyala, paket .pkg berisi setiap file sebagai file biasa dan paket aset tidak disertakan, jadi ukurannya kira-kira sama dengan game sebelum dikemas ({size}). Jika mati, paket aset dimasukkan apa adanya, dan hanya emulator yang bisa membacanya.", "cw_convert_leave_out_emu": "Jangan sertakan emulator AMPR", "cw_convert_leave_out_emu_note": "Paket itu lalu tidak punya fakelib/libSceAmpr.sprx, dan game membaca filenya lewat pustaka sistem milik PS5 sendiri. Ini baru dicoba dengan satu game, di firmware 5.10. Jika game tidak mau mulai, buat paketnya lagi dengan opsi ini dimatikan.", -"cw_convert_unpack_needs_emulator": "Game ini membaca filenya lewat AMPR dan tidak punya emulator yang bekerja dengan file biasa. PS5 tidak bisa mengunduhnya. Nyalakan “Jangan sertakan emulator AMPR”, atau buat paket ini dengan PS5Upload di komputer.", +"cw_convert_unpack_needs_emulator_v2": "Game ini membaca filenya lewat AMPR dan tidak punya emulator yang bekerja dengan file biasa. Taruh emulator AMPR di PS5 ini dari aplikasi (Pengaturan › PS5 ini), atau aktifkan Jangan sertakan emulator AMPR.", "cw_convert_err_not_packed": "Game ini tidak dalam paket aset, jadi tidak ada yang perlu dibongkar. Matikan “Bongkar paket aset”.", "cw_convert_reading": "Membaca game…", "cw_convert_running": "Mengonversi {name}…", @@ -6660,6 +6660,9 @@ library_compressed_hint: "Image terkompresi memerlukan ShadowMount+ untuk bermai "minion_zstd_runtime_note": "Konversi di PS5 butuh runtime zstd (ampr-emu-ng) di konsol untuk menulis paket zstd. Aplikasi menaruhnya di sana sendiri saat PS5 ini terhubung.", "minion_zstd_runtime_put": "Taruh runtime zstd di PS5 ini", "minion_zstd_runtime_done": "ampr-emu-ng {version} sudah ada di PS5 ini.", +"minion_ampr_emu_note": "Agar Konversi di PS5 bisa tetap memakai emulator AMPR saat membongkar paket aset, konsol butuh ampr_emu. Aplikasi hanya menaruhnya di sana kalau kamu memintanya.", +"minion_ampr_emu_put": "Taruh emulator AMPR di PS5 ini", +"minion_ampr_emu_done": "ampr_emu {version} sudah ada di PS5 ini.", "remove_ps5u_console_busy": "PS5 sedang mengerjakan sesuatu yang dimulai PS5Upload. Tunggu sampai selesai, lalu coba lagi.", "remove_ps5u_console_converting": "Konversi sedang memproses game di PS5. Tunggu sampai selesai, lalu coba lagi.", "remove_ps5u_console_extracting": "PS5 sedang mengekstrak arsip. Tunggu sampai selesai, lalu coba lagi.", diff --git a/client/src/i18n/locales/it.ts b/client/src/i18n/locales/it.ts index e2a28c0c8..2bacbb4c9 100644 --- a/client/src/i18n/locales/it.ts +++ b/client/src/i18n/locales/it.ts @@ -868,7 +868,7 @@ home_low_space_body: "Pulizia trova aggiornamenti, pacchetti rimasti e giochi ma "cw_convert_unpack_note": "Questo gioco è in pacchetti di risorse {kind}. Se attivo, il pacchetto contiene ogni file come file normale e tralascia i pacchetti di risorse, quindi è grande più o meno quanto il gioco prima dell'impacchettamento ({size}). Se disattivo, i pacchetti di risorse entrano così come sono e solo l'emulatore può leggerli.", "cw_convert_leave_out_emu": "Ometti l'emulatore AMPR", "cw_convert_leave_out_emu_note": "Il pacchetto non ha allora fakelib/libSceAmpr.sprx e il gioco legge i suoi file tramite la libreria di sistema della PS5. È stato provato con un solo gioco, sul firmware 5.10. Se il gioco non si avvia, crea di nuovo il pacchetto con questa opzione disattivata.", -"cw_convert_unpack_needs_emulator": "Questo gioco legge i suoi file tramite AMPR e non ha un emulatore che funzioni con i file normali. La PS5 non può scaricarne uno. Attiva «Ometti l'emulatore AMPR», oppure crea questo pacchetto con PS5Upload sul computer.", +"cw_convert_unpack_needs_emulator_v2": "Questo gioco legge i suoi file tramite AMPR e non ha un emulatore che funzioni con file normali. Metti l'emulatore AMPR su questa PS5 dall'app (Impostazioni › Questa PS5) oppure attiva Ometti l'emulatore AMPR.", "cw_convert_err_not_packed": "Questo gioco non è in pacchetti di risorse, quindi non c'è nulla da spacchettare. Disattiva «Spacchetta i pacchetti di risorse».", "cw_convert_reading": "Lettura del gioco…", "cw_convert_running": "Conversione di {name}…", @@ -6604,6 +6604,9 @@ library_compressed_hint: "Le immagini compresse richiedono ShadowMount+ per gioc "minion_zstd_runtime_note": "La conversione sulla PS5 richiede il runtime zstd (ampr-emu-ng) sulla console per scrivere pacchetti zstd. L'app lo installa da sola quando questa PS5 si connette.", "minion_zstd_runtime_put": "Metti il runtime zstd su questa PS5", "minion_zstd_runtime_done": "ampr-emu-ng {version} è su questa PS5.", +"minion_ampr_emu_note": "Per mantenere un emulatore AMPR quando la conversione sulla PS5 spacchetta i pacchetti di risorse, la console ha bisogno di ampr_emu. L'app lo mette lì solo quando lo chiedi tu.", +"minion_ampr_emu_put": "Metti l'emulatore AMPR su questa PS5", +"minion_ampr_emu_done": "ampr_emu {version} è su questa PS5.", "remove_ps5u_console_busy": "La PS5 è occupata con qualcosa avviato da PS5Upload. Attendi che finisca, poi riprova.", "remove_ps5u_console_converting": "Converti sta elaborando un gioco sulla PS5. Attendi che finisca, poi riprova.", "remove_ps5u_console_extracting": "La PS5 sta estraendo un archivio. Attendi che finisca, poi riprova.", diff --git a/client/src/i18n/locales/ja.ts b/client/src/i18n/locales/ja.ts index 1a3694e66..2c97aecc0 100644 --- a/client/src/i18n/locales/ja.ts +++ b/client/src/i18n/locales/ja.ts @@ -869,7 +869,7 @@ home_low_space_body: "クリーンアップは、消してよいアップデー "cw_convert_unpack_note": "このゲームは {kind} アセットパックです。オンにすると、パッケージにはすべてのファイルが通常のファイルとして入り、パックは含めません。そのためサイズはパック化する前のゲームとほぼ同じになります({size})。オフにすると、パックはそのまま入り、それを読めるのはエミュレーターだけです。", "cw_convert_leave_out_emu": "AMPR エミュレーターを含めない", "cw_convert_leave_out_emu_note": "パッケージには fakelib/libSceAmpr.sprx が入らず、ゲームは PS5 自身のシステムライブラリでファイルを読みます。試したのはファームウェア 5.10 上の 1 本のゲームだけです。ゲームが起動しない場合は、これをオフにしてパッケージを作り直してください。", -"cw_convert_unpack_needs_emulator": "このゲームは AMPR 経由でファイルを読みますが、通常のファイルで動くエミュレーターが入っていません。PS5 ではダウンロードできません。「AMPR エミュレーターを含めない」をオンにするか、コンピューターの PS5Upload でこのパッケージを作ってください。", +"cw_convert_unpack_needs_emulator_v2": "このゲームは AMPR 経由でファイルを読み込みますが、通常のファイルで動くエミュレーターがありません。アプリから AMPR エミュレーターをこの PS5 に配置する(設定 › この PS5)か、「AMPR エミュレーターを含めない」をオンにしてください。", "cw_convert_err_not_packed": "このゲームはアセットパックではないため、展開するものがありません。「アセットパックを展開」をオフにしてください。", "cw_convert_reading": "ゲームを読み込み中…", "cw_convert_running": "{name} を変換中…", @@ -6670,6 +6670,9 @@ library_compressed_hint: "圧縮イメージのプレイには ShadowMount+ が "minion_zstd_runtime_note": "PS5 上での変換で zstd パックを書き出すには、本体に zstd ランタイム(ampr-emu-ng)が必要です。この PS5 が接続されると、アプリが自動で配置します。", "minion_zstd_runtime_put": "この PS5 に zstd ランタイムを配置", "minion_zstd_runtime_done": "この PS5 には ampr-emu-ng {version} があります。", +"minion_ampr_emu_note": "PS5 上での変換でアセットパックを展開するときに AMPR エミュレーターを残すには、本体に ampr_emu が必要です。アプリは、あなたが求めたときだけ配置します。", +"minion_ampr_emu_put": "この PS5 に AMPR エミュレーターを配置", +"minion_ampr_emu_done": "この PS5 には ampr_emu {version} があります。", "remove_ps5u_console_busy": "PS5 は PS5Upload が開始した処理を実行中です。終わるまで待ってから再試行してください。", "remove_ps5u_console_converting": "変換が PS5 上のゲームを処理中です。終わるまで待ってから再試行してください。", "remove_ps5u_console_extracting": "PS5 がアーカイブを展開中です。終わるまで待ってから再試行してください。", diff --git a/client/src/i18n/locales/ko.ts b/client/src/i18n/locales/ko.ts index 21fffcd2d..fd8e44fa0 100644 --- a/client/src/i18n/locales/ko.ts +++ b/client/src/i18n/locales/ko.ts @@ -869,7 +869,7 @@ home_low_space_body: "정리에서 지워도 되는 업데이트, 남은 패키 "cw_convert_unpack_note": "이 게임은 {kind} 에셋 팩으로 되어 있습니다. 켜면 패키지에 모든 파일이 일반 파일로 들어가고 팩은 빠지므로, 크기는 팩으로 만들기 전의 게임과 비슷합니다({size}). 끄면 팩이 그대로 들어가며, 에뮬레이터만 그 팩을 읽을 수 있습니다.", "cw_convert_leave_out_emu": "AMPR 에뮬레이터 빼기", "cw_convert_leave_out_emu_note": "그러면 패키지에 fakelib/libSceAmpr.sprx가 없고, 게임은 PS5 자체 시스템 라이브러리로 파일을 읽습니다. 펌웨어 5.10에서 게임 하나로만 시험해 봤습니다. 게임이 시작되지 않으면 이 옵션을 끄고 패키지를 다시 만드세요.", -"cw_convert_unpack_needs_emulator": "이 게임은 AMPR로 파일을 읽는데, 일반 파일에서 작동하는 에뮬레이터가 들어 있지 않습니다. PS5에서는 내려받을 수 없습니다. 'AMPR 에뮬레이터 빼기'를 켜거나, 컴퓨터의 PS5Upload로 이 패키지를 만드세요.", +"cw_convert_unpack_needs_emulator_v2": "이 게임은 AMPR로 파일을 읽는데, 일반 파일에서 작동하는 에뮬레이터가 없습니다. 앱에서 이 PS5에 AMPR 에뮬레이터를 넣거나(설정 › 이 PS5) 'AMPR 에뮬레이터 빼기'를 켜세요.", "cw_convert_err_not_packed": "이 게임은 에셋 팩으로 되어 있지 않아 풀 것이 없습니다. '에셋 팩 풀기'를 끄세요.", "cw_convert_reading": "게임을 읽는 중…", "cw_convert_running": "{name} 변환 중…", @@ -6668,6 +6668,9 @@ library_compressed_hint: "압축 이미지를 플레이하려면 ShadowMount+가 "minion_zstd_runtime_note": "PS5에서 변환할 때 zstd 팩을 쓰려면 본체에 zstd 런타임(ampr-emu-ng)이 있어야 합니다. 이 PS5가 연결되면 앱이 알아서 넣어 둡니다.", "minion_zstd_runtime_put": "이 PS5에 zstd 런타임 넣기", "minion_zstd_runtime_done": "이 PS5에 ampr-emu-ng {version}이(가) 있습니다.", +"minion_ampr_emu_note": "PS5에서 변환할 때 에셋 팩을 풀면서 AMPR 에뮬레이터를 유지하려면 본체에 ampr_emu가 있어야 합니다. 앱은 요청할 때만 넣어 둡니다.", +"minion_ampr_emu_put": "이 PS5에 AMPR 에뮬레이터 넣기", +"minion_ampr_emu_done": "이 PS5에 ampr_emu {version}이(가) 있습니다.", "remove_ps5u_console_busy": "PS5가 PS5Upload에서 시작한 작업을 처리하고 있습니다. 끝날 때까지 기다린 뒤 다시 시도하세요.", "remove_ps5u_console_converting": "변환이 PS5에서 게임을 처리하고 있습니다. 끝날 때까지 기다린 뒤 다시 시도하세요.", "remove_ps5u_console_extracting": "PS5가 압축 파일을 풀고 있습니다. 끝날 때까지 기다린 뒤 다시 시도하세요.", diff --git a/client/src/i18n/locales/pl.ts b/client/src/i18n/locales/pl.ts index aac581b4b..1ac80cb5b 100644 --- a/client/src/i18n/locales/pl.ts +++ b/client/src/i18n/locales/pl.ts @@ -1116,7 +1116,7 @@ home_low_space_body: "Porządki znajdują aktualizacje, pozostałe pakiety i nie "cw_convert_unpack_note": "Ta gra jest w paczkach zasobów {kind}. Gdy włączone, pakiet zawiera każdy plik jako zwykły plik i pomija paczki, więc jest mniej więcej tak duży jak gra przed spakowaniem ({size}). Gdy wyłączone, paczki trafiają do pakietu bez zmian i tylko emulator może je czytać.", "cw_convert_leave_out_emu": "Pomiń emulator AMPR", "cw_convert_leave_out_emu_note": "Pakiet nie ma wtedy fakelib/libSceAmpr.sprx, a gra czyta swoje pliki przez własną bibliotekę systemową PS5. Sprawdzono to tylko z jedną grą, na firmware 5.10. Jeśli gra się nie uruchamia, utwórz pakiet ponownie z tą opcją wyłączoną.", -"cw_convert_unpack_needs_emulator": "Ta gra czyta swoje pliki przez AMPR i nie ma emulatora, który działa ze zwykłymi plikami. PS5 nie może go pobrać. Włącz „Pomiń emulator AMPR” albo utwórz ten pakiet w PS5Upload na komputerze.", +"cw_convert_unpack_needs_emulator_v2": "Ta gra czyta swoje pliki przez AMPR i nie ma emulatora, który działa ze zwykłymi plikami. Umieść emulator AMPR na tej PS5 z aplikacji (Ustawienia › Ta PS5) albo włącz Pomiń emulator AMPR.", "cw_convert_err_not_packed": "Ta gra nie jest w paczkach zasobów, więc nie ma czego rozpakowywać. Wyłącz „Rozpakuj paczki zasobów”.", "cw_convert_reading": "Odczytywanie gry…", "cw_convert_running": "Konwertowanie {name}…", @@ -6888,6 +6888,9 @@ library_compressed_hint: "Skompresowane obrazy wymagają ShadowMount+, aby grać "minion_zstd_runtime_note": "Konwersja na PS5 potrzebuje na konsoli środowiska uruchomieniowego zstd (ampr-emu-ng), by zapisywać paczki zstd. Aplikacja sama je tam umieszcza, gdy ta PS5 się połączy.", "minion_zstd_runtime_put": "Umieść środowisko uruchomieniowe zstd na tej PS5", "minion_zstd_runtime_done": "ampr-emu-ng {version} jest na tej PS5.", +"minion_ampr_emu_note": "Aby konwersja na PS5 mogła zachować emulator AMPR przy rozpakowywaniu paczek zasobów, konsola potrzebuje ampr_emu. Aplikacja umieszcza go tam tylko na twoją prośbę.", +"minion_ampr_emu_put": "Umieść emulator AMPR na tej PS5", +"minion_ampr_emu_done": "ampr_emu {version} jest na tej PS5.", "remove_ps5u_console_busy": "PS5 jest zajęta czymś, co uruchomił PS5Upload. Poczekaj, aż się skończy, i spróbuj ponownie.", "remove_ps5u_console_converting": "Konwersja przetwarza grę na PS5. Poczekaj, aż się skończy, i spróbuj ponownie.", "remove_ps5u_console_extracting": "PS5 rozpakowuje archiwum. Poczekaj, aż się skończy, i spróbuj ponownie.", diff --git a/client/src/i18n/locales/pt-BR.ts b/client/src/i18n/locales/pt-BR.ts index 540ea164e..6e85f19cd 100644 --- a/client/src/i18n/locales/pt-BR.ts +++ b/client/src/i18n/locales/pt-BR.ts @@ -868,7 +868,7 @@ home_low_space_body: "Limpar encontra atualizações, pacotes que sobraram e jog "cw_convert_unpack_note": "Este jogo está em pacotes de recursos {kind}. Ativado, o pacote guarda cada arquivo como arquivo comum e deixa os pacotes de recursos de fora, então fica mais ou menos do tamanho do jogo antes de ser empacotado ({size}). Desativado, os pacotes de recursos entram como estão, e só o emulador consegue lê-los.", "cw_convert_leave_out_emu": "Deixar de fora o emulador AMPR", "cw_convert_leave_out_emu_note": "O pacote então não tem fakelib/libSceAmpr.sprx, e o jogo lê os arquivos pela própria biblioteca de sistema do PS5. Isso foi testado com um jogo só, no firmware 5.10. Se o jogo não iniciar, crie o pacote de novo com esta opção desligada.", -"cw_convert_unpack_needs_emulator": "Este jogo lê os arquivos pelo AMPR e não tem um emulador que funcione com arquivos comuns. O PS5 não consegue baixar um. Ative “Deixar de fora o emulador AMPR” ou crie este pacote com o PS5Upload no seu computador.", +"cw_convert_unpack_needs_emulator_v2": "Este jogo lê seus arquivos pelo AMPR e não tem um emulador que funcione com arquivos comuns. Coloque o emulador AMPR neste PS5 pelo app (Configurações › Este PS5) ou ative Deixar de fora o emulador AMPR.", "cw_convert_err_not_packed": "Este jogo não está em pacotes de recursos, então não há nada para desempacotar. Desative “Desempacotar os pacotes de recursos”.", "cw_convert_reading": "Lendo o jogo…", "cw_convert_running": "Convertendo {name}…", @@ -6666,6 +6666,9 @@ library_compressed_hint: "Imagens compactadas precisam do ShadowMount+ para joga "minion_zstd_runtime_note": "Converter no PS5 precisa do runtime zstd (ampr-emu-ng) no console para gravar pacotes zstd. O app o coloca lá sozinho quando este PS5 se conecta.", "minion_zstd_runtime_put": "Colocar o runtime zstd neste PS5", "minion_zstd_runtime_done": "O ampr-emu-ng {version} está neste PS5.", +"minion_ampr_emu_note": "Para manter um emulador AMPR quando Converter no PS5 desempacota pacotes de recursos, o console precisa do ampr_emu. O app só o coloca lá quando você pede.", +"minion_ampr_emu_put": "Colocar o emulador AMPR neste PS5", +"minion_ampr_emu_done": "O ampr_emu {version} está neste PS5.", "remove_ps5u_console_busy": "O PS5 está ocupado com algo que o PS5Upload iniciou. Espere terminar e tente de novo.", "remove_ps5u_console_converting": "O Converter está trabalhando em um jogo no PS5. Espere terminar e tente de novo.", "remove_ps5u_console_extracting": "O PS5 está extraindo um arquivo compactado. Espere terminar e tente de novo.", diff --git a/client/src/i18n/locales/ru.ts b/client/src/i18n/locales/ru.ts index 0c27d02bd..d20205838 100644 --- a/client/src/i18n/locales/ru.ts +++ b/client/src/i18n/locales/ru.ts @@ -868,7 +868,7 @@ home_low_space_body: "Очистка находит обновления, ост "cw_convert_unpack_note": "Эта игра в пакетах ресурсов {kind}. Если включено, в пакете каждый файл лежит обычным файлом, а пакеты ресурсов не включаются, поэтому он примерно такого же размера, как игра до упаковки ({size}). Если выключено, пакеты ресурсов попадают внутрь как есть, и прочитать их может только эмулятор.", "cw_convert_leave_out_emu": "Не включать эмулятор AMPR", "cw_convert_leave_out_emu_note": "Тогда в пакете нет fakelib/libSceAmpr.sprx, и игра читает свои файлы через собственную системную библиотеку PS5. Это проверено только на одной игре, на прошивке 5.10. Если игра не запускается, создайте пакет заново с выключенным параметром.", -"cw_convert_unpack_needs_emulator": "Эта игра читает свои файлы через AMPR, и в ней нет эмулятора, который работает с обычными файлами. PS5 не может его скачать. Включите «Не включать эмулятор AMPR» или создайте этот пакет в PS5Upload на компьютере.", +"cw_convert_unpack_needs_emulator_v2": "Эта игра читает свои файлы через AMPR, и у неё нет эмулятора, который работает с обычными файлами. Установите эмулятор AMPR на эту PS5 из приложения (Настройки › Эта PS5) или включите «Не включать эмулятор AMPR».", "cw_convert_err_not_packed": "Эта игра не в пакетах ресурсов, поэтому распаковывать нечего. Выключите «Распаковать пакеты ресурсов».", "cw_convert_reading": "Чтение игры…", "cw_convert_running": "Конвертация {name}…", @@ -6604,6 +6604,9 @@ library_compressed_hint: "Для запуска сжатых образов ну "minion_zstd_runtime_note": "Чтобы конвертация на PS5 могла записывать пакеты zstd, на консоли нужна среда выполнения zstd (ampr-emu-ng). Приложение само устанавливает её, когда эта PS5 подключается.", "minion_zstd_runtime_put": "Установить среду выполнения zstd на эту PS5", "minion_zstd_runtime_done": "ampr-emu-ng {version} установлен на этой PS5.", +"minion_ampr_emu_note": "Чтобы конвертация на PS5 сохраняла эмулятор AMPR при распаковке пакетов ресурсов, на консоли нужен ampr_emu. Приложение устанавливает его только по вашей просьбе.", +"minion_ampr_emu_put": "Установить эмулятор AMPR на эту PS5", +"minion_ampr_emu_done": "ampr_emu {version} установлен на этой PS5.", "remove_ps5u_console_busy": "PS5 занята задачей, запущенной PS5Upload. Дождитесь её завершения и попробуйте снова.", "remove_ps5u_console_converting": "Конвертация обрабатывает игру на PS5. Дождитесь завершения и попробуйте снова.", "remove_ps5u_console_extracting": "PS5 распаковывает архив. Дождитесь завершения и попробуйте снова.", diff --git a/client/src/i18n/locales/th.ts b/client/src/i18n/locales/th.ts index 4b66533a1..26983ccf3 100644 --- a/client/src/i18n/locales/th.ts +++ b/client/src/i18n/locales/th.ts @@ -868,7 +868,7 @@ home_low_space_body: "ล้างข้อมูลจะหาอัปเด "cw_convert_unpack_note": "เกมนี้อยู่ในแพ็กแอสเซ็ต {kind} หากเปิด แพ็กเกจจะเก็บทุกไฟล์เป็นไฟล์ธรรมดาและไม่รวมแพ็ก จึงมีขนาดราวเท่ากับเกมก่อนแพ็ก ({size}) หากปิด แพ็กจะถูกใส่ไปตามเดิม และมีเพียงอีมูเลเตอร์เท่านั้นที่อ่านได้", "cw_convert_leave_out_emu": "ไม่ใส่อีมูเลเตอร์ AMPR", "cw_convert_leave_out_emu_note": "แพ็กเกจจะไม่มี fakelib/libSceAmpr.sprx และเกมจะอ่านไฟล์ผ่านไลบรารีระบบของ PS5 เอง ลองแล้วกับเกมเดียวบนเฟิร์มแวร์ 5.10 เท่านั้น หากเกมไม่เริ่ม ให้สร้างแพ็กเกจใหม่โดยปิดตัวเลือกนี้", -"cw_convert_unpack_needs_emulator": "เกมนี้อ่านไฟล์ผ่าน AMPR และไม่มีอีมูเลเตอร์ที่ใช้กับไฟล์ธรรมดาได้ PS5 ดาวน์โหลดอีมูเลเตอร์ไม่ได้ ให้เปิด “ไม่ใส่อีมูเลเตอร์ AMPR” หรือสร้างแพ็กเกจนี้ด้วย PS5Upload บนคอมพิวเตอร์ของคุณ", +"cw_convert_unpack_needs_emulator_v2": "เกมนี้อ่านไฟล์ผ่าน AMPR และไม่มีอีมูเลเตอร์ที่ใช้กับไฟล์ธรรมดาได้ ใส่อีมูเลเตอร์ AMPR ลงใน PS5 เครื่องนี้จากแอป (การตั้งค่า › PS5 เครื่องนี้) หรือเปิด \"ไม่ใส่อีมูเลเตอร์ AMPR\"", "cw_convert_err_not_packed": "เกมนี้ไม่ได้อยู่ในแพ็กแอสเซ็ต จึงไม่มีอะไรให้แยก ปิด “แยกแพ็กแอสเซ็ต”", "cw_convert_reading": "กำลังอ่านเกม…", "cw_convert_running": "กำลังแปลง {name}…", @@ -6658,6 +6658,9 @@ library_compressed_hint: "อิมเมจที่บีบอัดต้อ "minion_zstd_runtime_note": "การแปลงบน PS5 ต้องมีรันไทม์ zstd (ampr-emu-ng) บนเครื่องเพื่อเขียนแพ็ก zstd แอปจะใส่ให้เองเมื่อ PS5 เครื่องนี้เชื่อมต่อ", "minion_zstd_runtime_put": "ใส่รันไทม์ zstd ลงใน PS5 เครื่องนี้", "minion_zstd_runtime_done": "ampr-emu-ng {version} อยู่บน PS5 เครื่องนี้แล้ว", +"minion_ampr_emu_note": "หากต้องการเก็บอีมูเลเตอร์ AMPR ไว้เมื่อการแปลงบน PS5 แยกแพ็กแอสเซ็ต เครื่องต้องมี ampr_emu แอปจะใส่ให้เฉพาะเมื่อคุณขอเท่านั้น", +"minion_ampr_emu_put": "ใส่อีมูเลเตอร์ AMPR ลงใน PS5 เครื่องนี้", +"minion_ampr_emu_done": "ampr_emu {version} อยู่บน PS5 เครื่องนี้แล้ว", "remove_ps5u_console_busy": "PS5 กำลังทำงานบางอย่างที่ PS5Upload เริ่มไว้ รอให้เสร็จก่อน แล้วลองอีกครั้ง", "remove_ps5u_console_converting": "การแปลงกำลังทำงานกับเกมบน PS5 รอให้เสร็จก่อน แล้วลองอีกครั้ง", "remove_ps5u_console_extracting": "PS5 กำลังแตกไฟล์บีบอัด รอให้เสร็จก่อน แล้วลองอีกครั้ง", diff --git a/client/src/i18n/locales/tr.ts b/client/src/i18n/locales/tr.ts index 27c69a855..17d32a036 100644 --- a/client/src/i18n/locales/tr.ts +++ b/client/src/i18n/locales/tr.ts @@ -868,7 +868,7 @@ home_low_space_body: "Temizlik; güncellemeleri, kalan paketleri ve hiç oynanma "cw_convert_unpack_note": "Bu oyun {kind} varlık paketlerinde. Açıksa paket her dosyayı düz dosya olarak içerir ve varlık paketlerini dışarıda bırakır; böylece boyutu oyunun paketlenmeden önceki haline yakındır ({size}). Kapalıysa varlık paketleri olduğu gibi girer ve onları yalnızca öykünücü okuyabilir.", "cw_convert_leave_out_emu": "AMPR öykünücüsünü dahil etme", "cw_convert_leave_out_emu_note": "Paket o zaman fakelib/libSceAmpr.sprx içermez ve oyun dosyalarını PS5'in kendi sistem kütüphanesiyle okur. Bu yalnızca tek bir oyunla, 5.10 yazılımında denendi. Oyun başlamazsa paketi bu seçenek kapalıyken yeniden oluşturun.", -"cw_convert_unpack_needs_emulator": "Bu oyun dosyalarını AMPR üzerinden okuyor ve düz dosyalarla çalışan bir öykünücüsü yok. PS5 bir tane indiremez. “AMPR öykünücüsünü dahil etme” seçeneğini açın ya da bu paketi bilgisayarınızda PS5Upload ile oluşturun.", +"cw_convert_unpack_needs_emulator_v2": "Bu oyun dosyalarını AMPR üzerinden okuyor ve düz dosyalarla çalışan bir öykünücüsü yok. AMPR öykünücüsünü uygulamadan bu PS5'e koy (Ayarlar › Bu PS5) ya da AMPR öykünücüsünü dahil etme seçeneğini aç.", "cw_convert_err_not_packed": "Bu oyun varlık paketlerinde değil, bu yüzden açılacak bir şey yok. “Varlık paketlerini aç” seçeneğini kapatın.", "cw_convert_reading": "Oyun okunuyor…", "cw_convert_running": "{name} dönüştürülüyor…", @@ -6658,6 +6658,9 @@ library_compressed_hint: "Sıkıştırılmış kalıpları oynatmak için Shadow "minion_zstd_runtime_note": "PS5'te dönüştürmenin zstd paketleri yazabilmesi için konsolda zstd çalışma zamanı (ampr-emu-ng) gerekir. Uygulama, bu PS5 bağlandığında onu kendiliğinden oraya koyar.", "minion_zstd_runtime_put": "zstd çalışma zamanını bu PS5'e koy", "minion_zstd_runtime_done": "ampr-emu-ng {version} bu PS5'te.", +"minion_ampr_emu_note": "PS5'te dönüştürme varlık paketlerini açarken bir AMPR öykünücüsünü tutabilsin diye konsolda ampr_emu gerekir. Uygulama onu yalnızca sen istediğinde oraya koyar.", +"minion_ampr_emu_put": "AMPR öykünücüsünü bu PS5'e koy", +"minion_ampr_emu_done": "ampr_emu {version} bu PS5'te.", "remove_ps5u_console_busy": "PS5, PS5Upload'ın başlattığı bir işle meşgul. Bitmesini bekle, sonra tekrar dene.", "remove_ps5u_console_converting": "Dönüştür, PS5'te bir oyun üzerinde çalışıyor. Bitmesini bekle, sonra tekrar dene.", "remove_ps5u_console_extracting": "PS5 bir arşivi çıkarıyor. Bitmesini bekle, sonra tekrar dene.", diff --git a/client/src/i18n/locales/vi.ts b/client/src/i18n/locales/vi.ts index 232660f1d..1d290f849 100644 --- a/client/src/i18n/locales/vi.ts +++ b/client/src/i18n/locales/vi.ts @@ -870,7 +870,7 @@ home_low_space_body: "Dọn dẹp tìm các bản cập nhật, gói còn sót v "cw_convert_unpack_note": "Game này ở dạng gói tài nguyên {kind}. Khi bật, gói .pkg chứa mọi tệp dưới dạng tệp thường và bỏ các gói tài nguyên đi, nên nó lớn xấp xỉ game trước khi đóng gói ({size}). Khi tắt, các gói tài nguyên được đưa vào nguyên trạng và chỉ trình giả lập đọc được chúng.", "cw_convert_leave_out_emu": "Bỏ trình giả lập AMPR", "cw_convert_leave_out_emu_note": "Khi đó gói không có fakelib/libSceAmpr.sprx, và game đọc tệp qua thư viện hệ thống của chính PS5. Điều này mới được thử với một game, trên firmware 5.10. Nếu game không khởi động, hãy tạo lại gói với tùy chọn này tắt.", -"cw_convert_unpack_needs_emulator": "Game này đọc tệp qua AMPR và không có trình giả lập nào chạy được với tệp thường. PS5 không tải về được. Hãy bật “Bỏ trình giả lập AMPR”, hoặc tạo gói này bằng PS5Upload trên máy tính.", +"cw_convert_unpack_needs_emulator_v2": "Trò chơi này đọc tệp qua AMPR và không có trình giả lập nào chạy được với tệp thường. Hãy đặt trình giả lập AMPR vào PS5 này từ ứng dụng (Cài đặt › PS5 này), hoặc bật Bỏ trình giả lập AMPR.", "cw_convert_err_not_packed": "Game này không ở dạng gói tài nguyên nên không có gì để giải nén. Hãy tắt “Giải nén gói tài nguyên”.", "cw_convert_reading": "Đang đọc game…", "cw_convert_running": "Đang chuyển đổi {name}…", @@ -6653,6 +6653,9 @@ library_compressed_hint: "Ảnh đĩa nén cần ShadowMount+ để chơi. Để "minion_zstd_runtime_note": "Chuyển đổi trên PS5 cần runtime zstd (ampr-emu-ng) trên máy để ghi gói zstd. Ứng dụng sẽ tự đặt nó vào khi PS5 này kết nối.", "minion_zstd_runtime_put": "Đặt runtime zstd vào PS5 này", "minion_zstd_runtime_done": "PS5 này đã có ampr-emu-ng {version}.", +"minion_ampr_emu_note": "Để giữ trình giả lập AMPR khi Chuyển đổi trên PS5 giải nén gói tài nguyên, máy cần có ampr_emu. Ứng dụng chỉ đặt nó vào khi bạn yêu cầu.", +"minion_ampr_emu_put": "Đặt trình giả lập AMPR vào PS5 này", +"minion_ampr_emu_done": "PS5 này đã có ampr_emu {version}.", "remove_ps5u_console_busy": "PS5 đang bận với một việc do PS5Upload bắt đầu. Hãy đợi xong rồi thử lại.", "remove_ps5u_console_converting": "Chuyển đổi đang xử lý một game trên PS5. Hãy đợi xong rồi thử lại.", "remove_ps5u_console_extracting": "PS5 đang giải nén một tệp nén. Hãy đợi xong rồi thử lại.", diff --git a/client/src/i18n/locales/zh-CN.ts b/client/src/i18n/locales/zh-CN.ts index 5dbd884aa..c5c6c3d2e 100644 --- a/client/src/i18n/locales/zh-CN.ts +++ b/client/src/i18n/locales/zh-CN.ts @@ -875,7 +875,7 @@ home_low_space_body: "清理会找出可以删除的更新、残留软件包和 "cw_convert_unpack_note": "此游戏使用 {kind} 资源包。开启后,封包中的每个文件都是普通文件,不包含资源包,因此大小与打包前的游戏差不多({size})。关闭时,资源包按原样放入,只有模拟器能读取它们。", "cw_convert_leave_out_emu": "不包含 AMPR 模拟器", "cw_convert_leave_out_emu_note": "这样封包中就没有 fakelib/libSceAmpr.sprx,游戏通过 PS5 自身的系统库读取文件。目前只在固件 5.10 上用一款游戏试过。如果游戏无法启动,请关闭此项后重新制作封包。", -"cw_convert_unpack_needs_emulator": "此游戏通过 AMPR 读取文件,但其中没有能配合普通文件使用的模拟器。PS5 无法下载。请开启“不包含 AMPR 模拟器”,或在电脑上用 PS5Upload 制作此封包。", +"cw_convert_unpack_needs_emulator_v2": "这个游戏通过 AMPR 读取文件,但没有能用于普通文件的模拟器。请在应用里把 AMPR 模拟器放到这台 PS5 上(设置 › 这台 PS5),或打开“不包含 AMPR 模拟器”。", "cw_convert_err_not_packed": "此游戏没有使用资源包,没有可解开的内容。请关闭“解开资源包”。", "cw_convert_reading": "正在读取游戏…", "cw_convert_running": "正在转换 {name}…", @@ -6610,6 +6610,9 @@ library_compressed_hint: "压缩镜像需要 ShadowMount+ 才能游玩。如需 "minion_zstd_runtime_note": "在 PS5 上转换时要写出 zstd 包,主机上需要有 zstd 运行时(ampr-emu-ng)。这台 PS5 连接时,应用会自动放上去。", "minion_zstd_runtime_put": "把 zstd 运行时放到这台 PS5 上", "minion_zstd_runtime_done": "这台 PS5 上已有 ampr-emu-ng {version}。", +"minion_ampr_emu_note": "在 PS5 上转换并解开资源包时,要保留 AMPR 模拟器,主机上需要有 ampr_emu。只有在你要求时,应用才会放上去。", +"minion_ampr_emu_put": "把 AMPR 模拟器放到这台 PS5 上", +"minion_ampr_emu_done": "这台 PS5 上已有 ampr_emu {version}。", "remove_ps5u_console_busy": "PS5 正在处理 PS5Upload 启动的任务。请等它完成后再试。", "remove_ps5u_console_converting": "“转换”正在 PS5 上处理一个游戏。请等它完成后再试。", "remove_ps5u_console_extracting": "PS5 正在解压一个压缩包。请等它完成后再试。", diff --git a/client/src/i18n/locales/zh-TW.ts b/client/src/i18n/locales/zh-TW.ts index 95140187d..35b061f30 100644 --- a/client/src/i18n/locales/zh-TW.ts +++ b/client/src/i18n/locales/zh-TW.ts @@ -869,7 +869,7 @@ home_low_space_body: "清理會找出可以刪除的更新、殘留套件和從 "cw_convert_unpack_note": "此遊戲使用 {kind} 資源包。開啟後,封包中的每個檔案都是一般檔案,不包含資源包,因此大小與打包前的遊戲差不多({size})。關閉時,資源包按原樣放入,只有模擬器能讀取它們。", "cw_convert_leave_out_emu": "不包含 AMPR 模擬器", "cw_convert_leave_out_emu_note": "這樣封包中就沒有 fakelib/libSceAmpr.sprx,遊戲會透過 PS5 本身的系統程式庫讀取檔案。目前只在韌體 5.10 上用一款遊戲試過。如果遊戲無法啟動,請關閉此選項後重新製作封包。", -"cw_convert_unpack_needs_emulator": "此遊戲透過 AMPR 讀取檔案,但其中沒有能搭配一般檔案使用的模擬器。PS5 無法下載。請開啟「不包含 AMPR 模擬器」,或在電腦上用 PS5Upload 製作此封包。", +"cw_convert_unpack_needs_emulator_v2": "這個遊戲透過 AMPR 讀取檔案,但沒有能用於一般檔案的模擬器。請在應用程式裡把 AMPR 模擬器放到這台 PS5 上(設定 › 這台 PS5),或開啟「不包含 AMPR 模擬器」。", "cw_convert_err_not_packed": "此遊戲沒有使用資源包,沒有可解開的內容。請關閉「解開資源包」。", "cw_convert_reading": "正在讀取遊戲…", "cw_convert_running": "正在轉換 {name}…", @@ -6604,6 +6604,9 @@ library_compressed_hint: "壓縮映像需要 ShadowMount+ 才能遊玩。如需 "minion_zstd_runtime_note": "在 PS5 上轉換時要寫出 zstd 包,主機上需要有 zstd 執行環境(ampr-emu-ng)。這台 PS5 連線時,應用程式會自動放上去。", "minion_zstd_runtime_put": "把 zstd 執行環境放到這台 PS5 上", "minion_zstd_runtime_done": "這台 PS5 上已有 ampr-emu-ng {version}。", +"minion_ampr_emu_note": "在 PS5 上轉換並解開資源包時,要保留 AMPR 模擬器,主機上需要有 ampr_emu。只有在你要求時,應用程式才會放上去。", +"minion_ampr_emu_put": "把 AMPR 模擬器放到這台 PS5 上", +"minion_ampr_emu_done": "這台 PS5 上已有 ampr_emu {version}。", "remove_ps5u_console_busy": "PS5 正在處理 PS5Upload 啟動的工作。請等它完成後再試。", "remove_ps5u_console_converting": "「轉換」正在 PS5 上處理一個遊戲。請等它完成後再試。", "remove_ps5u_console_extracting": "PS5 正在解壓縮一個壓縮檔。請等它完成後再試。", diff --git a/client/src/screens/Settings/MinionSettings.test.tsx b/client/src/screens/Settings/MinionSettings.test.tsx index 998788e8f..b24056f08 100644 --- a/client/src/screens/Settings/MinionSettings.test.tsx +++ b/client/src/screens/Settings/MinionSettings.test.tsx @@ -7,7 +7,7 @@ vi.mock("../../state/lang", async (orig) => ({ useTr: () => (key: string, _vars?: unknown, fallback?: string) => fallback ?? key, })); -const { MinionView, minionStatus, minionUrl } = await import("./MinionSettings"); +const { MinionView, RuntimePutView, amprEmuPutText, minionStatus, minionUrl } = await import("./MinionSettings"); const { Toggle } = await import("../../components"); const tr = (key: string, _vars?: unknown, fallback?: string) => fallback ?? key; @@ -143,6 +143,32 @@ describe("Settings → Minion", () => { expect(onRemove).toHaveBeenCalled(); }); + it("offers the AMPR emulator for Convert on the PS5 as a button of its own, and says how it went", () => { + const text = amprEmuPutText(tr); + expect(text.label).toBe("Put the AMPR emulator on this PS5"); + expect(text.note).toContain("only when you ask"); + expect(text.doneText("0.4.2.1")).toBe("ampr_emu {version} is on this PS5."); + const onPut = vi.fn(); + const view = RuntimePutView({ ...text, busy: false, done: null, error: null, onPut }); + const html = renderToStaticMarkup(view); + expect(html).toContain("Put the AMPR emulator on this PS5"); + expect(html).toContain('data-runtime-put="ampr-emu"'); + expect(html).not.toContain('role="status"'); + expect(html).not.toContain('role="alert"'); + const button = elements(view).find((e) => typeof e.props.onClick === "function"); + (button?.props.onClick as () => void)(); + expect(onPut).toHaveBeenCalledTimes(1); + + const done = renderToStaticMarkup( + RuntimePutView({ ...text, busy: false, done: "ampr_emu 0.4.2.1 is on this PS5.", error: null, onPut }), + ); + expect(done).toContain('role="status"'); + expect(done).toContain("ampr_emu 0.4.2.1 is on this PS5."); + const failed = RuntimePutView({ ...text, busy: true, done: null, error: "offline", onPut }); + expect(renderToStaticMarkup(failed)).toContain('role="alert"'); + expect(elements(failed).find((e) => typeof e.props.onClick === "function")?.props.disabled).toBe(true); + }); + it("builds the network address, IPv6 in brackets", () => { expect(minionUrl("10.0.0.2:9113")).toBe("http://10.0.0.2:9180/"); expect(minionUrl("[fe80::1]:9113", 9181)).toBe("http://[fe80::1]:9181/"); diff --git a/client/src/screens/Settings/MinionSettings.tsx b/client/src/screens/Settings/MinionSettings.tsx index b934014a9..0fed47d1a 100644 --- a/client/src/screens/Settings/MinionSettings.tsx +++ b/client/src/screens/Settings/MinionSettings.tsx @@ -4,6 +4,7 @@ import { Button, Toggle } from "../../components"; import { useConfirm } from "../../components/ConfirmDialog"; import { minionSet, + putAmprEmu, putZstdRuntime, type MinionChange, type MinionTileState, @@ -400,6 +401,7 @@ function MinionTileControl({ host, up }: { host: string; up: boolean }) { /> {dialog} {up && state?.supported && } + {up && state?.supported && } {error && (

@@ -421,20 +423,58 @@ function MinionTileControl({ host, up }: { host: string; up: boolean }) { ); } -/** Convert on the PS5 needs the zstd runtime on the console for zstd packs, and the console - * downloads nothing: the app puts it there on its own when the console connects; this button - * does it now. */ -function ZstdRuntimePut({ host }: { host: string }) { - const tr = useTr(); +/** What a "Put … on this PS5" button shows: what it is for, the button, and how it went. */ +export function RuntimePutView(p: { + note: string; + label: string; + action: string; + busy: boolean; + /** What is on the console now, in words; null before a put. */ + done: string | null; + error: string | null; + onPut: () => void; +}) { + return ( +

+

{p.note}

+ + {p.done && ( +

+ {p.done} +

+ )} + {p.error && ( +

+ {p.error} +

+ )} +
+ ); +} + +/** One "Put … on this PS5" button: `put` copies it there and answers the version now there. */ +function RuntimePut({ + put, + doneText, + ...view +}: { + note: string; + label: string; + action: string; + doneText: (version: string) => string; + put: () => Promise<{ version: string }>; +}) { const [busy, setBusy] = useState(false); const [done, setDone] = useState(null); const [error, setError] = useState(null); - const put = async () => { + const run = async () => { setBusy(true); setError(null); setDone(null); try { - setDone((await putZstdRuntime(host)).version); + setDone((await put()).version); } catch (e) { setError(humanizeCaught(e)); } finally { @@ -442,31 +482,57 @@ function ZstdRuntimePut({ host }: { host: string }) { } }; return ( -
-

- {tr( - "minion_zstd_runtime_note", - undefined, - "Convert on the PS5 needs the zstd runtime (ampr-emu-ng) on the console to write zstd packs. The app puts it there on its own when this PS5 connects.", - )} -

- - {done && ( -

- {tr( - "minion_zstd_runtime_done", - { version: done }, - "ampr-emu-ng {version} is on this PS5.", - )} -

- )} - {error && ( -

- {error} -

+ void run()} + /> + ); +} + +/** Convert on the PS5 needs the zstd runtime on the console for zstd packs, and the console + * downloads nothing: the app puts it there on its own when the console connects; this button + * does it now. */ +function ZstdRuntimePut({ host }: { host: string }) { + const tr = useTr(); + return ( + + label={tr("minion_zstd_runtime_put", undefined, "Put the zstd runtime on this PS5")} + action="zstd-runtime" + doneText={(version) => + tr("minion_zstd_runtime_done", { version }, "ampr-emu-ng {version} is on this PS5.") + } + put={() => putZstdRuntime(host)} + /> ); } + +/** The words of the AMPR emulator's button (Convert on the PS5 keeps an AMPR emulator in a + * package of unpacked asset packs only with ampr_emu on the console). */ +export function amprEmuPutText(tr: Tr) { + return { + note: tr( + "minion_ampr_emu_note", + undefined, + "To keep an AMPR emulator when Convert on the PS5 unpacks asset packs, the console needs ampr_emu. The app puts it there only when you ask.", + ), + label: tr("minion_ampr_emu_put", undefined, "Put the AMPR emulator on this PS5"), + action: "ampr-emu", + doneText: (version: string) => + tr("minion_ampr_emu_done", { version }, "ampr_emu {version} is on this PS5."), + }; +} + +/** ampr_emu for Convert on the PS5. Never put there on its own (the owner's choice): only this + * button does it, with the same release the app puts into games. */ +function AmprEmuPut({ host }: { host: string }) { + const tr = useTr(); + return putAmprEmu(host)} />; +} diff --git a/engine/crates/ps5upload-convert-core/src/unpack_packs.rs b/engine/crates/ps5upload-convert-core/src/unpack_packs.rs index 055a05244..1cf4f72fd 100644 --- a/engine/crates/ps5upload-convert-core/src/unpack_packs.rs +++ b/engine/crates/ps5upload-convert-core/src/unpack_packs.rs @@ -21,8 +21,10 @@ //! default. //! //! The engine fetches the emulator that takes the place of one that has to go. The converter on -//! the PS5 fetches nothing, so it has a third way ([`open_with_own_emulator`]): the game's own -//! emulator stays when the rule above keeps it, and the unpack is refused +//! the PS5 fetches nothing: when the user had the app put ampr_emu on the console +//! ([`console_ampr_emu`]) it unpacks exactly as the engine does with that file +//! ([`open_with_console_emulator`]); otherwise it has a third way ([`open_with_own_emulator`]): +//! the game's own emulator stays when the rule above keeps it, and the unpack is refused //! ([`NEEDS_OTHER_EMULATOR`]) when the rule would have put another in, so plain files never end //! up beside an emulator the rule does not keep there. [`assess`] says which it will be before //! anything is built. @@ -200,6 +202,101 @@ pub fn open_with_own_emulator( unpack(tree, EmulatorChoice::Own, mtime) } +/// The folder, in the converter's job folder (`/data/ps5upload/convert` on the PS5), that holds +/// the emulators the desktop app puts on the console: ampr-emu-ng for zstd packs, and, when the +/// user asks for it, ampr_emu for unpacked asset packs ([`console_ampr_emu_folder`]). +pub const CONSOLE_RUNTIME_FOLDER: &str = "runtime"; +/// The emulator's file in its folder there. +pub const CONSOLE_EMULATOR_FILE: &str = "libSceAmpr.sprx"; +/// The largest file there read as an emulator (ampr_emu is about 1 MiB). +const CONSOLE_EMULATOR_MAX: u64 = 16 << 20; + +/// ampr_emu `version`'s folder in [`CONSOLE_RUNTIME_FOLDER`]: its name is the version marker the +/// converter checks the file's own version against. +pub fn console_ampr_emu_folder(version: &str) -> String { + format!("ampr_emu-{version}") +} + +/// The ampr_emu the app put on the console, as the converter there finds it. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ConsoleEmulator { + pub version: String, + pub bytes: Vec, +} + +/// The newest usable ampr_emu in `runtime_dir` ([`CONSOLE_RUNTIME_FOLDER`]): a +/// `ampr_emu-/libSceAmpr.sprx` whose module says it is ampr_emu of that same version, +/// as new as [`RUNTIME_VERSION`] or newer. None when there is none (nothing was put there, or +/// what is there is damaged or another build). +pub fn console_ampr_emu(runtime_dir: &std::path::Path) -> Option { + let mut best: Option = None; + for entry in std::fs::read_dir(runtime_dir).ok()?.flatten() { + let name = entry.file_name(); + let Some(version) = name + .to_str() + .and_then(|n| n.strip_prefix("ampr_emu-")) + .filter(|v| { + !v.is_empty() + && v.bytes() + .all(|b| b.is_ascii_alphanumeric() || matches!(b, b'.' | b'-' | b'_')) + }) + else { + continue; + }; + if ng::older(version, RUNTIME_VERSION) + || best + .as_ref() + .is_some_and(|b| !ng::older(&b.version, version)) + { + continue; + } + let file = entry.path().join(CONSOLE_EMULATOR_FILE); + let size = std::fs::metadata(&file).map_or(0, |m| m.len()); + if size == 0 || size > CONSOLE_EMULATOR_MAX { + continue; + } + let Ok(bytes) = std::fs::read(&file) else { + continue; + }; + match ng::classify(&bytes) { + ("ampr_emu", Some(v), _) if v == version => { + best = Some(ConsoleEmulator { + version: version.to_string(), + bytes, + }); + } + (kind, v, _) => crate::log_at!( + Warn, + "convert", + "{} is {kind} {}, not ampr_emu {version}: not used", + file.display(), + v.unwrap_or_default() + ), + } + } + best +} + +/// `tree` with its asset packs decoded as the desktop app decodes them with "Add the AMPR +/// emulator" on and ampr_emu chosen: [`open`] with `emulator` (ampr_emu from the console's own +/// disk, [`console_ampr_emu`]) as the one that goes in where the game's own has to go. For the +/// converter on the PS5; the package it writes holds the same files as the desktop app's. +pub fn open_with_console_emulator( + tree: Box, + emulator: &[u8], + mtime: i64, +) -> Result, String> { + let fetch = || Ok(emulator.to_vec()); + open( + tree, + Some(&Emulator { + ng: false, + fetch: &fetch, + }), + mtime, + ) +} + /// What an unpack of a game would be, read from its pack indexes, its eboot's imports and its /// emulator: never the packed data. #[derive(Debug, Clone, Copy, PartialEq, Eq)] @@ -324,8 +421,9 @@ fn unpack( }; return Err(format!( "{NEEDS_OTHER_EMULATOR}: the game reads its files through AMPR and {has}, where \ - ampr_emu {RUNTIME_VERSION} or newer is needed, and none can be fetched here. Leave \ - the AMPR emulator out, or make the package with PS5Upload on a computer" + ampr_emu {RUNTIME_VERSION} or newer is needed, and none is on this PS5. Put the AMPR \ + emulator on this PS5 from the app, leave it out, or make the package with PS5Upload \ + on a computer" )); } let mut generated: HashMap> = HashMap::new(); @@ -653,6 +751,88 @@ mod tests { } } + /// What the app put on the console: only an ampr_emu whose module says the version its + /// folder is named after, new enough for plain files, is used; the newest of them. + #[test] + fn the_console_emulator_is_the_newest_usable_ampr_emu_in_the_runtime_folder() { + let scratch = Scratch::new("console-emu"); + let dir = scratch.0.join(CONSOLE_RUNTIME_FOLDER); + assert_eq!(console_ampr_emu(&dir), None, "no folder"); + std::fs::create_dir_all(&dir).unwrap(); + assert_eq!(console_ampr_emu(&dir), None, "an empty folder"); + let put = |folder: &str, bytes: &[u8]| { + std::fs::create_dir_all(dir.join(folder)).unwrap(); + std::fs::write(dir.join(folder).join(CONSOLE_EMULATOR_FILE), bytes).unwrap(); + }; + // The zstd runtime beside it, an old ampr_emu, one whose module names another + // version, another build under ampr_emu's name, an empty file: none of them. + put("ampr-emu-ng-0.4.1", b"NG EMULATOR"); + put(&console_ampr_emu_folder("0.3.9"), &r_emu("0.3.9")); + put(&console_ampr_emu_folder("0.5"), &r_emu("0.4.9")); + put(&console_ampr_emu_folder("0.6"), b"NG EMULATOR"); + put(&console_ampr_emu_folder("0.7"), b""); + std::fs::create_dir_all(dir.join(console_ampr_emu_folder("0.8"))).unwrap(); + assert_eq!(console_ampr_emu(&dir), None); + + let current = ampr_emu(RUNTIME_VERSION); + put(&console_ampr_emu_folder(RUNTIME_VERSION), ¤t); + assert_eq!( + console_ampr_emu(&dir), + Some(ConsoleEmulator { + version: RUNTIME_VERSION.into(), + bytes: current.clone() + }) + ); + let newer = ampr_emu("0.4.3"); + put(&console_ampr_emu_folder("0.4.3"), &newer); + assert_eq!(console_ampr_emu(&dir).unwrap().bytes, newer); + assert_eq!(console_ampr_emu_folder("0.4.3"), "ampr_emu-0.4.3"); + } + + /// With ampr_emu on the console, every packed game unpacks exactly as the engine unpacks it + /// with the same ampr_emu fetched: the same files, the same bytes, the same index. + #[test] + fn the_console_emulator_unpacks_as_the_engine_does() { + let new = ampr_emu(RUNTIME_VERSION); + let old = ampr_emu("0.3.9"); + let ng: &[u8] = b"NG EMULATOR"; + for (name, ampr, emulator) in [ + ("c-ampr-ng", true, Some(ng)), + ("c-ampr-old", true, Some(&old[..])), + ("c-ampr-none", true, None), + ("c-ampr-new", true, Some(&new[..])), + ("c-plain-ng", false, Some(ng)), + ] { + let scratch = Scratch::new(name); + let src = game(&scratch.0, ampr); + let packed = scratch.0.join("packed"); + zstd_packed(&src, &packed, emulator); + let mut console = open_with_console_emulator(folder(&packed), &new, 7).unwrap(); + let fetch = || Ok(new.clone()); + let engine = Emulator { + ng: false, + fetch: &fetch, + }; + let mut desktop = open(folder(&packed), Some(&engine), 7).unwrap(); + assert_eq!(console.files(), desktop.files(), "{name}"); + for f in desktop.files().to_vec() { + assert_eq!( + console.read(&f.path).unwrap(), + desktop.read(&f.path).unwrap(), + "{name}: {}", + f.path + ); + } + if ampr { + assert_eq!( + console.read("fakelib/libSceAmpr.sprx").unwrap(), + new, + "{name}: ampr_emu goes in" + ); + } + } + } + #[test] fn a_game_that_is_not_in_packs_has_nothing_to_assess() { let scratch = Scratch::new("plain"); diff --git a/engine/crates/ps5upload-convert/src/job.rs b/engine/crates/ps5upload-convert/src/job.rs index c817df625..994223fcc 100644 --- a/engine/crates/ps5upload-convert/src/job.rs +++ b/engine/crates/ps5upload-convert/src/job.rs @@ -15,6 +15,11 @@ //! [`PKG_LEVELS`], `fast` when absent), and for a game in LZ4 or zstd asset packs //! `"unpack_packs"` (bool: the package holds the plain files again) with //! `"leave_out_ampr_emu"` (bool: no `libSceAmpr.sprx` in it); see [`Unpack`]. +//! - `runtime/`: the emulators the desktop app put on the console, never written here: +//! `ampr-emu-ng-/libSceAmpr.sprx` (the helper names it in `"zstd_runtime"`) and, when +//! the user asked the app for it, `ampr_emu-/libSceAmpr.sprx`, which an unpacked +//! `.pkg` gets where the game's own emulator has to go (`unpack_packs::console_ampr_emu`). An +//! inspection of a packed game then says its version in `"ampr_emu"`. //! - `status.json`: rewritten here through a temporary file and a rename in the same folder, so //! the helper never reads half of one; at most every [`STATUS_EVERY`] while a job runs. //! `{"id", "pid", "op", "state": "running"|"done"|"failed", "stage"?, "bytes_done"?, @@ -100,31 +105,43 @@ struct Request { /// refused (`convert_unpack_needs_emulator`) when it is not one that suits plain files. #[serde(default)] leave_out_ampr_emu: bool, + /// The job folder's `runtime/` ([`unpack_packs::CONSOLE_RUNTIME_FOLDER`]), where the app puts + /// ampr_emu: set from the folder the request is read in, never from the request. + #[serde(skip)] + runtime: PathBuf, } /// How a `.pkg` unpacks a game's asset packs (`ps5upload_convert_core::unpack_packs`, the code /// the engine's "Unpack the asset packs" runs). On a computer an emulator that only suits packs -/// is replaced by one the engine fetches; nothing is fetched here, so the two ways are the ones -/// that need no other emulator. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +/// is replaced by one the engine fetches; nothing is fetched here: the replacement is the +/// ampr_emu the app put on the console, when the user had it put there, else the game's own +/// emulator has to suit plain files. +#[derive(Debug, Clone, PartialEq, Eq)] enum Unpack { + /// As the engine unpacks with "Add the AMPR emulator" on: this ampr_emu (from the console's + /// `runtime/`) goes in where the game's own has to go. + FromConsole(Arc>), /// The game's own emulator stays where the unpack rule keeps it (an ampr_emu as new as the /// one the app installs; anything in a game that does not read through libSceAmpr). A /// libSceAmpr game with ampr-emu-ng, an older ampr_emu, an unknown build or none is /// refused: `convert_unpack_needs_emulator`. - OwnEmulator, + KeepOwn, /// Every `libSceAmpr.sprx` in `fakelib` and `fakelib2` is left out. - NoEmulator, + LeaveOut, } impl Unpack { /// The source read as this unpack gives it, for the package builder and for the check /// before it. `mtime` goes on every record of the new `ampr_emu.index`, so the read-back /// that opens the source again gets the same bytes. - fn reader(self, mtime: i64) -> ps5upload_fpkg::build::SourceReader { - ps5upload_fpkg::build::SourceReader(Arc::new(move |tree| match self { - Unpack::OwnEmulator => unpack_packs::open_with_own_emulator(tree, mtime), - Unpack::NoEmulator => unpack_packs::open_without_emulator(tree, mtime), + fn reader(&self, mtime: i64) -> ps5upload_fpkg::build::SourceReader { + let how = self.clone(); + ps5upload_fpkg::build::SourceReader(Arc::new(move |tree| match &how { + Unpack::FromConsole(emulator) => { + unpack_packs::open_with_console_emulator(tree, emulator, mtime) + } + Unpack::KeepOwn => unpack_packs::open_with_own_emulator(tree, mtime), + Unpack::LeaveOut => unpack_packs::open_without_emulator(tree, mtime), })) } } @@ -181,7 +198,10 @@ fn read_request(dir: &Path) -> Result { return Err(format!("request.json is {size} bytes")); } let bytes = std::fs::read(&path).map_err(|e| format!("request.json: {e}"))?; - serde_json::from_slice(&bytes).map_err(|e| format!("request.json: {e}")) + let mut request: Request = + serde_json::from_slice(&bytes).map_err(|e| format!("request.json: {e}"))?; + request.runtime = dir.join(unpack_packs::CONSOLE_RUNTIME_FOLDER); + Ok(request) } /// `detail` cut to [`MAX_DETAIL_BYTES`] at a character boundary. @@ -417,9 +437,15 @@ fn plan(request: &Request, cancel: &Arc) -> Result { }); } let how = if request.leave_out_ampr_emu { - Unpack::NoEmulator + Unpack::LeaveOut + } else if let Some(e) = unpack_packs::console_ampr_emu(&request.runtime) { + crate::log(format_args!( + "ampr_emu {} on the console goes in where the game's own emulator has to go", + e.version + )); + Unpack::FromConsole(Arc::new(e.bytes)) } else { - Unpack::OwnEmulator + Unpack::KeepOwn }; Some((how, zstd_packs::now_secs())) } else { @@ -633,11 +659,11 @@ fn build( detail, })?; } - if let Some((how, mtime)) = plan.unpack { + if let Some((how, mtime)) = &plan.unpack { // The game as the package will hold it: refused here, before anything is written, when // its emulator can't stay or its packs don't decode; and its plain size is what the // drive has to hold, not the packs'. - tree = (how.reader(mtime).0)(tree).map_err(|e| unpack_refusal(&plan.source, e))?; + tree = (how.reader(*mtime).0)(tree).map_err(|e| unpack_refusal(&plan.source, e))?; } if tree.files().is_empty() { return Err(unreadable("no files in it".into())); @@ -873,13 +899,15 @@ fn build_pkg( request.kraken = true; request.level = level; // A packed game as plain files: decoded as the package is written, nothing spooled. - request.reader = plan.unpack.map(|(how, mtime)| how.reader(mtime)); + request.reader = plan.unpack.as_ref().map(|(how, mtime)| how.reader(*mtime)); crate::log(format_args!( ".pkg at Kraken level {level:?} on {} threads ({files} files{})", ps5upload_fpkg::workshop::workshop_threads(), match plan.unpack { - Some((Unpack::OwnEmulator, _)) => ", asset packs unpacked, the game's emulator kept", - Some((Unpack::NoEmulator, _)) => ", asset packs unpacked, the AMPR emulator left out", + Some((Unpack::FromConsole(_), _)) => + ", asset packs unpacked, the console's ampr_emu where the game's emulator has to go", + Some((Unpack::KeepOwn, _)) => ", asset packs unpacked, the game's emulator kept", + Some((Unpack::LeaveOut, _)) => ", asset packs unpacked, the AMPR emulator left out", None => "", } )); @@ -1023,7 +1051,17 @@ fn run_with(dir: &Path, hook: &mut dyn FnMut(&str)) -> std::io::Result { finished.store(true, Ordering::Relaxed); let _ = watcher.join(); match inspected.map(|(inspection, _)| inspection) { - Ok(inspection) => done(json!(inspection)), + Ok(mut inspection) => { + if inspection.unpacked_bytes.is_some() { + if let Some(e) = unpack_packs::console_ampr_emu(&request.runtime) { + // An unpacked .pkg keeps an emulator: this one goes in where the + // game's own has to go. + inspection.ampr_emu = Some(e.version); + inspection.unpack_keeps_emulator = Some(true); + } + } + done(json!(inspection)) + } Err(refusal) => fail(refusal), } } @@ -1909,6 +1947,104 @@ mod tests { assert_index_lists_the_package(&mut *pkg); } + /// The app put ampr_emu on the console (`runtime/ampr_emu-/libSceAmpr.sprx` in the + /// job folder): the inspection says so and that the emulator can stay, and a zstd-packed game + /// whose ampr-emu-ng only suits packs unpacks into a `.pkg` holding exactly what the desktop + /// app's package holds (its unpack with that ampr_emu fetched): every file byte for byte, + /// ampr_emu where the game's own was, and the same fresh `ampr_emu.index`. + #[test] + fn a_pkg_unpack_puts_in_the_ampr_emu_on_the_console_as_the_desktop_app_does() { + use ps5upload_fpkg::ampr_index; + let tmp = TempDir::new("jobunpackconsoleemu"); + let dir = tmp.0.join("convert"); + std::fs::create_dir_all(&dir).unwrap(); + let src = packable_game(&tmp.0, true); + let packed = tmp.0.join("packed"); + zstd_packed(&dir, &src, &packed, b"NG EMULATOR"); + let version = ps5upload_fpkg::ampr_pack::image::RUNTIME_VERSION; + let emu = ampr_emu(version); + let home = dir + .join(unpack_packs::CONSOLE_RUNTIME_FOLDER) + .join(unpack_packs::console_ampr_emu_folder(version)); + std::fs::create_dir_all(&home).unwrap(); + std::fs::write(home.join(unpack_packs::CONSOLE_EMULATOR_FILE), &emu).unwrap(); + + // The page's inspection: the emulator can stay, and which one goes in. + ask(&dir, json!({"id": "i", "op": "inspect", "path": packed})); + assert_eq!(run_with(&dir, &mut |_| {}).unwrap(), 0); + let s = status(&dir); + assert_eq!(s["result"]["unpack_keeps_emulator"], true, "{s}"); + assert_eq!(s["result"]["ampr_emu"], version, "{s}"); + // A game that is not packed is not told about it. + ask(&dir, json!({"id": "i", "op": "inspect", "path": src})); + assert_eq!(run_with(&dir, &mut |_| {}).unwrap(), 0); + assert!(status(&dir)["result"].get("ampr_emu").is_none()); + + let console = tmp.0.join("console.pkg"); + let (code, s) = pkg_job(&dir, &packed, &console, json!({"unpack_packs": true})); + assert_eq!(code, 0, "{s}"); + let mut pkg = packaged(&console); + assert_packaged_plain(&mut *pkg, &src); + assert_eq!(pkg.read("fakelib/libSceAmpr.sprx").unwrap(), emu); + assert_index_lists_the_package(&mut *pkg); + + // The desktop app's package of the same game: the engine's reader (`fpkg_api`'s + // `open_unpacked` with "Add the AMPR emulator" on and ampr_emu chosen), made at the time + // the console's index records carry. + let index = pkg.read(ampr_index::NAME).unwrap(); + let mtime = ampr_index::parse(&index).unwrap()[0].mtime; + let fetched = emu.clone(); + let out = tmp.0.join("desktop"); + std::fs::create_dir_all(&out).unwrap(); + let mut request = ps5upload_fpkg::build::BuildRequest::new(&packed, &out); + request.file_name = Some("desktop".into()); + request.content_id = crate::inspect(&packed).unwrap().content_id; + request.kraken = true; + // The package builder writes the index again with the package's own time. + request.time = Some((mtime, 0)); + request.reader = Some(ps5upload_fpkg::build::SourceReader(Arc::new(move |tree| { + let fetch = || Ok(fetched.clone()); + let emulator = unpack_packs::Emulator { + ng: false, + fetch: &fetch, + }; + unpack_packs::open(tree, Some(&emulator), mtime) + }))); + let report = ps5upload_fpkg::build::build(&request, &mut |_| {}).unwrap(); + let mut desktop = packaged(&report.path); + assert_eq!(names_of(&*pkg), names_of(&*desktop)); + for name in names_of(&*desktop) { + assert_eq!( + pkg.read(&name).unwrap(), + desktop.read(&name).unwrap(), + "{name}" + ); + } + + // Left out when asked, whatever is on the console. + let bare = tmp.0.join("bare.pkg"); + let (code, s) = pkg_job( + &dir, + &packed, + &bare, + json!({"unpack_packs": true, "leave_out_ampr_emu": true}), + ); + assert_eq!(code, 0, "{s}"); + assert!(!has_emulator(&names_of(&*packaged(&bare)))); + + // Another build under ampr_emu's name is not used: the refusal stays, and says how out. + std::fs::write( + home.join(unpack_packs::CONSOLE_EMULATOR_FILE), + b"NG EMULATOR", + ) + .unwrap(); + let refused = tmp.0.join("refused.pkg"); + let (code, s) = pkg_job(&dir, &packed, &refused, json!({"unpack_packs": true})); + assert_eq!(code, 1, "{s}"); + assert_eq!(s["cause"], "convert_unpack_needs_emulator", "{s}"); + assert!(!refused.exists()); + } + /// An older ampr_emu is one the rule replaces, as ampr-emu-ng is: refused, not kept. #[test] fn a_pkg_unpack_refuses_to_keep_an_old_emulator() { diff --git a/engine/crates/ps5upload-convert/src/lib.rs b/engine/crates/ps5upload-convert/src/lib.rs index c63d5e04c..74f0d97dd 100644 --- a/engine/crates/ps5upload-convert/src/lib.rs +++ b/engine/crates/ps5upload-convert/src/lib.rs @@ -63,11 +63,17 @@ pub struct Inspection { /// could not be read (a warning says why). #[serde(default)] pub unpacked_bytes: Option, - /// With `unpacked_bytes`: whether the game's own AMPR emulator can stay beside the plain - /// files (`ps5upload_convert_core::unpack_packs::assess`). False: an unpacked `.pkg` has to - /// leave the emulator out here, or be made on a computer. + /// With `unpacked_bytes`: whether an unpacked `.pkg` can keep an AMPR emulator: the game's + /// own can stay beside the plain files (`ps5upload_convert_core::unpack_packs::assess`), or + /// (a job's inspection) the app put ampr_emu on the console (`ampr_emu`). False: an unpacked + /// `.pkg` has to leave the emulator out here, or be made on a computer. #[serde(default)] pub unpack_keeps_emulator: Option, + /// With `unpacked_bytes`, from a job's inspection: the version of the ampr_emu the app put on + /// the console (`unpack_packs::console_ampr_emu`), which an unpacked `.pkg` gets where the + /// game's own emulator has to go. Absent when there is none. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ampr_emu: Option, pub has_eboot: bool, pub warnings: Vec, } @@ -249,6 +255,7 @@ pub fn inspect_keeping( packed: None, unpacked_bytes: None, unpack_keeps_emulator: None, + ampr_emu: None, has_eboot: has(tree.as_ref(), "eboot.bin"), // What the conversion leaves out of an archive (files beside its game folder). warnings: tree.notes(), diff --git a/engine/crates/ps5upload-engine/api/openapi.json b/engine/crates/ps5upload-engine/api/openapi.json index 8a77c46f1..69ceec6c7 100644 --- a/engine/crates/ps5upload-engine/api/openapi.json +++ b/engine/crates/ps5upload-engine/api/openapi.json @@ -33801,6 +33801,73 @@ } } }, + "/api/ps5/convert-ampr-emu": { + "post": { + "description": "POST /api/ps5/convert-ampr-emu {host} — put ampr_emu (the release the desktop app installs\ninto games, digest checked, from this computer's cache or downloaded) on the console under\n/data/ps5upload/convert/runtime/ampr_emu-/, so Convert on the PS5 can keep an\nemulator when it unpacks asset packs. Only on request, never on its own. Answers {version,\npath, written}; written is false when that version was already there. 502 when it could not\nbe downloaded or written; needs the helper up.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConvertRuntimeRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/engine.convert_runtime.Outcome" + } + } + }, + "description": "Success." + }, + "400": { + "$ref": "#/components/responses/Error", + "description": "Bad request" + }, + "403": { + "$ref": "#/components/responses/Error", + "description": "Refused by the engine's address, Origin or Host guards." + }, + "409": { + "$ref": "#/components/responses/Error", + "description": "Conflict" + }, + "500": { + "$ref": "#/components/responses/Error", + "description": "Engine error" + }, + "502": { + "$ref": "#/components/responses/Error", + "description": "The console or remote end failed" + }, + "default": { + "$ref": "#/components/responses/Error", + "description": "Any other failure, in the same shape." + } + }, + "tags": [ + "console-tools" + ], + "x-ps5upload": { + "access": "loopback", + "console": { + "aliases": [ + "console", + "addr" + ], + "in": "body", + "name": "host", + "required": true + }, + "response_schema": "struct" + } + } + }, "/api/ps5/convert-runtime": { "post": { "description": "POST /api/ps5/convert-runtime {host} — put the zstd runtime Convert on the PS5 needs (the\nampr-emu-ng release this app pins, digest checked) on the console, under\n/data/ps5upload/convert/runtime/. Answers {version, path, written}; written is false when the\nsame version was already there. Needs the helper up.", diff --git a/engine/crates/ps5upload-engine/src/convert_runtime.rs b/engine/crates/ps5upload-engine/src/convert_runtime.rs index cfd1b4044..4029bbecc 100644 --- a/engine/crates/ps5upload-engine/src/convert_runtime.rs +++ b/engine/crates/ps5upload-engine/src/convert_runtime.rs @@ -18,6 +18,16 @@ //! a status call (once per console per engine run; a failure is tried again after //! [`RETRY_AFTER`]), in the background, never in the way of the status answer or of a helper //! send, and also on request: `POST /api/ps5/convert-runtime {host}`. +//! +//! ampr_emu, which an unpacked `.pkg` gets where the game's own emulator has to go, is put there +//! the same way, but only when the user asks for it (`POST /api/ps5/convert-ampr-emu {host}`, +//! never on its own): the release the desktop app installs ([`crate::ampr_trace::release_runtime`], +//! the same download, digest and cache), checked to be ampr_emu of that version, written to +//! +//! `/data/ps5upload/convert/runtime/ampr_emu-/libSceAmpr.sprx` +//! +//! where the converter looks for it (`unpack_packs::console_ampr_emu`); the folder's name is the +//! version the converter checks the file against. use std::collections::HashMap; use std::sync::Mutex; @@ -170,12 +180,14 @@ fn sweep_stale_parts(fs: &dyn ConsoleFiles, dir: &str) -> Vec { let probe_name = part_name(); let probe = format!("{dir}/{probe_name}"); if let Err(why) = fs.write(&probe, b"0") { - crate::log_warn!("zstd runtime: could not write {probe} to read the console's time: {why}"); + crate::log_warn!( + "convert runtime: could not write {probe} to read the console's time: {why}" + ); return Vec::new(); } let listed = fs.list(dir); if let Err(why) = fs.remove(&probe) { - crate::log_warn!("zstd runtime: {probe} was left on the console: {why}"); + crate::log_warn!("convert runtime: {probe} was left on the console: {why}"); } let entries = match listed { Ok(e) => e, @@ -201,12 +213,12 @@ fn sweep_stale_parts(fs: &dyn ConsoleFiles, dir: &str) -> Vec { let path = format!("{dir}/{name}"); match fs.remove(&path) { Ok(()) => removed.push(path), - Err(why) => crate::log_warn!("zstd runtime: could not remove {path}: {why}"), + Err(why) => crate::log_warn!("convert runtime: could not remove {path}: {why}"), } } if !removed.is_empty() { crate::log_info!( - "zstd runtime: removed {} temporary file(s) an earlier put left in {dir}", + "convert runtime: removed {} temporary file(s) an earlier put left in {dir}", removed.len() ); } @@ -234,8 +246,15 @@ fn holds(fs: &dyn ConsoleFiles, path: &str, len: u64, sha: &str) -> Result Result { +/// The folder ampr_emu `version` goes in: the converter looks for it there. +pub(crate) fn ampr_emu_dir(version: &str) -> String { + format!( + "{CONSOLE_DIR}/{}", + ps5upload_convert_core::unpack_packs::console_ampr_emu_folder(version) + ) +} + +fn check_version(version: &str) -> Result<(), String> { if version.is_empty() || !version .bytes() @@ -243,7 +262,41 @@ pub(crate) fn put(fs: &dyn ConsoleFiles, version: &str, bytes: &[u8]) -> Result< { return Err(format!("{version:?} is not a version")); } - let dir = version_dir(version); + Ok(()) +} + +/// Puts `bytes` (ampr-emu-ng `version`, already checked against its digest) on the console. +pub(crate) fn put(fs: &dyn ConsoleFiles, version: &str, bytes: &[u8]) -> Result { + check_version(version)?; + put_in(fs, &version_dir(version), version, bytes) +} + +/// Puts `bytes`, the ampr_emu release this app installs (already checked against its digest), +/// on the console where the converter looks for it. Refused, with nothing written, unless the +/// module says it is ampr_emu of that release: the folder's name is the version the converter +/// checks it against. +pub(crate) fn put_ampr_emu(fs: &dyn ConsoleFiles, bytes: &[u8]) -> Result { + use ps5upload_fpkg::ampr_pack::image::RUNTIME_VERSION; + match ps5upload_fpkg::ampr_pack::ng::classify(bytes) { + ("ampr_emu", Some(v), _) if v == RUNTIME_VERSION => {} + (kind, v, _) => { + return Err(format!( + "the file is {kind} {}, not ampr_emu {RUNTIME_VERSION}: not put on the console", + v.unwrap_or_default() + )) + } + } + put_in(fs, &r_emu_dir(RUNTIME_VERSION), RUNTIME_VERSION, bytes) +} + +/// Puts `bytes` on the console as `/libSceAmpr.sprx`. +fn put_in( + fs: &dyn ConsoleFiles, + dir: &str, + version: &str, + bytes: &[u8], +) -> Result { + let dir = dir.to_string(); let path = format!("{dir}/{FILE}"); let part = format!("{dir}/{}", part_name()); let sha = sha256_hex(bytes); @@ -271,7 +324,7 @@ pub(crate) fn put(fs: &dyn ConsoleFiles, version: &str, bytes: &[u8]) -> Result< })(); if let Err(e) = written { if let Err(why) = fs.remove(&part) { - crate::log_warn!("zstd runtime: {part} was left on the console: {why}"); + crate::log_warn!("convert runtime: {part} was left on the console: {why}"); } return Err(e); } @@ -280,7 +333,9 @@ pub(crate) fn put(fs: &dyn ConsoleFiles, version: &str, bytes: &[u8]) -> Result< // helper to hand to a converter. if !holds(fs, &path, len, &sha)? { if let Err(why) = fs.remove(&path) { - crate::log_warn!("zstd runtime: {path} does not match and could not be removed: {why}"); + crate::log_warn!( + "convert runtime: {path} does not match and could not be removed: {why}" + ); } return Err(format!( "{path} on the console does not match what was put there" @@ -334,6 +389,35 @@ fn ensure_unlocked(host: &str) -> Result { Ok(out) } +/// Puts the ampr_emu release this app installs on the console at `host`, on request only +/// (blocking; one put per console at a time, the zstd runtime's included). +pub(crate) fn ensure_ampr_emu(host: &str) -> Result { + with_host_lock(host, || { + let out = put_ampr_emu_fetched(&Helper(host), &crate::ampr_trace::release_runtime)?; + if out.written { + crate::log_info!( + "convert runtime: put ampr_emu {} on the console ({})", + out.version, + out.path + ); + } + Ok(out) + }) +} + +/// [`put_ampr_emu`] with the bytes `fetch` gives (this machine's cache or the download, digest +/// checked): nothing is written when they can't be had. +fn put_ampr_emu_fetched( + fs: &dyn ConsoleFiles, + fetch: &dyn Fn() -> Result, String>, +) -> Result { + use ps5upload_fpkg::ampr_pack::image::RUNTIME_VERSION; + let bytes = fetch().map_err(|e| { + format!("ampr_emu {RUNTIME_VERSION} could not be had on this computer: {e}") + })?; + put_ampr_emu(fs, &bytes) +} + /// Whether a helper of `version` carries the converter. A helper of this engine's own version /// does too (a development build is not numbered as a release yet). pub(crate) fn helper_converts(version: &str) -> bool { @@ -466,6 +550,38 @@ pub(crate) async fn put_handler(Json(req): Json) -> impl } } +/// POST /api/ps5/convert-ampr-emu {host} — put ampr_emu (the release the desktop app installs +/// into games, digest checked, from this computer's cache or downloaded) on the console under +/// /data/ps5upload/convert/runtime/ampr_emu-/, so Convert on the PS5 can keep an +/// emulator when it unpacks asset packs. Only on request, never on its own. Answers {version, +/// path, written}; written is false when that version was already there. 502 when it could not +/// be downloaded or written; needs the helper up. +pub(crate) async fn put_ampr_emu_handler( + Json(req): Json, +) -> impl IntoResponse { + let host = crate::console_addr(&crate::consoles_api::resolve(req.host.trim())); + if host.is_empty() { + return crate::json_err(StatusCode::BAD_REQUEST, "host is required").into_response(); + } + // Counted busy while it writes: a Stop or a "Remove PS5Upload" waits for it. + let Some(busy) = crate::helper_stop::try_enter(&host) else { + return crate::json_err(StatusCode::CONFLICT, crate::helper_stop::STOPPING_MESSAGE) + .into_response(); + }; + let r = tokio::task::spawn_blocking(move || { + let _busy = busy; + ensure_ampr_emu(&host) + }) + .await; + match r { + Ok(Ok(out)) => (StatusCode::OK, Json(out)).into_response(), + Ok(Err(e)) => crate::json_err(StatusCode::BAD_GATEWAY, e).into_response(), + Err(e) => { + crate::json_err(StatusCode::INTERNAL_SERVER_ERROR, format!("{e}")).into_response() + } + } +} + #[cfg(test)] mod tests { use super::*; @@ -845,6 +961,80 @@ mod tests { ); } + /// drakmor's ampr_emu at `version`, as `ng::classify` names it. + fn ampr_emu(version: &str) -> Vec { + let mut m = format!("\0\0ampr_emu {version} (c) Drakmor\0").into_bytes(); + m.extend_from_slice(&[0u8; 32]); + m + } + + const AMPR_EMU_FINAL: &str = "/data/ps5upload/convert/runtime/ampr_emu-0.4.2.1/libSceAmpr.sprx"; + + #[test] + fn ampr_emu_goes_in_a_folder_named_after_its_version_where_the_converter_looks() { + use ps5upload_fpkg::ampr_pack::image::RUNTIME_VERSION; + assert_eq!(RUNTIME_VERSION, "0.4.2.1", "the path below names it"); + let fs = Fake::default(); + let emu = ampr_emu(RUNTIME_VERSION); + let out = put_ampr_emu_fetched(&fs, &|| Ok(emu.clone())).unwrap(); + assert_eq!( + out, + Outcome { + version: RUNTIME_VERSION.into(), + path: AMPR_EMU_FINAL.into(), + written: true + } + ); + assert_eq!(fs.files.borrow()[AMPR_EMU_FINAL], emu); + // The folder under the converter's job folder that it reads (`runtime/`). + assert_eq!( + CONSOLE_DIR, + format!( + "/data/ps5upload/convert/{}", + ps5upload_convert_core::unpack_packs::CONSOLE_RUNTIME_FOLDER + ) + ); + // Already there: nothing is written again. + let writes = *fs.writes.borrow(); + assert!(!put_ampr_emu(&fs, &emu).unwrap().written); + assert_eq!(*fs.writes.borrow(), writes); + // The zstd runtime's folder is another one. + put(&fs, "0.4.1", b"EMULATOR").unwrap(); + assert_eq!(fs.files.borrow()[AMPR_EMU_FINAL], emu); + assert_eq!(fs.files.borrow()[FINAL], b"EMULATOR"); + } + + #[test] + fn only_ampr_emu_of_the_release_this_app_installs_is_put_there() { + let fs = Fake::default(); + for (bytes, says) in [ + (ampr_emu("0.3.9"), "ampr_emu 0.3.9"), + (ampr_emu("0.4.3"), "ampr_emu 0.4.3"), + (b"NG EMULATOR".to_vec(), "unknown"), + ] { + let e = put_ampr_emu(&fs, &bytes).unwrap_err(); + assert!( + e.contains(says) && e.contains("not ampr_emu 0.4.2.1"), + "{e}" + ); + } + assert_eq!(*fs.writes.borrow(), 0); + assert!(fs.files.borrow().is_empty()); + } + + #[test] + fn a_failed_download_writes_nothing_and_says_why() { + let fs = Fake::default(); + let e = put_ampr_emu_fetched(&fs, &|| Err("fetching ampr_emu 0.4.2.1: offline".into())) + .unwrap_err(); + assert!( + e.contains("could not be had") && e.contains("offline"), + "{e}" + ); + assert_eq!(*fs.writes.borrow(), 0); + assert!(fs.dirs.borrow().is_empty()); + } + #[test] fn the_folder_is_the_one_the_helper_looks_in() { let h = include_str!("../../../../payload/include/console_convert.h"); diff --git a/engine/crates/ps5upload-engine/src/lib.rs b/engine/crates/ps5upload-engine/src/lib.rs index e18e3d28e..10099f9cb 100644 --- a/engine/crates/ps5upload-engine/src/lib.rs +++ b/engine/crates/ps5upload-engine/src/lib.rs @@ -13979,6 +13979,10 @@ fn build_app_and_mcp( "/api/ps5/convert-runtime", post(convert_runtime::put_handler), ) + .route( + "/api/ps5/convert-ampr-emu", + post(convert_runtime::put_ampr_emu_handler), + ) .route("/api/ps5/process/kill", post(ps5_process_kill)) .route("/api/ps5/power/control", post(ps5_power_control)) .route( diff --git a/engine/crates/ps5upload-engine/src/mcp/catalog_routes.rs b/engine/crates/ps5upload-engine/src/mcp/catalog_routes.rs index 5d2fac2f5..45eabc2f5 100644 --- a/engine/crates/ps5upload-engine/src/mcp/catalog_routes.rs +++ b/engine/crates/ps5upload-engine/src/mcp/catalog_routes.rs @@ -560,6 +560,7 @@ pub(crate) const ROUTES: &[(&str, &str)] = &[ ("POST", "/api/ps5/console-shares/save"), ("GET", "/api/ps5/console-tasks"), ("POST", "/api/ps5/console-tasks/cancel"), + ("POST", "/api/ps5/convert-ampr-emu"), ("POST", "/api/ps5/convert-runtime"), ("POST", "/api/ps5/disk-usage"), ("GET", "/api/ps5/disk-usage/{id}"), diff --git a/payload/convert/HARDWARE.md b/payload/convert/HARDWARE.md index 97ff4c660..ec5df0bdc 100644 --- a/payload/convert/HARDWARE.md +++ b/payload/convert/HARDWARE.md @@ -185,6 +185,23 @@ without a download. Not run on a console yet. difference. 6. "Unpack the asset packs" off: the package holds the packs as before (run 3d's result). +## Run 3f: the AMPR emulator put on the console from the app + +New: the converter reads `/data/ps5upload/convert/runtime/ampr_emu-/libSceAmpr.sprx` +(written by the app's Settings › This PS5 › "Put the AMPR emulator on this PS5", never on its +own). No new import. Not run on a console yet. + +1. Press the button: it says `ampr_emu 0.4.2.1 is on this PS5.`; Files shows that file, about + 1 MiB. Pressed again: the same, nothing written (the engine log has no new "put ampr_emu"). +2. Run 3e's game (ampr-emu-ng in `fakelib`) in Minion, Convert, `.pkg`: no sentence holds Convert + now, "Leave out the AMPR emulator" is off. Convert. Proven when: it ends `ok`; `convert.log` has + `ampr_emu 0.4.2.1 on the console goes in where the game's own emulator has to go` and + `ampr-emu-ng ... at fakelib/libSceAmpr.sprx is replaced by ampr_emu`; the package's + `fakelib/libSceAmpr.sprx` is byte for byte the file on the console; it installs and the game + starts. The same game made into a `.pkg` by the desktop app holds the same files. +3. Delete the `ampr_emu-0.4.2.1` folder in Files: the page holds Convert again with the sentence + that names the app's button (run 3e step 1). + ## Run 4: Stop, and a full drive Start run 3 on a large game and press Stop at about 10 %, then at about 50 %, then during diff --git a/payload/include/console_convert.h b/payload/include/console_convert.h index e1dc7660d..facf56841 100644 --- a/payload/include/console_convert.h +++ b/payload/include/console_convert.h @@ -25,7 +25,8 @@ * [,"zstd":true[,"zstd_level":1..22]][,"verify":"fast"|"full"]} * "inspect" (the default) reads what the source is; the job's result is the converter's answer * ({"path","format","size","files","title_id","title",...; for a game in asset packs also - * "unpacked_bytes" and "unpack_keeps_emulator"}) and "zstd_runtime": the version of the + * "unpacked_bytes" and "unpack_keeps_emulator", and "ampr_emu": the version of the ampr_emu the + * app put on the console when it is there}) and "zstd_runtime": the version of the * newest zstd runtime on the console (CONVERT_RUNTIME_DIR), or null when there is none, so the page * can say a zstd build needs it. "build" writes `dest` in `format` * (through `.partial` beside it, renamed in place at the end). A `dest` that exists is @@ -36,10 +37,13 @@ * "unpack_packs" (a .pkg only; absent: the game is packaged as it is, packs and all) packages a * packed game as its plain files, decoded as the package is written. The game's own AMPR emulator * stays only when it is one that suits plain files (the converter's rule, the desktop app's: see - * engine/crates/ps5upload-convert-core/src/unpack_packs.rs); otherwise the converter refuses with - * convert_unpack_needs_emulator, since the console fetches no other emulator, and - * "leave_out_ampr_emu" (with "unpack_packs" only) leaves every libSceAmpr.sprx out instead. A game - * that is not in packs is refused with convert_not_packed. + * engine/crates/ps5upload-convert-core/src/unpack_packs.rs). Where it has to go, the converter puts + * in the ampr_emu the desktop app put on the console when the user asked it to + * (CONVERT_RUNTIME_DIR/ampr_emu-/libSceAmpr.sprx, which the converter finds and checks + * itself), as the desktop app does; with none there it refuses with + * convert_unpack_needs_emulator, since the console fetches nothing. "leave_out_ampr_emu" (with + * "unpack_packs" only) leaves every libSceAmpr.sprx out instead. A game that is not in packs is + * refused with convert_not_packed. * One job at a time (convert_busy); a build is also refused while a package install or an * archive extraction runs (the three would share the drive and the console's memory). */ #ifndef PS5UPLOAD_CONSOLE_CONVERT_H @@ -57,7 +61,8 @@ #endif /* The zstd runtime (ampr-emu-ng's libSceAmpr.sprx) the desktop app puts on the console, one * folder per release: /ampr-emu-ng-/libSceAmpr.sprx (the engine's - * convert_runtime.rs writes it; nothing is downloaded on the console). */ + * convert_runtime.rs writes it; nothing is downloaded on the console). On request it also puts + * ampr_emu there, /ampr_emu-/libSceAmpr.sprx, which the converter reads itself. */ #define CONVERT_RUNTIME_DIR "/data/ps5upload/convert/runtime" /* The most of status.json the helper reads. The converter keeps its status far below this (an diff --git a/scripts/i18n-source-hashes.json b/scripts/i18n-source-hashes.json index d046e5a70..476b865bf 100644 --- a/scripts/i18n-source-hashes.json +++ b/scripts/i18n-source-hashes.json @@ -1897,7 +1897,7 @@ "cw_convert_stopped": "4532a207 5lnbvnc_iVddpxUOA0Vb0k-g3OAPuHII1GB6ewz3Gre1KOHdWQYdZCoXfDWS", "cw_convert_title": "5cd425f5 TwN40ECma9r64CG9r6HlOakNwUxrO4fO1RjO1sM4YoyPLkQhs0NsQbCw1eFy", "cw_convert_unpack": "1d695e78 ggudtOiDZos4sgc-DkDxHu7l44kTCKodI-T4oac6i7VISyaRXISq5C6qIPot", - "cw_convert_unpack_needs_emulator": "ae5272c2 skmVQYxhiYk6urskYTQbfRi7qokMFhBG4X53hNUZw6L2-q0vx3VDRXC1lw_s", + "cw_convert_unpack_needs_emulator_v2": "d5846627 R1nl4mAxrNjt58l6BpkR-8JVv8twwufqTUd6-VC8OpVkigrfsQMukhJKvGyQ", "cw_convert_unpack_note": "59b32a32 _ZOKeVM-4qmLG41Jks7KimasNkDo-vgGnJeOPsp9FKUwz-PEKqjmxFSonX5i", "cw_convert_verify": "e371a673 7EZjKQDMK9MEZOoYwbyUxOTUjAOJ6gDF0XfHEsbkRkLW4e5YAT26k9xlDLD2", "cw_convert_verify_fast": "c1502c6a 3Wrg9CIiS0_n9OfScpislJjOuf4B2HwLAlzI1EbX5I6l8unEiOcTYHnTc1fI", @@ -5402,6 +5402,9 @@ "mesh_settings": "fb2ce493 7Y8pd95KbM1BWlBaJWKccl68i0hlAe-4w73-AN_iNkGCtY5qT1NLk1c_h8UJ", "mesh_this_device": "d052579c 9CVlOh15kVjbp5cUkhMmqY-m_aLGxGslp5Z_7nHVjbnYIMvDdcJjDAYlZNBq", "mesh_unblock": "712da631 TyPABmBvM1MLJkAWrcnpdXbCMBVfCRbolDZKu141MLxXo13SrmaaaRKHTqsK", + "minion_ampr_emu_done": "08343a7e rUWhZIyYSbXe1ds4s2Cx6gjbCxAwScQMNp0s-6FLnz7_4agKzBlawc74uNxZ", + "minion_ampr_emu_note": "bfd68d3d tKtgYbUHIkRSFZCB5oB30w1tZQvUaKI2VMdGMYXFkLjL7LtOcq32FsodMDz-", + "minion_ampr_emu_put": "dca3c21f lSvblMLLKY9774xAZrjgYYehiTnXLQDyFIZWohCM56qtcKjjRRw_swh7g4xq", "minion_boot_helper_note": "adf4affa sK-57ztVkqguojz61Jcj82j1cWd3ZRqildr5Fi8Ig4XG_buVNXtUnBGtgTJf", "minion_enabled_note": "06c7bd3e lELoJ1NLu0jjgPmchC_mIbNJsvilLwVdQM24TSySJTCDMq49GCdwJ-2YPu_X", "minion_enabled_update": "71f6203a Rd-XJnxTUsp8Z5I4akg60bo_M4u4rGxe19Vcwxteog8ELSGzpLwRTqHnk8lE", From 833bd9d5d2041d946ae5a3f1329aa7a51d138788 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:44:21 -0800 Subject: [PATCH 20/75] Translations: review of the newest texts in all 20 languages Fixes a button named in a sentence with other words than the button itself (Play, Retry, Try again, Update helper), formal and informal address mixed within a locale (fr, tr, id, fa), Android's "Allow access to manage all files" left in English (fa, hi, th, id, vi), PS5 as neuter in Polish, a few wrong meanings (fr fakelib note, fa and id asset-pack note, tr and id "fetched nothing"), and stray left-to-right marks in Persian and Arabic, which the app's own isolation of Latin text now handles. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/src/console/locales/fa.json | 6 ++-- client/src/console/locales/tr.json | 2 +- client/src/i18n/locales/ar.ts | 4 +-- client/src/i18n/locales/bn.ts | 6 ++-- client/src/i18n/locales/de.ts | 2 +- client/src/i18n/locales/fa.ts | 18 +++++----- client/src/i18n/locales/fr.ts | 12 +++---- client/src/i18n/locales/hi.ts | 10 +++--- client/src/i18n/locales/hu.ts | 4 +-- client/src/i18n/locales/id.ts | 18 +++++----- client/src/i18n/locales/ja.ts | 4 +-- client/src/i18n/locales/ko.ts | 6 ++-- client/src/i18n/locales/pl.ts | 10 +++--- client/src/i18n/locales/pt-BR.ts | 2 +- client/src/i18n/locales/th.ts | 4 +-- client/src/i18n/locales/tr.ts | 14 ++++---- client/src/i18n/locales/vi.ts | 4 +-- client/src/i18n/locales/zh-CN.ts | 4 +-- client/src/i18n/locales/zh-TW.ts | 8 ++--- scripts/i18n-source-hashes.json | 58 +++++++++++++++--------------- 20 files changed, 98 insertions(+), 98 deletions(-) diff --git a/client/src/console/locales/fa.json b/client/src/console/locales/fa.json index a3851a908..1664f94f1 100644 --- a/client/src/console/locales/fa.json +++ b/client/src/console/locales/fa.json @@ -214,7 +214,7 @@ "cw_convert_inspect_failed": "خواندن این بازی ممکن نشد: {reason}", "cw_convert_intro": "پوشهٔ بازی یا ایمیجی را که روی این PS5 است به قالب دیگری تبدیل کنید؛ روی خود PS5 نوشته می‌شود. رایانه لازم نیست.", "cw_convert_leave_out_emu": "کنار گذاشتن شبیه‌ساز AMPR", - "cw_convert_leave_out_emu_note": "در این صورت فایل ‎.pkg هیچ ⁦fakelib/libSceAmpr.sprx⁩ ندارد و بازی فایل‌هایش را با کتابخانهٔ سیستمی خود PS5 می‌خواند. این فقط با یک بازی، روی فریم‌ور 5.10، امتحان شده است. اگر بازی اجرا نشد، ‎.pkg را دوباره با خاموش بودن این گزینه بسازید.", + "cw_convert_leave_out_emu_note": "در این صورت فایل ⁦.pkg⁩ هیچ ⁦fakelib/libSceAmpr.sprx⁩ ندارد و بازی فایل‌هایش را با کتابخانهٔ سیستمی خود PS5 می‌خواند. این فقط با یک بازی، روی فریم‌ور 5.10، امتحان شده است. اگر بازی اجرا نشد، ⁦.pkg⁩ را دوباره با خاموش بودن این گزینه بسازید.", "cw_convert_level_default": "5 (پیش‌فرض)", "cw_convert_level_fast": "1 (سریع‌ترین)", "cw_convert_level_small": "19 (کوچک‌ترین، کند)", @@ -245,8 +245,8 @@ "cw_convert_stopped": "متوقف شد. چیزی از آنچه نوشته بود نگه داشته نشد.", "cw_convert_title": "تبدیل", "cw_convert_unpack": "باز کردن بسته‌های دارایی (دوباره فایل‌های ساده)", - "cw_convert_unpack_needs_emulator_v2": "این بازی فایل‌هایش را از راه AMPR می‌خواند و شبیه‌سازی ندارد که با فایل‌های ساده کار کند. شبیه‌ساز AMPR را از برنامه روی این PS5 بگذار (تنظیمات › این PS5)، یا «کنار گذاشتن شبیه‌ساز AMPR» را روشن کن.", - "cw_convert_unpack_note": "این بازی در بسته‌های دارایی {kind} است. اگر روشن باشد، فایل ‎.pkg هر فایل را به‌صورت فایل ساده در خود دارد و بسته‌های دارایی را کنار می‌گذارد، پس تقریباً به اندازهٔ بازی پیش از بسته‌بندی است ({size}). اگر خاموش باشد، بسته‌های دارایی همان‌طور که هستند وارد می‌شوند و فقط شبیه‌ساز می‌تواند آن‌ها را بخواند.", + "cw_convert_unpack_needs_emulator_v2": "این بازی فایل‌هایش را از راه AMPR می‌خواند و شبیه‌سازی ندارد که با فایل‌های ساده کار کند. شبیه‌ساز AMPR را از برنامه روی این PS5 بگذارید (تنظیمات › این PS5)، یا «کنار گذاشتن شبیه‌ساز AMPR» را روشن کنید.", + "cw_convert_unpack_note": "این بازی در بسته‌های دارایی {kind} است. اگر روشن باشد، فایل ⁦.pkg⁩ هر فایل را به‌صورت فایل ساده در خود دارد و بسته‌های دارایی را کنار می‌گذارد، پس تقریباً به اندازهٔ بازی پیش از بسته‌بندی است ({size}). اگر خاموش باشد، بسته‌های دارایی همان‌طور که هستند وارد می‌شوند و فقط شبیه‌ساز می‌تواند آن‌ها را بخواند.", "cw_convert_verify": "بررسی پس از نوشتن", "cw_convert_verify_fast": "بررسی سریع", "cw_convert_verify_full": "بررسی همهٔ بایت‌ها", diff --git a/client/src/console/locales/tr.json b/client/src/console/locales/tr.json index 236fb1da2..bb9d221db 100644 --- a/client/src/console/locales/tr.json +++ b/client/src/console/locales/tr.json @@ -245,7 +245,7 @@ "cw_convert_stopped": "Durduruldu. Yazdığı hiçbir şey tutulmadı.", "cw_convert_title": "Dönüştür", "cw_convert_unpack": "Varlık paketlerini aç (yeniden düz dosyalar)", - "cw_convert_unpack_needs_emulator_v2": "Bu oyun dosyalarını AMPR üzerinden okuyor ve düz dosyalarla çalışan bir öykünücüsü yok. AMPR öykünücüsünü uygulamadan bu PS5'e koy (Ayarlar › Bu PS5) ya da AMPR öykünücüsünü dahil etme seçeneğini aç.", + "cw_convert_unpack_needs_emulator_v2": "Bu oyun dosyalarını AMPR üzerinden okuyor ve düz dosyalarla çalışan bir öykünücüsü yok. AMPR öykünücüsünü uygulamadan bu PS5'e koyun (Ayarlar › Bu PS5) ya da AMPR öykünücüsünü dahil etme seçeneğini açın.", "cw_convert_unpack_note": "Bu oyun {kind} varlık paketlerinde. Açıksa paket her dosyayı düz dosya olarak içerir ve varlık paketlerini dışarıda bırakır; böylece boyutu oyunun paketlenmeden önceki haline yakındır ({size}). Kapalıysa varlık paketleri olduğu gibi girer ve onları yalnızca öykünücü okuyabilir.", "cw_convert_verify": "Yazdıktan sonra denetle", "cw_convert_verify_fast": "Hızlı denetim", diff --git a/client/src/i18n/locales/ar.ts b/client/src/i18n/locales/ar.ts index ee76c4b51..b40da9ec4 100644 --- a/client/src/i18n/locales/ar.ts +++ b/client/src/i18n/locales/ar.ts @@ -1977,7 +1977,7 @@ picker_choose_folder: "اختيار مجلد", picker_choose_file: "اختر ملفًا", picker_grant_title: "السماح بالوصول إلى ملفاتك", picker_grant_hint: "لتحميل مجلد لعبة أو .zip، يحتاج PS5Upload إلى إذن لقراءة ملفاتك. انقر أدناه، وقم بتمكين \"السماح بالوصول لإدارة جميع الملفات\"، ثم عد وانقر على إعادة المحاولة.", -picker_grant_hint_prompt: "لتحميل مجلد لعبة أو ‎.zip، يحتاج PS5Upload إلى إذن لقراءة ملفاتك. انقر على «السماح»، ووافق في النافذة التي تظهر، ثم انقر على «إعادة المحاولة».", +picker_grant_hint_prompt: "لتحميل مجلد لعبة أو .zip، يحتاج PS5Upload إلى إذن لقراءة ملفاتك. انقر على «السماح»، ووافق في النافذة التي تظهر، ثم انقر على «إعادة المحاولة».", picker_open_settings: "افتح الإعدادات", picker_allow: "السماح", picker_retry: "إعادة المحاولة", @@ -5323,7 +5323,7 @@ install_path_fallback_label: "التثبيت عبر مسار الملف عندم "installed_fix_permissions_done": "تم إصلاح الأذونات: كل ملف في مجلد هذه اللعبة أصبح الآن 0777. اضغط تشغيل.", "installed_fix_permissions_short": "إصلاح الأذونات", "installed_launch_homebrew_refused": "رفض جهاز PS5 تشغيل هذه اللعبة (0x80940033). الجهاز لا يشغّل حاليًا تطبيقات homebrew أو ألعاب الحزم المزيفة: أعد تحميل kstuff (أو أعد التشغيل وشغّل كسر الحماية مرة أخرى)، ثم اضغط تشغيل مجددًا.", -"fakegame.fw.launch_kstuff_v2": "إذا ثُبّتت هذه اللعبة من حزمة مزيفة: على FW {fw} لا تبدأ إلا مع kstuff 1.15 أو أحدث. نسخة الكتالوج قد تكون أقدم: احصل على kstuff 1.15 من مؤلفه، وأرسله عبر «إرسال حمولة»، ثم اضغط تشغيل مرة أخرى.", +"fakegame.fw.launch_kstuff_v2": "إذا ثُبّتت هذه اللعبة من حزمة مزيفة: على FW {fw} لا تبدأ إلا مع kstuff 1.15 أو أحدث. نسخة الكتالوج قد تكون أقدم: احصل على kstuff 1.15 من مؤلفه، وأرسله عبر «إرسال حمولة»، ثم اضغط «العب» مرة أخرى.", "installed_launch_no_kstuff": "رفض جهاز PS5 تشغيل هذه اللعبة (0x80940033) لأن kstuff لا يعمل. من دونه لا يشغّل الجهاز أي تطبيق homebrew أو لعبة من حزمة مزيفة. حمّل kstuff (المحمّل التلقائي لديك، أو الاتصال → إعداد) ثم اضغط تشغيل مجددًا.", job_why_lanes: "الاتصالات: {avg} في المتوسط، و{max} كحد أقصى؛ الجزء {chunk}", job_why_loading: "جارٍ التحميل…", diff --git a/client/src/i18n/locales/bn.ts b/client/src/i18n/locales/bn.ts index 0d8370d56..53816d214 100644 --- a/client/src/i18n/locales/bn.ts +++ b/client/src/i18n/locales/bn.ts @@ -1976,7 +1976,7 @@ gate_send_helper_cta: "সংযোগ খুলুন", picker_choose_folder: "ফোল্ডার খুলুন", picker_choose_file: "একটি ফাইল নির্বাচন করুন", picker_grant_title: "আপনার ফাইলগুলিতে অ্যাক্সেসের অনুমতি দিন", -picker_grant_hint: "কোনও গেম ফোল্ডার বা .zip আপলোড করতে, আপনার ফাইলগুলি পড়ার জন্য PS5Upload-এর অনুমতি প্রয়োজন । নীচে ট্যাপ করুন, \"সমস্ত ফাইল পরিচালনা করার জন্য অ্যাক্সেসের অনুমতি দিন\" সক্ষম করুন, তারপরে ফিরে আসুন এবং আবার চেষ্টা করুন ট্যাপ করুন ।", +picker_grant_hint: "কোনও গেম ফোল্ডার বা .zip আপলোড করতে, আপনার ফাইলগুলি পড়ার জন্য PS5Upload-এর অনুমতি প্রয়োজন। নীচে ট্যাপ করুন, “সমস্ত ফাইল পরিচালনা করার জন্য অ্যাক্সেসের অনুমতি দিন” চালু করুন, তারপর ফিরে এসে “পুনরায় চেষ্টা করুন” ট্যাপ করুন।", picker_grant_hint_prompt: "কোনও গেম ফোল্ডার বা .zip আপলোড করতে, আপনার ফাইলগুলি পড়ার জন্য PS5Upload-এর অনুমতি প্রয়োজন। “অনুমতি দিন” ট্যাপ করুন, প্রম্পটে সম্মতি দিন, তারপর “পুনরায় চেষ্টা করুন” ট্যাপ করুন।", picker_open_settings: "সেটিংস খুলুন", picker_allow: "অনুমতি দিন", @@ -2218,7 +2218,7 @@ engine_restart_go: "ইঞ্জিন আবার চালু করুন", engine_restart_done: "ইঞ্জিন আবার চালু হয়েছে।", engine_url_runs_elsewhere: "এই কম্পিউটারের ইঞ্জিন {running}-এ চলছে। এটি {wanted}-এ সরাতে ইঞ্জিন আবার চালু করুন।", engine_err_in_app_failed: "অ্যাপের ভেতরের ইঞ্জিন চালু হয়নি: {detail}", -engine_err_in_app_blocked: "অ্যাপের ভেতরের ইঞ্জিন চলছে, কিন্তু এই ডিভাইস অ্যাপের সংযোগ আটকে দিয়েছে ({detail})। VPN, বিজ্ঞাপন ব্লকার বা কনটেন্ট ফিল্টার এমন করতে পারে: সেটি বন্ধ করে আবার চেষ্টা করুন চাপুন। ডিভাইস রিস্টার্ট করলেও কাজ হতে পারে।", +engine_err_in_app_blocked: "অ্যাপের ভেতরের ইঞ্জিন চলছে, কিন্তু এই ডিভাইস অ্যাপের সংযোগ আটকে দিয়েছে ({detail})। VPN, বিজ্ঞাপন ব্লকার বা কনটেন্ট ফিল্টার এমন করতে পারে: সেটি বন্ধ করে “আবার চেষ্টা করুন” চাপুন। ডিভাইস রিস্টার্ট করলেও কাজ হতে পারে।", engine_err_not_ready: "ইঞ্জিন {seconds} সেকেন্ডের মধ্যে চালু হয়নি।", engine_err_hint_windows: "সাধারণ কারণ: SmartScreen বা অ্যান্টিভাইরাস ইঞ্জিন প্রোগ্রামটি আটকেছে, ফায়ারওয়াল এই কম্পিউটারের নিজের সংযোগ আটকাচ্ছে, অথবা কোনো পোর্ট খালি ছিল না।", engine_err_hint_macos: "সাধারণ কারণ: নিরাপত্তা বা ফায়ারওয়াল সফটওয়্যার (Little Snitch, LuLu, ওয়েব সুরক্ষাসহ অ্যান্টিভাইরাস) ps5upload-engine আটকাচ্ছে। এটিকে অনুমতি দিয়ে অ্যাপ আবার চালু করুন।", @@ -5323,7 +5323,7 @@ install_path_fallback_label: "PS5 এই কম্পিউটারে পৌ "installed_fix_permissions_done": "অনুমতি ঠিক করা হয়েছে: এই গেমের ফোল্ডারের প্রতিটি ফাইল এখন 0777। চালান চাপুন।", "installed_fix_permissions_short": "অনুমতি ঠিক করুন", "installed_launch_homebrew_refused": "PS5 এই গেমটি চালু করতে অস্বীকার করেছে (0x80940033)। কনসোল এখন homebrew বা নকল-প্যাকেজ গেম চালু করছে না: kstuff আবার লোড করুন (অথবা রিবুট করে আবার জেলব্রেক চালান), তারপর আবার চালান চাপুন।", -"fakegame.fw.launch_kstuff_v2": "এই গেমটি নকল প্যাকেজ থেকে ইনস্টল হলে: FW {fw}-এ এটি শুধু kstuff 1.15 বা নতুনটিতে চালু হয়। ক্যাটালগের কপি পুরোনো হতে পারে: kstuff 1.15 এর নির্মাতার কাছ থেকে নিন, “পেলোড পাঠান” দিয়ে পাঠান, তারপর আবার চালান চাপুন।", +"fakegame.fw.launch_kstuff_v2": "এই গেমটি নকল প্যাকেজ থেকে ইনস্টল হলে: FW {fw}-এ এটি শুধু kstuff 1.15 বা নতুনটিতে চালু হয়। ক্যাটালগের কপি পুরোনো হতে পারে: kstuff 1.15 এর নির্মাতার কাছ থেকে নিন, “পেলোড পাঠান” দিয়ে পাঠান, তারপর আবার “খেলুন” চাপুন।", "installed_launch_no_kstuff": "kstuff চলছে না বলে PS5 এই গেমটি চালু করতে অস্বীকার করেছে (0x80940033)। এটি ছাড়া কনসোল কোনো homebrew বা নকল-প্যাকেজ গেম চালু করে না। kstuff লোড করুন (আপনার autoloader, অথবা সংযোগ → সেট আপ) এবং আবার চালান চাপুন।", job_why_lanes: "সংযোগ: গড়ে {avg}, সর্বোচ্চ {max}; চাঙ্ক {chunk}", job_why_loading: "লোড হচ্ছে…", diff --git a/client/src/i18n/locales/de.ts b/client/src/i18n/locales/de.ts index ebfa96024..abdbfbf53 100644 --- a/client/src/i18n/locales/de.ts +++ b/client/src/i18n/locales/de.ts @@ -1985,7 +1985,7 @@ settings_section_reset: "Zurücksetzen", picker_choose_file: "Datei auswählen", picker_grant_title: "Zugriff auf deine Dateien erlauben", picker_grant_hint: "Um einen Spieleordner oder eine .zip hochzuladen, braucht PS5Upload die Berechtigung, deine Dateien zu lesen. Tippe unten, aktiviere „Zugriff zum Verwalten aller Dateien erlauben“, komm dann zurück und tippe auf Wiederholen.", - picker_grant_hint_prompt: "Um einen Spielordner oder eine .zip hochzuladen, braucht PS5Upload die Erlaubnis, deine Dateien zu lesen. Tippe auf „Erlauben“, stimme in der Abfrage zu und tippe dann auf „Erneut versuchen“.", + picker_grant_hint_prompt: "Um einen Spielordner oder eine .zip hochzuladen, braucht PS5Upload die Erlaubnis, deine Dateien zu lesen. Tippe auf „Erlauben“, stimme in der Abfrage zu und tippe dann auf „Wiederholen“.", picker_open_settings: "Einstellungen öffnen", picker_allow: "Erlauben", picker_retry: "Wiederholen", diff --git a/client/src/i18n/locales/fa.ts b/client/src/i18n/locales/fa.ts index b5cda2242..9a1d0b7fc 100644 --- a/client/src/i18n/locales/fa.ts +++ b/client/src/i18n/locales/fa.ts @@ -507,7 +507,7 @@ fs_to_copy: "برای کپی", fs_from: "از", fs_paste_here: "اینجا جای‌گذاری کن", fs_cancel_clipboard: "لغو — فراموش کردن موارد آماده‌شده", -fs_staged_bar: "موردهای آماده برای جای‌گذاری", +fs_staged_bar: "موردها برای جای‌گذاری", fs_staged_move: "موردها برای انتقال: {count}", fs_staged_copy: "موردها برای کپی: {count}", fs_staged_from: "از {path}", @@ -1347,10 +1347,10 @@ home_low_space_body: "پاک‌سازی به‌روزرسانی‌ها، بست "cw_convert_pkg_level_stored": "بدون فشرده‌سازی (سریع‌ترین، بزرگ‌ترین)", "cw_convert_pkg_note": "یک بستهٔ دیباگ با امضای جعلی. فقط اینجا نوشته می‌شود و نصب نمی‌شود؛ نصب آن به کنسولی نیاز دارد که برای بسته‌های دیباگ آماده شده باشد. فشرده‌سازی Kraken روی 3 تا از CPUهای PS5 اجرا می‌شود. تخمین برای یک بازی 30 GB: بدون فشرده‌سازی حدود 5 دقیقه، سریع حدود 15 دقیقه، متعادل حدود یک ساعت، و سپس بررسی.", "cw_convert_unpack": "باز کردن بسته‌های دارایی (دوباره فایل‌های ساده)", -"cw_convert_unpack_note": "این بازی در بسته‌های دارایی {kind} است. اگر روشن باشد، فایل ‎.pkg هر فایل را به‌صورت فایل ساده در خود دارد و بسته‌های دارایی را کنار می‌گذارد، پس تقریباً به اندازهٔ بازی پیش از بسته‌بندی است ({size}). اگر خاموش باشد، بسته‌های دارایی همان‌طور که هستند وارد می‌شوند و فقط شبیه‌ساز می‌تواند آن‌ها را بخواند.", +"cw_convert_unpack_note": "این بازی در بسته‌های دارایی {kind} است. اگر روشن باشد، فایل .pkg هر فایل را به‌صورت فایل ساده در خود دارد و بسته‌های دارایی را کنار می‌گذارد، پس تقریباً به اندازهٔ بازی پیش از بسته‌بندی است ({size}). اگر خاموش باشد، بسته‌های دارایی همان‌طور که هستند وارد می‌شوند و فقط شبیه‌ساز می‌تواند آن‌ها را بخواند.", "cw_convert_leave_out_emu": "کنار گذاشتن شبیه‌ساز AMPR", -"cw_convert_leave_out_emu_note": "در این صورت فایل ‎.pkg هیچ fakelib/libSceAmpr.sprx ندارد و بازی فایل‌هایش را با کتابخانهٔ سیستمی خود PS5 می‌خواند. این فقط با یک بازی، روی فریم‌ور 5.10، امتحان شده است. اگر بازی اجرا نشد، ‎.pkg را دوباره با خاموش بودن این گزینه بسازید.", -"cw_convert_unpack_needs_emulator_v2": "این بازی فایل‌هایش را از راه AMPR می‌خواند و شبیه‌سازی ندارد که با فایل‌های ساده کار کند. شبیه‌ساز AMPR را از برنامه روی این PS5 بگذار (تنظیمات › این PS5)، یا «کنار گذاشتن شبیه‌ساز AMPR» را روشن کن.", +"cw_convert_leave_out_emu_note": "در این صورت فایل .pkg هیچ fakelib/libSceAmpr.sprx ندارد و بازی فایل‌هایش را با کتابخانهٔ سیستمی خود PS5 می‌خواند. این فقط با یک بازی، روی فریم‌ور 5.10، امتحان شده است. اگر بازی اجرا نشد، .pkg را دوباره با خاموش بودن این گزینه بسازید.", +"cw_convert_unpack_needs_emulator_v2": "این بازی فایل‌هایش را از راه AMPR می‌خواند و شبیه‌سازی ندارد که با فایل‌های ساده کار کند. شبیه‌ساز AMPR را از برنامه روی این PS5 بگذارید (تنظیمات › این PS5)، یا «کنار گذاشتن شبیه‌ساز AMPR» را روشن کنید.", "cw_convert_err_not_packed": "این بازی در بسته‌های دارایی نیست، پس چیزی برای باز کردن وجود ندارد. «باز کردن بسته‌های دارایی» را خاموش کنید.", "cw_convert_reading": "در حال خواندن بازی…", "cw_convert_running": "در حال تبدیل {name}…", @@ -2795,8 +2795,8 @@ gate_send_helper_cta: "باز کردن Connection", picker_choose_folder: "انتخاب پوشه", picker_choose_file: "انتخاب فایل", picker_grant_title: "اجازه‌ی دسترسی به فایل‌های شما", -picker_grant_hint: "برای بارگذاری یک پوشه بازی یا .zip، PS5Upload نیاز به اجازه‌ی خواندن فایل‌های شما دارد. در زیر ضربه بزنید، «Allow access to manage all files» را فعال کنید، سپس برگردید و Retry را بزنید.", -picker_grant_hint_prompt: "برای بارگذاری یک پوشهٔ بازی یا ‎.zip، PS5Upload نیاز به اجازهٔ خواندن فایل‌های شما دارد. روی «اجازه دادن» بزنید، در پنجرهٔ بازشده موافقت کنید، سپس «تلاش دوباره» را بزنید.", +picker_grant_hint: "برای بارگذاری یک پوشهٔ بازی یا .zip، PS5Upload نیاز به اجازهٔ خواندن فایل‌های شما دارد. در زیر ضربه بزنید، «اجازهٔ دسترسی برای مدیریت همهٔ فایل‌ها» را روشن کنید، سپس برگردید و «تلاش دوباره» را بزنید.", +picker_grant_hint_prompt: "برای بارگذاری یک پوشهٔ بازی یا .zip، PS5Upload نیاز به اجازهٔ خواندن فایل‌های شما دارد. روی «اجازه دادن» بزنید، در پنجرهٔ بازشده موافقت کنید، سپس «تلاش دوباره» را بزنید.", picker_open_settings: "باز کردن تنظیمات", picker_allow: "اجازه دادن", picker_retry: "تلاش دوباره", @@ -5623,7 +5623,7 @@ install_path_fallback_label: "نصب از طریق مسیر فایل وقتی PS "installed_fix_permissions_done": "مجوزها اصلاح شد: همه‌ی فایل‌های پوشه‌ی این بازی اکنون 0777 هستند. بازی را بزنید.", "installed_fix_permissions_short": "اصلاح مجوزها", "installed_launch_homebrew_refused": "PS5 از اجرای این بازی خودداری کرد (0x80940033). کنسول در حال حاضر برنامه‌های homebrew یا بازی‌های بسته‌ی جعلی را اجرا نمی‌کند: kstuff را دوباره بارگذاری کنید (یا راه‌اندازی مجدد کنید و جیلبریک را دوباره اجرا کنید)، سپس دوباره بازی را بزنید.", -"fakegame.fw.launch_kstuff_v2": "اگر این بازی از بسته‌ی جعلی نصب شده: روی FW {fw} فقط با kstuff 1.15 یا جدیدتر اجرا می‌شود. نسخه‌ی کاتالوگ ممکن است قدیمی‌تر باشد: kstuff 1.15 را از سازنده‌اش بگیرید، با «ارسال پی‌لود» بفرستید و دوباره بازی را بزنید.", +"fakegame.fw.launch_kstuff_v2": "اگر این بازی از بسته‌ی جعلی نصب شده: روی FW {fw} فقط با kstuff 1.15 یا جدیدتر اجرا می‌شود. نسخه‌ی کاتالوگ ممکن است قدیمی‌تر باشد: kstuff 1.15 را از سازنده‌اش بگیرید، با «ارسال پی‌لود» بفرستید و دوباره «بازی» را بزنید.", "installed_launch_no_kstuff": "PS5 از اجرای این بازی خودداری کرد (0x80940033) چون kstuff در حال اجرا نیست. بدون آن کنسول هیچ برنامه‌ی homebrew یا بازی بسته‌ی جعلی را اجرا نمی‌کند. kstuff را بارگذاری کنید (autoloader خودتان، یا اتصال → راه‌اندازی) و دوباره بازی را بزنید.", job_why_window_full: "پنجره‌ی دریافت پر {pct} %: داده سریع‌تر از آنچه کنسول تأیید می‌کرد ارسال شد، در حالی که کنسول نه درایو و نه کارگرهایش را محدودیت گزارش کرد. این معمولاً یعنی اتصال شبکه کند است (Wi-Fi، سیگنال ضعیف یا شبکه‌ی شلوغ)؛ راه‌حل معمول اتصال سیمی است.", "linkdl.cancel": "لغو", @@ -6929,7 +6929,7 @@ library_compressed_hint: "برای اجرای ایمیج فشرده به ShadowM "minion_zstd_runtime_note": "تبدیل روی PS5 برای نوشتن بسته‌های zstd به محیط اجرای zstd (ampr-emu-ng) روی کنسول نیاز دارد. برنامه خودش آن را هنگام وصل شدن این PS5 آنجا می‌گذارد.", "minion_zstd_runtime_put": "محیط اجرای zstd را روی این PS5 بگذار", "minion_zstd_runtime_done": "ampr-emu-ng {version} روی این PS5 هست.", -"minion_ampr_emu_note": "برای نگه داشتن شبیه‌ساز AMPR وقتی تبدیل روی PS5 بسته‌های دارایی را باز می‌کند، کنسول به ampr_emu نیاز دارد. برنامه فقط وقتی خودت بخواهی آن را آنجا می‌گذارد.", +"minion_ampr_emu_note": "برای نگه داشتن شبیه‌ساز AMPR وقتی تبدیل روی PS5 بسته‌های دارایی را باز می‌کند، کنسول به ampr_emu نیاز دارد. برنامه فقط وقتی خودتان بخواهید آن را آنجا می‌گذارد.", "minion_ampr_emu_put": "شبیه‌ساز AMPR را روی این PS5 بگذار", "minion_ampr_emu_done": "ampr_emu {version} روی این PS5 هست.", "remove_ps5u_console_busy": "PS5 مشغول کاری است که PS5Upload شروع کرده. صبر کنید تمام شود، سپس دوباره امتحان کنید.", @@ -7296,7 +7296,7 @@ library_compressed_hint: "برای اجرای ایمیج فشرده به ShadowM "fpkg.pkg_packs.title": "بسته‌های دارایی و AMPR", "fpkg.pkg_packs.pending": "اول یک بازی را زیر ① بررسی کنید. اگر در بسته‌های دارایی باشد، گزینه‌های باز کردن آن‌ها و کنار گذاشتن شبیه‌ساز AMPR اینجا نشان داده می‌شود.", "fpkg.pkg_packs.none": "این بازی بسته دارایی ندارد، پس چیزی برای باز کردن نیست.", -"fpkg.pkg_packs.unchecked": "این بازی زیر ① بررسی نشده است. اگر در بسته‌های دارایی باشد، در بسته بازشده قرار می‌گیرند. برای نگه داشتن بسته‌ها یا کنار گذاشتن شبیه‌ساز AMPR، بازی را زیر ① بررسی کنید و از همان‌جا اضافه‌اش کنید.", +"fpkg.pkg_packs.unchecked": "این بازی زیر ① بررسی نشده است. اگر در بسته‌های دارایی باشد، بسته آن‌ها را به‌صورت بازشده در خود دارد. برای نگه داشتن بسته‌ها یا کنار گذاشتن شبیه‌ساز AMPR، بازی را زیر ① بررسی کنید و از همان‌جا اضافه‌اش کنید.", "ampr_emu_add_hint": "این بازی فایل‌هایش را از طریق AMPR می‌خواند و شبیه‌ساز ندارد. برخی از این بازی‌ها بدون آن از ایمیج اجرا نمی‌شوند و برخی بدون مشکل کار می‌کنند. ampr_emu 0.4.2.1 از drakmor را اضافه می‌کند؛ یک بار گرفته و با چکیدهٔ شناخته‌شده بررسی می‌شود. ایمیج تغییر نمی‌کند: شبیه‌ساز در پوشهٔ backport از ShadowMount+ قرار می‌گیرد.", "ampr_emu_done_backport": "به‌صورت backport از ShadowMount+ در {folder} اضافه شد. ایمیج تغییر نکرد. برای امتحان، بازی را اجرا کنید.", "ampr_emu_done_folder": "به پوشهٔ بازی، {folder}، اضافه شد. برای امتحان، بازی را اجرا کنید.", diff --git a/client/src/i18n/locales/fr.ts b/client/src/i18n/locales/fr.ts index 1770006ec..d97cc9c35 100644 --- a/client/src/i18n/locales/fr.ts +++ b/client/src/i18n/locales/fr.ts @@ -3000,7 +3000,7 @@ library_mount_tooltip_smp: "Confier cette image à ShadowMount+, qui la monte et "pack_no_room_body": "Il faut {need} libres — le pack lui-même plus une sauvegarde de tout ce qu il remplace — et la console dispose de {free}.", "backport_overlay_backpork": "Le payload BackPork est en cours d exécution et occupe la superposition de bibliothèques. Arrêtez-le, puis renvoyez ps5upload.", "backport_overlay_foreign_mount": "Une autre superposition est déjà montée sur le dossier de bibliothèques de ce jeu. Redémarrez la console pour la libérer : arrêter le payload qui l a créée ne la démonte pas.", -"fakelibs_scan_not_backported_v2": "Jeux avec un fakelib/ dont la version n'a jamais été abaissée : {count}. Leurs fichiers ne sont pas un rétroportage et ont été ignorés.", +"fakelibs_scan_not_backported_v2": "Jeux avec un fakelib/ jamais rétrogradés : {count}. Leurs fichiers ne sont pas un rétroportage et ont été ignorés.", "cheats_filter_any_format": "Tous les formats", "cheats_filter_any_version": "Toutes les versions du jeu", "cheats_filter_installed_only": "Seulement mes jeux", @@ -3205,8 +3205,8 @@ library_mount_tooltip_smp: "Confier cette image à ShadowMount+, qui la monte et "pkg.reason.stream_proxy": "Le réglage proxy de la PS5 a bloqué le flux. Dans les paramètres réseau avancés de la PS5, règle le serveur proxy sur « Ne pas utiliser », ou utilise Envoyer et installer, qui lit le paquet depuis le stockage local de la PS5.", "pkg.reach_blocked": "La PS5 n’arrive pas à se connecter à cet ordinateur ({address}), elle ne peut donc pas récupérer le paquet.", "pkg.reach_no_fetch": "La PS5 a reçu le paquet et n’en avait rien récupéré depuis cet ordinateur ({address}) après {seconds} secondes, l’installation a donc été arrêtée.", -"pkg.reach_usual_cause": "Le plus souvent, le pare-feu de cet ordinateur la bloque : autorise PS5Upload dans le pare-feu (sous Windows, pour les réseaux privés et publics), puis appuie sur Réessayer.", -"pkg.reach_use_upload": "Ou appuie sur Réessayer par envoi, qui copie d’abord le paquet sur la PS5 et n’a pas besoin de connexion en retour.", +"pkg.reach_usual_cause": "Le plus souvent, le pare-feu de cet ordinateur la bloque : autorisez PS5Upload dans le pare-feu (sous Windows, pour les réseaux privés et publics), puis appuyez sur Réessayer.", +"pkg.reach_use_upload": "Ou appuyez sur Réessayer par envoi, qui copie d’abord le paquet sur la PS5 et n’a pas besoin de connexion en retour.", "pkg.wait_reach_check": "Vérification que la PS5 peut joindre cet ordinateur…", "pkg.wait_console_fetch": "En attente que la PS5 commence à récupérer le paquet depuis cet ordinateur…", "pkg.wait_previous_install": "L’installateur de la PS5 retient encore le dernier paquet qu’il n’a pas pu récupérer. Cette installation démarre toute seule quand il le lâche, dans {minutes} min au plus.", @@ -4483,7 +4483,7 @@ fs_chmod_done: "Permissions 777 appliquées à {count} élément(s)", "collection.send_tight": "Ça risque de ne pas tenir : la PS5 réserve plus d’espace pendant l’écriture.", "collection.send_to": "Vers {dest}", "collection.send_which": "Exemplaire", -"collection.uptodate_banner_v2": "Jeux avec une mise à jour que cette PS5 peut recevoir de ta collection : {u}. Jeux avec des DLC à ajouter : {d}.", +"collection.uptodate_banner_v2": "Jeux avec une mise à jour que cette PS5 peut recevoir de votre collection : {u}. Jeux avec des DLC à ajouter : {d}.", queue_stop_install: "Arrêter cette installation", queue_stop_install_body: "ps5upload arrête d’envoyer le paquet et le retire de la file. Si la PS5 affiche encore le téléchargement, supprime-le dans ses Téléchargements.", queue_stop_install_ok: "Arrêter l’installation", @@ -5339,7 +5339,7 @@ install_path_fallback_label: "Installer par chemin de fichier quand la PS5 ne pe "installed_fix_permissions_done": "Permissions corrigées : chaque fichier du dossier de ce jeu est maintenant en 0777. Appuie sur Jouer.", "installed_fix_permissions_short": "Corriger les permissions", "installed_launch_homebrew_refused": "La PS5 a refusé de lancer ce jeu (0x80940033). La console ne lance pas de homebrew ni de jeux en faux paquet pour le moment : recharge kstuff (ou redémarre et relance le jailbreak), puis appuie à nouveau sur Jouer.", -"fakegame.fw.launch_kstuff_v2": "Si ce jeu a été installé depuis un faux paquet : sur le FW {fw}, il ne démarre qu'avec kstuff 1.15 ou plus récent. La copie du catalogue peut être plus ancienne : récupère kstuff 1.15 auprès de son auteur, envoie-le avec « Envoyer un payload », puis appuie à nouveau sur Jouer.", +"fakegame.fw.launch_kstuff_v2": "Si ce jeu a été installé depuis un faux paquet : sur le FW {fw}, il ne démarre qu'avec kstuff 1.15 ou plus récent. La copie du catalogue peut être plus ancienne : récupérez kstuff 1.15 auprès de son auteur, envoyez-le avec « Envoyer un payload », puis appuyez à nouveau sur Jouer.", "installed_launch_no_kstuff": "La PS5 a refusé de lancer ce jeu (0x80940033) car kstuff n'est pas en cours d'exécution. Sans lui, la console ne lance aucun homebrew ni jeu en faux paquet. Charge kstuff (ton autoloader, ou Connexion → Configurer) et appuie à nouveau sur Jouer.", job_why_lanes: "Connexions : {avg} en moyenne, {max} au maximum ; bloc {chunk}", job_why_loading: "Chargement…", @@ -9057,7 +9057,7 @@ rp_users_add_hint: "Pour jouer aussi avec un autre utilisateur, connectez-vous "receive_stream": "Réglages du flux", "receive_stream_body": "Gardés avec les autres éléments reçus.", "receive_data_unreadable": "Une partie est inutilisable", -"receive_data_unreadable_body": "Une partie de ce que ton ami a envoyé n'est pas dans un format que cette app lit, elle a donc été laissée de côté.", +"receive_data_unreadable_body": "Une partie de ce que votre ami a envoyé n'est pas dans un format que cette app lit, elle a donc été laissée de côté.", "receive_intro_v2": "Collez son lien. Vous voyez ce qui est proposé avant que rien n'arrive.", "receive_pick": "Quoi prendre", "receive_total": "{size} au total", diff --git a/client/src/i18n/locales/hi.ts b/client/src/i18n/locales/hi.ts index bc29b9fb2..ebecb0adf 100644 --- a/client/src/i18n/locales/hi.ts +++ b/client/src/i18n/locales/hi.ts @@ -1983,8 +1983,8 @@ settings_section_reset: "रीसेट", picker_choose_file: "फ़ाइल चुनें", picker_grant_title: "अपनी फ़ाइलों तक पहुँच दें", picker_grant_hint: - "गेम फ़ोल्डर या .zip अपलोड करने के लिए PS5Upload को आपकी फ़ाइलें पढ़ने की अनुमति चाहिए। नीचे टैप करें, “Allow access to manage all files” सक्षम करें, फिर वापस आकर Retry टैप करें।", - picker_grant_hint_prompt: "गेम फ़ोल्डर या .zip अपलोड करने के लिए PS5Upload को आपकी फ़ाइलें पढ़ने की अनुमति चाहिए। “अनुमति दें” पर टैप करें, प्रॉम्प्ट में हाँ कहें, फिर “पुनः प्रयास करें” पर टैप करें।", + "गेम फ़ोल्डर या .zip अपलोड करने के लिए PS5Upload को आपकी फ़ाइलें पढ़ने की अनुमति चाहिए। नीचे टैप करें, “सभी फ़ाइलें मैनेज करने की अनुमति दें” चालू करें, फिर वापस आकर “पुनः प्रयास” टैप करें।", + picker_grant_hint_prompt: "गेम फ़ोल्डर या .zip अपलोड करने के लिए PS5Upload को आपकी फ़ाइलें पढ़ने की अनुमति चाहिए। “अनुमति दें” पर टैप करें, प्रॉम्प्ट में हाँ कहें, फिर “पुनः प्रयास” पर टैप करें।", picker_open_settings: "सेटिंग्स खोलें", picker_allow: "अनुमति दें", picker_retry: "पुनः प्रयास", @@ -2232,7 +2232,7 @@ engine_restart_go: "इंजन फिर से शुरू करें", engine_restart_done: "इंजन फिर से शुरू हो गया।", engine_url_runs_elsewhere: "इस कंप्यूटर का इंजन {running} पर चल रहा है। इसे {wanted} पर ले जाने के लिए इंजन फिर से शुरू करें।", engine_err_in_app_failed: "ऐप के अंदर का इंजन शुरू नहीं हुआ: {detail}", -engine_err_in_app_blocked: "ऐप के अंदर का इंजन चल रहा है, लेकिन इस डिवाइस ने ऐप का उससे कनेक्शन रोक दिया ({detail})। VPN, ऐड ब्लॉकर या कंटेंट फ़िल्टर ऐसा कर सकता है: उसे बंद करें, फिर फिर से कोशिश करें दबाएँ। डिवाइस रीस्टार्ट करने से भी मदद मिल सकती है।", +engine_err_in_app_blocked: "ऐप के अंदर का इंजन चल रहा है, लेकिन इस डिवाइस ने ऐप का उससे कनेक्शन रोक दिया ({detail})। VPN, ऐड ब्लॉकर या कंटेंट फ़िल्टर ऐसा कर सकता है: उसे बंद करें, फिर “फिर से कोशिश करें” दबाएँ। डिवाइस रीस्टार्ट करने से भी मदद मिल सकती है।", engine_err_not_ready: "इंजन {seconds} सेकंड में शुरू नहीं हुआ।", engine_err_hint_windows: "आम कारण: SmartScreen या एंटीवायरस ने इंजन प्रोग्राम को रोक दिया, फ़ायरवॉल इस कंप्यूटर के अपने कनेक्शन रोक रहा है, या कोई पोर्ट ख़ाली नहीं था।", engine_err_hint_macos: "आम कारण: सुरक्षा या फ़ायरवॉल सॉफ़्टवेयर (Little Snitch, LuLu, वेब सुरक्षा वाला एंटीवायरस) ps5upload-engine को रोक रहा है। इसे अनुमति दें और ऐप फिर से शुरू करें।", @@ -3203,7 +3203,7 @@ library_mount_tooltip_smp: "यह इमेज ShadowMount+ को सौंप "pkg.reason.stream_proxy": "PS5 की प्रॉक्सी सेटिंग ने स्ट्रीम रोक दी। PS5 की नेटवर्क उन्नत सेटिंग में प्रॉक्सी सर्वर को “उपयोग न करें” पर सेट करें, या अपलोड करें और इंस्टॉल करें का उपयोग करें, जो पैकेज को PS5 के लोकल स्टोरेज से पढ़ता है।", "pkg.reach_blocked": "PS5 इस कंप्यूटर ({address}) से कनेक्ट नहीं हो पा रहा है, इसलिए पैकेज नहीं ला सकता।", "pkg.reach_no_fetch": "PS5 को पैकेज दिया गया था और {seconds} सेकंड बाद भी उसने इस कंप्यूटर ({address}) से उसका कुछ भी नहीं लिया, इसलिए इंस्टॉल रोक दिया गया।", -"pkg.reach_usual_cause": "अक्सर इस कंप्यूटर का फ़ायरवॉल इसे रोकता है: फ़ायरवॉल में PS5Upload को अनुमति दें (Windows पर निजी और सार्वजनिक दोनों नेटवर्क के लिए), फिर पुनः प्रयास दबाएँ।", +"pkg.reach_usual_cause": "अक्सर इस कंप्यूटर का फ़ायरवॉल इसे रोकता है: फ़ायरवॉल में PS5Upload को अनुमति दें (Windows पर निजी और सार्वजनिक दोनों नेटवर्क के लिए), फिर “फिर से कोशिश करें” दबाएँ।", "pkg.reach_use_upload": "या अपलोड करके फिर से कोशिश करें दबाएँ, जो पैकेज को पहले PS5 पर कॉपी करता है और जिसे वापसी कनेक्शन की ज़रूरत नहीं होती।", "pkg.wait_reach_check": "जाँच हो रही है कि PS5 इस कंप्यूटर तक पहुँच सकता है…", "pkg.wait_console_fetch": "PS5 के इस कंप्यूटर से पैकेज लाना शुरू करने की प्रतीक्षा…", @@ -5337,7 +5337,7 @@ install_path_fallback_label: "जब PS5 इस कंप्यूटर तक "installed_fix_permissions_done": "अनुमतियाँ ठीक कर दी गईं: इस गेम के फ़ोल्डर की हर फ़ाइल अब 0777 है। चलाएँ दबाएँ।", "installed_fix_permissions_short": "अनुमतियाँ ठीक करें", "installed_launch_homebrew_refused": "PS5 ने यह गेम शुरू करने से मना कर दिया (0x80940033)। कंसोल अभी homebrew या नकली-पैकेज गेम शुरू नहीं कर रहा है: kstuff दोबारा लोड करें (या रीबूट करके फिर से जेलब्रेक चलाएँ), फिर दोबारा चलाएँ दबाएँ।", -"fakegame.fw.launch_kstuff_v2": "अगर यह गेम नकली पैकेज से इंस्टॉल हुआ है: FW {fw} पर यह सिर्फ़ kstuff 1.15 या नए से शुरू होता है। कैटलॉग की कॉपी पुरानी हो सकती है: kstuff 1.15 उसके लेखक से लें, “पेलोड भेजें” से भेजें, फिर दोबारा चलाएँ दबाएँ।", +"fakegame.fw.launch_kstuff_v2": "अगर यह गेम नकली पैकेज से इंस्टॉल हुआ है: FW {fw} पर यह सिर्फ़ kstuff 1.15 या नए से शुरू होता है। कैटलॉग की कॉपी पुरानी हो सकती है: kstuff 1.15 उसके लेखक से लें, “पेलोड भेजें” से भेजें, फिर दोबारा “खेलें” दबाएँ।", "installed_launch_no_kstuff": "PS5 ने यह गेम शुरू करने से मना कर दिया (0x80940033) क्योंकि kstuff नहीं चल रहा है। इसके बिना कंसोल कोई homebrew या नकली-पैकेज गेम शुरू नहीं करता। kstuff लोड करें (आपका autoloader, या कनेक्शन → सेट करें) और दोबारा चलाएँ दबाएँ।", job_why_lanes: "कनेक्शन: औसतन {avg}, अधिकतम {max}; चंक {chunk}", job_why_loading: "लोड हो रहा है…", diff --git a/client/src/i18n/locales/hu.ts b/client/src/i18n/locales/hu.ts index f82a587b8..d20900705 100644 --- a/client/src/i18n/locales/hu.ts +++ b/client/src/i18n/locales/hu.ts @@ -3728,7 +3728,7 @@ task_recheck: "Újraellenőrzés", "pkg.reason.stream_proxy": "A PS5 proxybeállítása blokkolta a streamet. A PS5 hálózati speciális beállításaiban állítsd a proxykiszolgálót „Nem használ” értékre, vagy használd a Feltöltés és telepítés lehetőséget, amely a PS5 helyi tárhelyéről olvassa a csomagot.", "pkg.reach_blocked": "A PS5 nem tud kapcsolódni ehhez a számítógéphez ({address}), ezért nem tudja letölteni a csomagot.", "pkg.reach_no_fetch": "A PS5 megkapta a csomagot, de {seconds} másodperc után sem töltött le belőle semmit erről a számítógépről ({address}), ezért a telepítés leállt.", -"pkg.reach_usual_cause": "Legtöbbször a számítógép tűzfala blokkolja: engedélyezd a PS5Uploadot a tűzfalon (Windowson a magán- és a nyilvános hálózatokra is), majd nyomd meg az Újrapróbálkozás gombot.", +"pkg.reach_usual_cause": "Legtöbbször a számítógép tűzfala blokkolja: engedélyezd a PS5Uploadot a tűzfalon (Windowson a magán- és a nyilvános hálózatokra is), majd nyomd meg az Újra gombot.", "pkg.reach_use_upload": "Vagy nyomd meg az Újra feltöltéssel gombot: ez előbb a PS5-re másolja a csomagot, és nem kell hozzá visszafelé irányuló kapcsolat.", "pkg.wait_reach_check": "Annak ellenőrzése, hogy a PS5 eléri-e ezt a számítógépet…", "pkg.wait_console_fetch": "Várakozás, hogy a PS5 elkezdje letölteni a csomagot erről a számítógépről…", @@ -4332,7 +4332,7 @@ shell_description_v2: "Írj be parancsokat, amelyek a PS5-ön, a segédfolyamato "fpkg.card.options_v2": "③ Beállítások", "fpkg.card.run_v2": "④ Készítés és telepítés", "fpkg.options.image": "Képfájl", -"fpkg.make.pkg_title_v2": "Egy hamis csomag (FPKG, .pkg)", +"fpkg.make.pkg_title_v2": "Hamis csomag (FPKG, .pkg)", "fpkg.make.pkg_body_v5": "Hamis csomag (FPKG). A PS5-re úgy települ, mint egy áruházi játék, innen streamelve vagy előbb feltöltve. A PS4 játékok minden firmware-en futnak. Egy telepített PS5 játék 13.60 firmware-ig fut; 11.60 felett kstuff 1.15 vagy újabb kell.", "fpkg.make.ps4_pkg_title_v2": "PS4-es hamis csomag (FPKG, .pkg)", "fpkg.make.ps4_pkg_body": "PS4-es fake csomag, amelyet a PS5 úgy telepít, mint egy játékot az áruházból, innen streamelve vagy előbb feltöltve. A szokásos fake kulcsokkal készül, és megtartás előtt visszaolvasásra kerül.", diff --git a/client/src/i18n/locales/id.ts b/client/src/i18n/locales/id.ts index 2e4fa1d39..37237ba0c 100644 --- a/client/src/i18n/locales/id.ts +++ b/client/src/i18n/locales/id.ts @@ -1985,7 +1985,7 @@ gate_send_helper_cta: "Buka Koneksi", picker_choose_folder: "Pilih folder", picker_choose_file: "Pilih berkas", picker_grant_title: "Izinkan akses ke berkas Anda", -picker_grant_hint: "Untuk mengunggah folder game atau .zip, PS5Upload memerlukan izin membaca berkas Anda. Ketuk di bawah, aktifkan “Allow access to manage all files”, lalu kembali dan ketuk Coba lagi.", +picker_grant_hint: "Untuk mengunggah folder game atau .zip, PS5Upload memerlukan izin membaca berkas Anda. Ketuk di bawah, aktifkan “Izinkan akses untuk mengelola semua file”, lalu kembali dan ketuk Coba lagi.", picker_grant_hint_prompt: "Untuk mengunggah folder game atau .zip, PS5Upload memerlukan izin membaca berkas Anda. Ketuk Izinkan, setujui di dialog yang muncul, lalu ketuk Coba lagi.", picker_open_settings: "Buka pengaturan", picker_allow: "Izinkan", @@ -2993,7 +2993,7 @@ library_mount_tooltip_smp: "Serahkan image ini ke ShadowMount+, yang memasang da "pack_no_room_body": "Ini memerlukan {need} ruang kosong — paketnya sendiri ditambah cadangan dari semua yang digantinya — sementara konsol punya {free}.", "backport_overlay_backpork": "Payload BackPork sedang berjalan dan menguasai hamparan pustaka. Hentikan dulu, lalu kirim ulang ps5upload.", "backport_overlay_foreign_mount": "Hamparan lain sudah terpasang pada folder pustaka gim ini. Mulai ulang konsol untuk membersihkannya — menutup payload yang membuatnya tidak melepas pemasangan itu.", -"fakelibs_scan_not_backported_v2": "Gim dengan fakelib/ yang versinya tidak pernah diturunkan: {count}. Berkasnya bukan backport dan dilewati.", +"fakelibs_scan_not_backported_v2": "Game dengan fakelib/ yang versinya tidak pernah diturunkan: {count}. File-nya bukan backport dan dilewati.", "cheats_filter_any_format": "Format apa saja", "cheats_filter_any_version": "Versi gim apa saja", "cheats_filter_installed_only": "Hanya gim saya", @@ -3075,7 +3075,7 @@ library_mount_tooltip_smp: "Serahkan image ini ke ShadowMount+, yang memasang da "fpkg.language": "Bahasa game", "fpkg.languageOwn": "Bahasa milik game itu sendiri", "fpkg.languageEvery": "Semua bahasa", -"fpkg.languageEveryHint": "Paket lalu menyatakan semua 31 bahasa, dan PS5 mungkin menampilkan paket bahasa untuk masing-masing saat kamu mengelola konten game.", +"fpkg.languageEveryHint": "Paket lalu menyatakan semua 31 bahasa, dan PS5 mungkin menampilkan paket bahasa untuk masing-masing saat Anda mengelola konten game.", "fpkg.languageHint": "Sebagian besar game mengikuti bahasa konsol. Pilih satu hanya untuk game yang tetap berbahasa Inggris di konsol dengan bahasa lain: paket lalu memberi tahu game bahwa bahasa itulah yang terpasang. Game harus menyertakan bahasa tersebut.", "fpkg.timeLeft": "{time} lagi", "fpkg.installedTitle": "Terpasang di PS5 — {title}", @@ -3197,7 +3197,7 @@ library_mount_tooltip_smp: "Serahkan image ini ke ShadowMount+, yang memasang da "pkg.reason.stream_unreachable": "PS5 tidak pernah menjangkau komputer ini untuk mengambil paket. Izinkan ps5upload di firewall komputer ini (di Windows, untuk jaringan Privat dan Publik), tempatkan komputer dan PS5 di jaringan yang sama tanpa VPN, dan setel Server Proxy PS5 ke “Jangan Gunakan”. Unggah & pasang bisa berjalan tanpa koneksi ini.", "pkg.reason.stream_proxy": "Pengaturan proxy PS5 memblokir stream. Di Pengaturan Lanjutan jaringan PS5, setel Server Proxy ke “Jangan Gunakan”, atau pakai Unggah & pasang, yang membaca paket dari penyimpanan lokal PS5.", "pkg.reach_blocked": "PS5 tidak dapat terhubung ke komputer ini ({address}), jadi tidak bisa mengambil paket.", -"pkg.reach_no_fetch": "PS5 sudah diberi paket dan setelah {seconds} detik belum mengambil apa pun darinya dari komputer ini ({address}), jadi pemasangan dihentikan.", +"pkg.reach_no_fetch": "PS5 sudah diberi paket, tetapi setelah {seconds} detik belum mengambil sedikit pun dari komputer ini ({address}), jadi pemasangan dihentikan.", "pkg.reach_usual_cause": "Paling sering firewall komputer ini yang memblokirnya: izinkan PS5Upload di firewall (di Windows, untuk jaringan Privat dan Publik), lalu tekan Coba lagi.", "pkg.reach_use_upload": "Atau tekan Coba lagi lewat unggah, yang menyalin paket ke PS5 lebih dulu dan tidak memerlukan koneksi balik.", "pkg.wait_reach_check": "Memeriksa apakah PS5 dapat menjangkau komputer ini…", @@ -4476,7 +4476,7 @@ fs_chmod_done: "Izin 777 diterapkan pada {count} item", "collection.send_tight": "Mungkin tidak muat: PS5 menyisihkan lebih banyak ruang saat menulis.", "collection.send_to": "Ke {dest}", "collection.send_which": "Salinan", -"collection.uptodate_banner_v2": "Game dengan pembaruan yang bisa diterima PS5 ini dari koleksimu: {u}. Game dengan DLC untuk ditambahkan: {d}.", +"collection.uptodate_banner_v2": "Game dengan pembaruan yang bisa diterima PS5 ini dari koleksi Anda: {u}. Game dengan DLC untuk ditambahkan: {d}.", queue_stop_install: "Hentikan pemasangan ini", queue_stop_install_body: "ps5upload berhenti mengirim paket dan mengeluarkannya dari antrean. Jika PS5 masih menampilkan unduhan, hapus di Unduhan PS5.", queue_stop_install_ok: "Hentikan pemasangan", @@ -5578,7 +5578,7 @@ c2c_test_deep_bad: "Kiriman uji 4 KiB tidak tiba: {detail}", "cq_tag_lz4": "LZ4", "cq_tag_unpack": "diekstrak", "cq_tag_no_emulator": "tanpa emulator AMPR", -"cq_tag_free_archive": "hapus arsip", +"cq_tag_free_archive": "menghapus arsip", "cq_tag_level_fast": "cepat", "cq_tag_level_balanced": "seimbang", "cq_tag_level_smallest": "terkecil", @@ -6660,7 +6660,7 @@ library_compressed_hint: "Image terkompresi memerlukan ShadowMount+ untuk bermai "minion_zstd_runtime_note": "Konversi di PS5 butuh runtime zstd (ampr-emu-ng) di konsol untuk menulis paket zstd. Aplikasi menaruhnya di sana sendiri saat PS5 ini terhubung.", "minion_zstd_runtime_put": "Taruh runtime zstd di PS5 ini", "minion_zstd_runtime_done": "ampr-emu-ng {version} sudah ada di PS5 ini.", -"minion_ampr_emu_note": "Agar Konversi di PS5 bisa tetap memakai emulator AMPR saat membongkar paket aset, konsol butuh ampr_emu. Aplikasi hanya menaruhnya di sana kalau kamu memintanya.", +"minion_ampr_emu_note": "Agar Konversi di PS5 bisa tetap memakai emulator AMPR saat membongkar paket aset, konsol butuh ampr_emu. Aplikasi hanya menaruhnya di sana kalau Anda memintanya.", "minion_ampr_emu_put": "Taruh emulator AMPR di PS5 ini", "minion_ampr_emu_done": "ampr_emu {version} sudah ada di PS5 ini.", "remove_ps5u_console_busy": "PS5 sedang mengerjakan sesuatu yang dimulai PS5Upload. Tunggu sampai selesai, lalu coba lagi.", @@ -7027,7 +7027,7 @@ library_compressed_hint: "Image terkompresi memerlukan ShadowMount+ untuk bermai "fpkg.pkg_packs.title": "Paket aset dan AMPR", "fpkg.pkg_packs.pending": "Periksa dulu sebuah game di bawah ①. Jika game itu ada dalam paket aset, opsi untuk membongkarnya dan untuk tidak menyertakan emulator AMPR muncul di sini.", "fpkg.pkg_packs.none": "Game ini tidak punya paket aset, jadi tidak ada yang perlu dibongkar.", -"fpkg.pkg_packs.unchecked": "Game ini belum diperiksa di bawah ①. Jika ada dalam paket aset, paket itu dibongkar ke dalam paketnya. Untuk mempertahankan paket aset atau tidak menyertakan emulator AMPR, periksa game di bawah ① dan tambahkan dari sana.", +"fpkg.pkg_packs.unchecked": "Game ini belum diperiksa di bawah ①. Jika game ada dalam paket aset, paket aset itu masuk ke paket .pkg dalam keadaan dibongkar. Untuk mempertahankan paket aset atau tidak menyertakan emulator AMPR, periksa game di bawah ① dan tambahkan dari sana.", "ampr_emu_add_hint": "Game ini membaca berkasnya lewat AMPR dan tidak punya emulator. Beberapa game seperti ini tidak mau mulai dari image tanpanya, yang lain berjalan baik. Menambahkan ampr_emu 0.4.2.1 milik drakmor, diunduh sekali dan dicek dengan digest yang dikenal. Image tidak berubah: emulator masuk ke folder backport ShadowMount+.", "ampr_emu_done_backport": "Ditambahkan sebagai backport ShadowMount+ di {folder}. Image tidak berubah. Mulai game untuk mencobanya.", "ampr_emu_done_folder": "Ditambahkan ke folder game, {folder}. Mulai game untuk mencobanya.", @@ -9050,7 +9050,7 @@ rp_users_add_hint: "Untuk bermain juga sebagai pengguna lain, masuk ke pengguna "receive_stream": "Pengaturan stream", "receive_stream_body": "Disimpan bersama hal lain yang kamu terima.", "receive_data_unreadable": "Sebagian tidak bisa dipakai", -"receive_data_unreadable_body": "Sebagian yang dikirim temanmu tidak dalam bentuk yang bisa dibaca aplikasi ini, jadi dilewati.", +"receive_data_unreadable_body": "Sebagian yang dikirim teman Anda tidak dalam bentuk yang bisa dibaca aplikasi ini, jadi dilewati.", "receive_intro_v2": "Tempel tautan darinya. Kamu melihat yang ditawarkan sebelum apa pun tiba.", "receive_pick": "Yang diambil", "receive_total": "Total {size}", diff --git a/client/src/i18n/locales/ja.ts b/client/src/i18n/locales/ja.ts index 2c97aecc0..9411b5497 100644 --- a/client/src/i18n/locales/ja.ts +++ b/client/src/i18n/locales/ja.ts @@ -328,7 +328,7 @@ fs_cancel_clipboard: "キャンセル — ステージングを破棄", fs_staged_bar: "貼り付ける項目", fs_staged_move: "移動する項目: {count}", fs_staged_copy: "コピーする項目: {count}", -fs_staged_from: "移動元: {path}", +fs_staged_from: "元の場所: {path}", fs_paste_done_move: "移動した項目: {count}", fs_paste_done_copy: "コピーした項目: {count}", fs_paste_failed: "貼り付けられなかった項目: {count}", @@ -1989,7 +1989,7 @@ settings_section_reset: "リセット", picker_choose_file: "ファイルを選択", picker_grant_title: "ファイルへのアクセスを許可", picker_grant_hint: - "ゲームフォルダや .zip をアップロードするには、PS5Upload にファイルの読み取り許可が必要です。下をタップして「すべてのファイルの管理を許可」を有効にし、戻ってから「再試行」をタップしてください。", + "ゲームフォルダーや .zip をアップロードするには、PS5Upload にファイルの読み取り許可が必要です。下をタップして「すべてのファイルの管理を許可」を有効にし、戻ってから「再試行」をタップしてください。", picker_grant_hint_prompt: "ゲームフォルダーや .zip をアップロードするには、PS5Upload にファイルの読み取りを許可する必要があります。「許可」をタップし、表示された確認で許可してから「再試行」をタップしてください。", picker_open_settings: "設定を開く", picker_allow: "許可", diff --git a/client/src/i18n/locales/ko.ts b/client/src/i18n/locales/ko.ts index fd8e44fa0..68657dde7 100644 --- a/client/src/i18n/locales/ko.ts +++ b/client/src/i18n/locales/ko.ts @@ -1989,7 +1989,7 @@ settings_section_reset: "초기화", picker_grant_title: "파일 접근 허용", picker_grant_hint: "게임 폴더나 .zip을 업로드하려면 PS5Upload에 파일 읽기 권한이 필요합니다. 아래를 탭하고 “모든 파일에 대한 액세스 허용”을 켠 뒤 돌아와서 재시도를 탭하세요.", - picker_grant_hint_prompt: "게임 폴더나 .zip을 업로드하려면 PS5Upload에 파일 읽기 권한이 필요합니다. 허용을 탭하고 표시되는 요청에 동의한 뒤 다시 시도를 탭하세요.", + picker_grant_hint_prompt: "게임 폴더나 .zip을 업로드하려면 PS5Upload에 파일 읽기 권한이 필요합니다. 허용을 탭하고 표시되는 요청에 동의한 뒤 재시도를 탭하세요.", picker_open_settings: "설정 열기", picker_allow: "허용", picker_retry: "재시도", @@ -3001,7 +3001,7 @@ library_mount_tooltip_smp: "이 이미지를 ShadowMount+에 넘깁니다. 마 "pack_no_room_body": "{need} 의 여유 공간이 필요합니다 — 팩 자체와 교체되는 모든 항목의 백업까지 포함해서 — 본체에는 {free} 이 있습니다.", "backport_overlay_backpork": "BackPork 페이로드가 실행 중이며 라이브러리 오버레이를 점유하고 있습니다. 중지한 뒤 ps5upload 를 다시 보내세요.", "backport_overlay_foreign_mount": "이 게임의 라이브러리 폴더에 다른 오버레이가 이미 마운트되어 있습니다. 본체를 재시작해 해제하세요. 오버레이를 만든 페이로드를 종료해도 마운트는 해제되지 않습니다.", -"fakelibs_scan_not_backported_v2": "fakelib/ 가 있지만 다운그레이드된 적이 없는 게임: {count}. 그 파일은 백포트가 아니므로 건너뛰었습니다.", +"fakelibs_scan_not_backported_v2": "fakelib/가 있지만 다운그레이드된 적이 없는 게임: {count}. 그 파일은 백포트가 아니므로 건너뛰었습니다.", "cheats_filter_any_format": "모든 형식", "cheats_filter_any_version": "모든 게임 버전", "cheats_filter_installed_only": "내 게임만", @@ -5340,7 +5340,7 @@ install_path_fallback_label: "PS5가 이 컴퓨터에 연결할 수 없을 때 "installed_fix_permissions_done": "권한이 수정되었습니다. 이 게임 폴더의 모든 파일이 이제 0777입니다. 실행을 누르세요.", "installed_fix_permissions_short": "권한 수정", "installed_launch_homebrew_refused": "PS5가 이 게임의 시작을 거부했습니다(0x80940033). 지금 본체가 홈브루나 가짜 패키지 게임을 시작하지 않는 상태입니다. kstuff를 다시 로드한 다음(또는 재부팅 후 탈옥을 다시 실행한 다음) 실행을 다시 누르세요.", -"fakegame.fw.launch_kstuff_v2": "이 게임을 가짜 패키지로 설치했다면: FW {fw}에서는 kstuff 1.15 이상으로만 시작됩니다. 카탈로그의 것은 더 오래된 버전일 수 있습니다. 제작자에게서 kstuff 1.15를 받아 ‘페이로드 전송’으로 보낸 뒤 실행을 다시 누르세요.", +"fakegame.fw.launch_kstuff_v2": "이 게임을 가짜 패키지로 설치했다면: FW {fw}에서는 kstuff 1.15 이상으로만 시작됩니다. 카탈로그의 것은 더 오래된 버전일 수 있습니다. 제작자에게서 kstuff 1.15를 받아 ‘페이로드 전송’으로 보낸 뒤 플레이를 다시 누르세요.", "installed_launch_no_kstuff": "kstuff가 실행 중이 아니어서 PS5가 이 게임의 시작을 거부했습니다(0x80940033). kstuff가 없으면 본체는 홈브루나 가짜 패키지 게임을 시작하지 않습니다. kstuff를 로드하고(오토로더, 또는 연결 → 설정) 실행을 다시 누르세요.", job_why_lanes: "연결: 평균 {avg}개, 최대 {max}개, 청크 {chunk}", job_why_loading: "불러오는 중…", diff --git a/client/src/i18n/locales/pl.ts b/client/src/i18n/locales/pl.ts index 1ac80cb5b..263f25276 100644 --- a/client/src/i18n/locales/pl.ts +++ b/client/src/i18n/locales/pl.ts @@ -9512,12 +9512,12 @@ rp_users_add_hint: "Aby grać także jako inny użytkownik, zaloguj się na nim "helper_auto_wait_loader": "Nie można samodzielnie zaktualizować pomocnika: loader payloadów PS5 (port 9021) nie odpowiada. Uruchom pomocnika z loadera payloadów na PS5 albo załaduj elfldr, a zaktualizuje się sam.", "helper_auto_wait_soon": "Aplikacja za chwilę sama zaktualizuje pomocnika.", "helper_update_title": "Pomocnik na PS5 jest nieaktualny", -"helper_update_body": "To PS5 ma pomocnika v{helper}. Ta aplikacja to v{app}. Zaktualizuj pomocnika, aby działały nowe poprawki i funkcje.", +"helper_update_body": "Ta PS5 ma pomocnika v{helper}. Ta aplikacja to v{app}. Zaktualizuj pomocnika, aby działały nowe poprawki i funkcje.", "helper_update_action": "Zaktualizuj pomocnika", -"helper_update_hold_transfer": "Na tym PS5 trwa przesyłanie lub instalacja, a nowy pomocnik by to przerwał. Zaktualizuj pomocnika, gdy się zakończy.", -"helper_update_hold_launch": "Na tym PS5 uruchamia się gra. Zaktualizuj pomocnika, gdy już będzie działać.", -"helper_update_hold_stream": "Ta aplikacja pokazuje ekran tego PS5, a nowy pomocnik by to przerwał. Zaktualizuj pomocnika po jego zamknięciu.", -"helper_update_hold_busy": "Ta aplikacja nadal konfiguruje to PS5. Zaktualizuj pomocnika, gdy skończy.", +"helper_update_hold_transfer": "Na tej PS5 trwa przesyłanie lub instalacja, a nowy pomocnik by to przerwał. Zaktualizuj pomocnika, gdy się zakończy.", +"helper_update_hold_launch": "Na tej PS5 uruchamia się gra. Zaktualizuj pomocnika, gdy już będzie działać.", +"helper_update_hold_stream": "Ta aplikacja pokazuje ekran tej PS5, a nowy pomocnik by to przerwał. Zaktualizuj pomocnika po zamknięciu podglądu.", +"helper_update_hold_busy": "Ta aplikacja nadal konfiguruje tę PS5. Zaktualizuj pomocnika, gdy skończy.", "reconnect_why_setting_off": "Nie wysłano samodzielnie: Automatyczne ponowne łączenie jest wyłączone dla tego PS5 (Ustawienia tego PS5).", "reconnect_why_busy": "Przesyłanie do tego PS5 nadal trwa, więc pomocnik nie jest wysyłany w jego trakcie. Zostanie wysłany sam, gdy się zakończy.", "reconnect_why_loader_closed": "Nie wysłano samodzielnie: loader payloadów PS5 (port 9021) nie odpowiada, więc nic nie może przyjąć pomocnika. Załaduj elfldr na PS5 (robi to jailbreak lub autoloader), a pomocnik podąży sam.", diff --git a/client/src/i18n/locales/pt-BR.ts b/client/src/i18n/locales/pt-BR.ts index 6e85f19cd..62c305102 100644 --- a/client/src/i18n/locales/pt-BR.ts +++ b/client/src/i18n/locales/pt-BR.ts @@ -5338,7 +5338,7 @@ install_path_fallback_label: "Instalar pelo caminho do arquivo quando o PS5 não "installed_fix_permissions_done": "Permissões corrigidas: todos os arquivos na pasta deste jogo agora são 0777. Pressione Jogar.", "installed_fix_permissions_short": "Corrigir permissões", "installed_launch_homebrew_refused": "O PS5 se recusou a iniciar este jogo (0x80940033). O console não está iniciando homebrew nem jogos de pacotes falsos no momento: recarregue o kstuff (ou reinicie e execute o jailbreak novamente) e pressione Jogar de novo.", -"fakegame.fw.launch_kstuff_v2": "Se este jogo foi instalado de um pacote falso: no FW {fw} ele só abre com o kstuff 1.15 ou mais novo. A cópia do catálogo pode ser mais antiga: pegue o kstuff 1.15 com o autor, envie com “Enviar payload” e toque em Jogar de novo.", +"fakegame.fw.launch_kstuff_v2": "Se este jogo foi instalado de um pacote falso: no FW {fw} ele só abre com o kstuff 1.15 ou mais novo. A cópia do catálogo pode ser mais antiga: pegue o kstuff 1.15 com o autor, envie com “Enviar payload” e toque de novo em Jogar.", "installed_launch_no_kstuff": "O PS5 se recusou a iniciar este jogo (0x80940033) porque o kstuff não está em execução. Sem ele, o console não inicia nenhum homebrew nem jogo de pacote falso. Carregue o kstuff (seu autoloader, ou Conexão → Configurar) e pressione Jogar de novo.", job_why_lanes: "Conexões: {avg} em média, {max} no máximo; bloco {chunk}", job_why_loading: "Carregando…", diff --git a/client/src/i18n/locales/th.ts b/client/src/i18n/locales/th.ts index 26983ccf3..95e8ce1c2 100644 --- a/client/src/i18n/locales/th.ts +++ b/client/src/i18n/locales/th.ts @@ -1979,8 +1979,8 @@ settings_section_reset: "รีเซ็ต", picker_choose_file: "เลือกไฟล์", picker_grant_title: "อนุญาตการเข้าถึงไฟล์ของคุณ", picker_grant_hint: - "หากต้องการอัปโหลดโฟลเดอร์เกมหรือไฟล์ .zip PS5Upload ต้องได้รับสิทธิ์อ่านไฟล์ของคุณ แตะด้านล่าง เปิดใช้ “Allow access to manage all files” แล้วกลับมาแตะ Retry", - picker_grant_hint_prompt: "หากต้องการอัปโหลดโฟลเดอร์เกมหรือ .zip PS5Upload ต้องได้รับอนุญาตให้อ่านไฟล์ของคุณ แตะ อนุญาต ตอบตกลงในหน้าต่างที่ขึ้นมา แล้วแตะ ลองอีกครั้ง", + "หากต้องการอัปโหลดโฟลเดอร์เกมหรือไฟล์ .zip PS5Upload ต้องได้รับสิทธิ์อ่านไฟล์ของคุณ แตะด้านล่าง เปิด “อนุญาตให้เข้าถึงเพื่อจัดการไฟล์ทั้งหมด” แล้วกลับมาแตะ “ลองใหม่”", + picker_grant_hint_prompt: "หากต้องการอัปโหลดโฟลเดอร์เกมหรือ .zip PS5Upload ต้องได้รับอนุญาตให้อ่านไฟล์ของคุณ แตะ อนุญาต ตอบตกลงในหน้าต่างที่ขึ้นมา แล้วแตะ ลองใหม่", picker_open_settings: "เปิดการตั้งค่า", picker_allow: "อนุญาต", picker_retry: "ลองใหม่", diff --git a/client/src/i18n/locales/tr.ts b/client/src/i18n/locales/tr.ts index 17d32a036..72af0b920 100644 --- a/client/src/i18n/locales/tr.ts +++ b/client/src/i18n/locales/tr.ts @@ -868,7 +868,7 @@ home_low_space_body: "Temizlik; güncellemeleri, kalan paketleri ve hiç oynanma "cw_convert_unpack_note": "Bu oyun {kind} varlık paketlerinde. Açıksa paket her dosyayı düz dosya olarak içerir ve varlık paketlerini dışarıda bırakır; böylece boyutu oyunun paketlenmeden önceki haline yakındır ({size}). Kapalıysa varlık paketleri olduğu gibi girer ve onları yalnızca öykünücü okuyabilir.", "cw_convert_leave_out_emu": "AMPR öykünücüsünü dahil etme", "cw_convert_leave_out_emu_note": "Paket o zaman fakelib/libSceAmpr.sprx içermez ve oyun dosyalarını PS5'in kendi sistem kütüphanesiyle okur. Bu yalnızca tek bir oyunla, 5.10 yazılımında denendi. Oyun başlamazsa paketi bu seçenek kapalıyken yeniden oluşturun.", -"cw_convert_unpack_needs_emulator_v2": "Bu oyun dosyalarını AMPR üzerinden okuyor ve düz dosyalarla çalışan bir öykünücüsü yok. AMPR öykünücüsünü uygulamadan bu PS5'e koy (Ayarlar › Bu PS5) ya da AMPR öykünücüsünü dahil etme seçeneğini aç.", +"cw_convert_unpack_needs_emulator_v2": "Bu oyun dosyalarını AMPR üzerinden okuyor ve düz dosyalarla çalışan bir öykünücüsü yok. AMPR öykünücüsünü uygulamadan bu PS5'e koyun (Ayarlar › Bu PS5) ya da AMPR öykünücüsünü dahil etme seçeneğini açın.", "cw_convert_err_not_packed": "Bu oyun varlık paketlerinde değil, bu yüzden açılacak bir şey yok. “Varlık paketlerini aç” seçeneğini kapatın.", "cw_convert_reading": "Oyun okunuyor…", "cw_convert_running": "{name} dönüştürülüyor…", @@ -3057,7 +3057,7 @@ library_mount_tooltip_smp: "Bu imajı ShadowMount+'a devret; onu bağlayıp kayd "pkglib.badge.pkgWarning": "paketi kontrol et", "pkglib.fpkgsupport.title": "Sahte paket (FPKG) mi kuruyorsun?", "pkglib.fpkgsupport.lead": "PS5 sahte paketi yalnızca konsolda sahte paket desteği zaten yüklüyse kurulur. Kurmadan önce üçünü de bu sırayla yükle:", -"pkglib.fpkgsupport.kstuff_v3": "— yazılımın için PS5 sahte paket desteği olan sürüm. 11.60 üzerinde: kstuff 1.15 veya daha yenisi. Katalogdaki kopya daha eski olabilir: 1.15'i yazarından al ve “Payload gönder” ile gönder.", +"pkglib.fpkgsupport.kstuff_v3": "— yazılımınız için PS5 sahte paket desteği olan sürüm. 11.60 üzerinde: kstuff 1.15 veya daha yenisi. Katalogdaki kopya daha eski olabilir: 1.15'i yazarından alın ve “Payload gönder” ile gönderin.", "pkglib.fpkgsupport.ppr": "— PPR düz metin / kimlik doğrulamasız yamasını uygular", "pkglib.fpkgsupport.ppr_where": "Yayınlanmış bir indirmesi yok: GitHub'daki kaynak koddan derlenir,", "pkglib.fpkgsupport.smp": "— kurulan oyunu kaydeden bağlama katmanı", @@ -3195,9 +3195,9 @@ library_mount_tooltip_smp: "Bu imajı ShadowMount+'a devret; onu bağlayıp kayd "pkg.reason.stream_unreachable": "PS5 paketi almak için bu bilgisayara hiç ulaşamadı. ps5upload'a bu bilgisayarın güvenlik duvarında izin ver (Windows'ta özel ve genel ağlar için), bilgisayarı ve PS5'i VPN olmadan aynı ağda tut ve PS5'in proxy sunucusunu “Kullanma” olarak ayarla. Yükle ve kur bu bağlantı olmadan çalışır.", "pkg.reason.stream_proxy": "PS5'in proxy ayarı akışı engelledi. PS5'in gelişmiş ağ ayarlarında proxy sunucusunu “Kullanma” olarak ayarla ya da paketi PS5'in yerel depolamasından okuyan Yükle ve kur'u kullan.", "pkg.reach_blocked": "PS5 bu bilgisayara ({address}) bağlanamıyor, bu yüzden paketi alamıyor.", -"pkg.reach_no_fetch": "Paket PS5'e verildi ve {seconds} saniye sonra bu bilgisayardan ({address}) hiçbir şey almamıştı, bu yüzden kurulum durduruldu.", -"pkg.reach_usual_cause": "Çoğu zaman bu bilgisayarın güvenlik duvarı engeller: PS5Upload'a güvenlik duvarında izin ver (Windows'ta özel ve genel ağlar için), sonra Yeniden dene'ye bas.", -"pkg.reach_use_upload": "Ya da Yükleyerek yeniden dene'ye bas: paketi önce PS5'e kopyalar ve geri bağlantı gerektirmez.", +"pkg.reach_no_fetch": "Paket PS5'e verildi, ancak PS5 {seconds} saniye sonra bu bilgisayardan ({address}) paketin hiçbir kısmını almamıştı, bu yüzden kurulum durduruldu.", +"pkg.reach_usual_cause": "Çoğu zaman bu bilgisayarın güvenlik duvarı engeller: PS5Upload'a güvenlik duvarında izin verin (Windows'ta özel ve genel ağlar için), sonra Yeniden dene'ye basın.", +"pkg.reach_use_upload": "Ya da Yükleyerek yeniden dene'ye basın: paketi önce PS5'e kopyalar ve geri bağlantı gerektirmez.", "pkg.wait_reach_check": "PS5'in bu bilgisayara ulaşabildiği denetleniyor…", "pkg.wait_console_fetch": "PS5'in paketi bu bilgisayardan almaya başlaması bekleniyor…", "pkg.wait_previous_install": "PS5'in yükleyicisi, alamadığı son paketi hâlâ tutuyor. Bıraktığında bu kurulum kendiliğinden başlar, en geç {minutes} dk içinde.", @@ -5330,7 +5330,7 @@ install_path_fallback_label: "PS5 bu bilgisayara ulaşamadığında dosya yoluyl "installed_fix_permissions_done": "İzinler düzeltildi: bu oyunun klasöründeki her dosya artık 0777. Oyna'ya bas.", "installed_fix_permissions_short": "İzinleri düzelt", "installed_launch_homebrew_refused": "PS5 bu oyunu başlatmayı reddetti (0x80940033). Konsol şu anda homebrew ya da sahte paket oyunlarını başlatmıyor: kstuff'ı yeniden yükle (ya da yeniden başlatıp jailbreak'i tekrar çalıştır), sonra yeniden Oyna'ya bas.", -"fakegame.fw.launch_kstuff_v2": "Bu oyun sahte paketten yüklendiyse: FW {fw} üzerinde yalnızca kstuff 1.15 veya daha yenisiyle başlar. Katalogdaki kopya daha eski olabilir: kstuff 1.15'i yazarından al, “Payload gönder” ile gönder, sonra yeniden Oyna'ya bas.", +"fakegame.fw.launch_kstuff_v2": "Bu oyun sahte paketten yüklendiyse: FW {fw} üzerinde yalnızca kstuff 1.15 veya daha yenisiyle başlar. Katalogdaki kopya daha eski olabilir: kstuff 1.15'i yazarından alın, “Payload gönder” ile gönderin, sonra yeniden Oyna'ya basın.", "installed_launch_no_kstuff": "PS5 bu oyunu başlatmayı reddetti (0x80940033), çünkü kstuff çalışmıyor. O olmadan konsol hiçbir homebrew ya da sahte paket oyununu başlatmaz. kstuff'ı yükle (autoloader'ınla ya da Bağlantı → Kur ile) ve yeniden Oyna'ya bas.", job_why_lanes: "Bağlantılar: ortalama {avg}, en fazla {max}; blok {chunk}", job_why_loading: "Yükleniyor…", @@ -6658,7 +6658,7 @@ library_compressed_hint: "Sıkıştırılmış kalıpları oynatmak için Shadow "minion_zstd_runtime_note": "PS5'te dönüştürmenin zstd paketleri yazabilmesi için konsolda zstd çalışma zamanı (ampr-emu-ng) gerekir. Uygulama, bu PS5 bağlandığında onu kendiliğinden oraya koyar.", "minion_zstd_runtime_put": "zstd çalışma zamanını bu PS5'e koy", "minion_zstd_runtime_done": "ampr-emu-ng {version} bu PS5'te.", -"minion_ampr_emu_note": "PS5'te dönüştürme varlık paketlerini açarken bir AMPR öykünücüsünü tutabilsin diye konsolda ampr_emu gerekir. Uygulama onu yalnızca sen istediğinde oraya koyar.", +"minion_ampr_emu_note": "PS5'te dönüştürme varlık paketlerini açarken bir AMPR öykünücüsünü tutabilsin diye konsolda ampr_emu gerekir. Uygulama onu yalnızca siz istediğinizde oraya koyar.", "minion_ampr_emu_put": "AMPR öykünücüsünü bu PS5'e koy", "minion_ampr_emu_done": "ampr_emu {version} bu PS5'te.", "remove_ps5u_console_busy": "PS5, PS5Upload'ın başlattığı bir işle meşgul. Bitmesini bekle, sonra tekrar dene.", diff --git a/client/src/i18n/locales/vi.ts b/client/src/i18n/locales/vi.ts index 1d290f849..6b8637fad 100644 --- a/client/src/i18n/locales/vi.ts +++ b/client/src/i18n/locales/vi.ts @@ -1978,7 +1978,7 @@ settings_section_reset: "Đặt lại", picker_choose_folder: "Chọn thư mục", picker_choose_file: "Chọn tệp", picker_grant_title: "Cho phép truy cập tệp của bạn", - picker_grant_hint: "Để tải lên một thư mục game hoặc tệp .zip, PS5Upload cần quyền đọc tệp của bạn. Nhấn bên dưới, bật “Allow access to manage all files”, rồi quay lại và nhấn Thử lại.", + picker_grant_hint: "Để tải lên một thư mục game hoặc tệp .zip, PS5Upload cần quyền đọc tệp của bạn. Nhấn bên dưới, bật “Cho phép truy cập để quản lý tất cả các tệp”, rồi quay lại và nhấn Thử lại.", picker_grant_hint_prompt: "Để tải lên thư mục trò chơi hoặc .zip, PS5Upload cần quyền đọc tệp của bạn. Chạm Cho phép, đồng ý trong hộp thoại hiện ra, rồi chạm Thử lại.", picker_open_settings: "Mở cài đặt", picker_allow: "Cho phép", @@ -5325,7 +5325,7 @@ install_path_fallback_label: "Cài theo đường dẫn tệp khi PS5 không k "installed_fix_permissions_done": "Đã sửa quyền: mọi tệp trong thư mục của trò chơi này giờ là 0777. Nhấn Chơi.", "installed_fix_permissions_short": "Sửa quyền", "installed_launch_homebrew_refused": "PS5 đã từ chối khởi chạy trò chơi này (0x80940033). Hiện tại máy không khởi chạy homebrew hay trò chơi từ gói giả: hãy tải lại kstuff (hoặc khởi động lại và chạy jailbreak lần nữa), rồi nhấn Chơi lần nữa.", -"fakegame.fw.launch_kstuff_v2": "Nếu game này được cài từ gói giả: trên FW {fw} game chỉ khởi động với kstuff 1.15 hoặc mới hơn. Bản trong danh mục có thể cũ hơn: hãy lấy kstuff 1.15 từ tác giả, gửi bằng “Gửi payload” rồi bấm Chơi lại.", +"fakegame.fw.launch_kstuff_v2": "Nếu game này được cài từ gói giả: trên FW {fw} game chỉ khởi động với kstuff 1.15 hoặc mới hơn. Bản trong danh mục có thể cũ hơn: hãy lấy kstuff 1.15 từ tác giả, gửi bằng “Gửi payload” rồi bấm lại Chơi.", "installed_launch_no_kstuff": "PS5 đã từ chối khởi chạy trò chơi này (0x80940033) vì kstuff không chạy. Không có nó, máy không khởi chạy homebrew hay trò chơi từ gói giả nào. Hãy tải kstuff (bằng autoloader của bạn, hoặc Kết nối → Thiết lập) rồi nhấn Chơi lần nữa.", job_why_lanes: "Kết nối: trung bình {avg}, tối đa {max}; khối {chunk}", job_why_loading: "Đang tải…", diff --git a/client/src/i18n/locales/zh-CN.ts b/client/src/i18n/locales/zh-CN.ts index c5c6c3d2e..0b3b7f46e 100644 --- a/client/src/i18n/locales/zh-CN.ts +++ b/client/src/i18n/locales/zh-CN.ts @@ -5282,7 +5282,7 @@ install_path_fallback_label: "当 PS5 无法连接到这台电脑时,按文件 "installed_fix_permissions_done": "权限已修复:此游戏文件夹中的所有文件现在都是 0777。请按运行。", "installed_fix_permissions_short": "修复权限", "installed_launch_homebrew_refused": "PS5 拒绝启动这款游戏(0x80940033)。主机当前不会启动自制程序或伪造软件包游戏:请重新加载 kstuff(或重启后再次运行越狱),然后再次按运行。", -"fakegame.fw.launch_kstuff_v2": "如果此游戏是从伪造软件包安装的:在 FW {fw} 上,只有 kstuff 1.15 或更新版本才能启动它。目录里的版本可能较旧:请从作者处获取 kstuff 1.15,用“发送 Payload”发送,然后再次按运行。", +"fakegame.fw.launch_kstuff_v2": "如果此游戏是从伪造软件包安装的:在 FW {fw} 上,只有 kstuff 1.15 或更新版本才能启动它。目录里的版本可能较旧:请从作者处获取 kstuff 1.15,用“发送 Payload”发送,然后再次按“开始游戏”。", "installed_launch_no_kstuff": "由于 kstuff 没有运行,PS5 拒绝启动这款游戏(0x80940033)。没有它,主机不会启动任何自制程序或伪造软件包游戏。请加载 kstuff(你的自动加载器,或 连接 → 设置),然后再次按运行。", job_why_lanes: "连接数:平均 {avg},最多 {max};分块 {chunk}", job_why_loading: "正在加载…", @@ -9226,7 +9226,7 @@ rp_users_add_hint: "若也想以其他用户游玩,请在 PS5 上登录该用 "helper_auto_updating": "正在将助手更新到 v{version}…", "helper_auto_retry": "上一次自动更新没有成功。几分钟后会再试一次。", "helper_auto_off": "这台 PS5 的助手自动更新已关闭。", -"helper_auto_gave_up_v2": "无法自动更新助手。请按更新助手来发送它。", +"helper_auto_gave_up_v2": "无法自动更新助手。请按“更新助手”来发送它。", "helper_auto_wait_busy_here": "等你在这台 PS5 上的传输、安装和串流结束后,此应用会自动更新助手。", "helper_auto_wait_busy_others": "等其他正在使用这台 PS5 的设备完成后,此应用会自动更新助手。", "helper_auto_wait_console_work": "等 PS5 完成它自己的任务(解压、安装、打开的存档,或运行中游戏的金手指)后,此应用会自动更新助手。", diff --git a/client/src/i18n/locales/zh-TW.ts b/client/src/i18n/locales/zh-TW.ts index 35b061f30..86fb246d1 100644 --- a/client/src/i18n/locales/zh-TW.ts +++ b/client/src/i18n/locales/zh-TW.ts @@ -2337,7 +2337,7 @@ processes_threads: "{n} 個執行緒", "profile.username.emptyHint": "請先在 PS5 上登入一個個人檔案,然後重新整理。", "profile.username.loading": "正在讀取主機使用者…", "profile.username.placeholder": "使用者名稱", -"profile.username.tooLong": "這個名稱對 PS5 來說太長了。請改短一些:帶重音符號的字母和非拉丁字母會占用更多空間。", +"profile.username.tooLong": "這個名稱對 PS5 來說太長了。請改短一些:帶重音符號的字母和非拉丁字母會佔用更多空間。", "profile.username.save": "儲存", "profile.username.slot": "插槽 {n}", "user_info_title": "PS5Upload:使用者資訊備份", @@ -3146,7 +3146,7 @@ library_mount_tooltip_smp: "把此映像檔交給 ShadowMount+,由它掛載並 "pkg.reach_use_upload": "或按「改為上傳後重試」,它會先把套件複製到 PS5,不需要 PS5 連回這台電腦。", "pkg.wait_reach_check": "正在檢查 PS5 能否連線到這台電腦…", "pkg.wait_console_fetch": "正在等待 PS5 開始從這台電腦取得套件…", -"pkg.wait_previous_install": "PS5 的安裝程式仍占著上一個無法取得的套件。等它放開後,這次安裝會自動開始,最多 {minutes} 分鐘。", +"pkg.wait_previous_install": "PS5 的安裝程式仍佔著上一個無法取得的套件。等它放開後,這次安裝會自動開始,最多 {minutes} 分鐘。", "fpkg.convertInstall": "轉換並安裝", "fpkg.convertOnly": "僅轉換", "fpkg.needConsole": "連線 PS5 後才能安裝。", @@ -5276,7 +5276,7 @@ install_path_fallback_label: "當 PS5 無法連線到這台電腦時,依檔案 "installed_fix_permissions_done": "權限已修正:此遊戲資料夾中的所有檔案現在都是 0777。請按執行。", "installed_fix_permissions_short": "修正權限", "installed_launch_homebrew_refused": "PS5 拒絕啟動這款遊戲(0x80940033)。主機目前不會啟動自製程式或偽造套件遊戲:請重新載入 kstuff(或重新開機後再次執行越獄),然後再按一次執行。", -"fakegame.fw.launch_kstuff_v2": "如果此遊戲是從偽造套件安裝的:在 FW {fw} 上,只有 kstuff 1.15 或更新版本才能啟動它。目錄裡的版本可能較舊:請向作者取得 kstuff 1.15,用「傳送 Payload」傳送,然後再按一次執行。", +"fakegame.fw.launch_kstuff_v2": "如果此遊戲是從偽造套件安裝的:在 FW {fw} 上,只有 kstuff 1.15 或更新版本才能啟動它。目錄裡的版本可能較舊:請向作者取得 kstuff 1.15,用「傳送 Payload」傳送,然後再按一次「開始遊戲」。", "installed_launch_no_kstuff": "由於 kstuff 沒有在執行,PS5 拒絕啟動這款遊戲(0x80940033)。沒有它,主機不會啟動任何自製程式或偽造套件遊戲。請載入 kstuff(你的自動載入器,或 連線 → 設定),然後再按一次執行。", job_why_lanes: "連線數:平均 {avg},最多 {max};區塊 {chunk}", job_why_loading: "正在載入…", @@ -9220,7 +9220,7 @@ rp_users_add_hint: "若也想以其他使用者遊玩,請在 PS5 上登入該 "helper_auto_updating": "正在將助手更新到 v{version}…", "helper_auto_retry": "上一次自動更新沒有成功。幾分鐘後會再試一次。", "helper_auto_off": "這台 PS5 的助手自動更新已關閉。", -"helper_auto_gave_up_v2": "無法自動更新助手。請按更新助手來傳送它。", +"helper_auto_gave_up_v2": "無法自動更新助手。請按「更新助手」來傳送它。", "helper_auto_wait_busy_here": "等你在這台 PS5 上的傳輸、安裝和串流結束後,此應用程式會自動更新助手。", "helper_auto_wait_busy_others": "等其他正在使用這台 PS5 的裝置完成後,此應用程式會自動更新助手。", "helper_auto_wait_console_work": "等 PS5 完成它自己的工作(解壓縮、安裝、開啟的存檔,或執行中遊戲的金手指)後,此應用程式會自動更新助手。", diff --git a/scripts/i18n-source-hashes.json b/scripts/i18n-source-hashes.json index 476b865bf..6589515c3 100644 --- a/scripts/i18n-source-hashes.json +++ b/scripts/i18n-source-hashes.json @@ -1291,7 +1291,7 @@ "collection.update_all_body": "e702dfc7 GztfLdudwmyOf-hjKqlU7rMojg7OE5FIN3SKCyF3-YBqJBXYdNhAnCh8b9qi", "collection.update_all_go": "97ac3cfc GFpbvAKqFIgiTXogLXAhQ5loL54__qeF8vuczoNo4JBV4ix2GeYNMtvDt8fP", "collection.update_all_title": "19b11c62 eM9B96mtS-EPM3hlUIYumvyzCJk0r_-cKRBg85dhxkRWG5VKEAIhKVkiEKf0", - "collection.uptodate_banner_v2": "c7e53e7c zgNzUBrJ1O8Jw6RDwMZmcdKDuKZA_T4RGMjHggt3Iw4s7bnmCn7kymoNt1-l", + "collection.uptodate_banner_v2": "c7e53e7c zgNzUBrJ1O8Jw6RGMiZmcdKDrr6A_T4RGMjHggt3Iw4s7bnmCn7kymoNt1-l", "collection.view": "dcc839a4 QFBxg-ptYBd8bd7GLIILezV2fyyBd8F-_rFtP7sppHkCKsk74bCogwHFwVfY", "collection.view_grid": "0d7d12ac VO8xEHLMSfnlWiuwvMMGRDMX3TIUz10hsCeg972g54oiG1mf9fQRNA5B76lX", "collection.view_table": "16d1c905 4cOn12wrI1dC4cO6Gd5mlYo981XRyNw1-QOwXTAXTAt_G8jiYzkj4BItnItn", @@ -1489,7 +1489,7 @@ "cq_skipped_not_image": "db58ecb3 iPFjvGEDuFEdICGgC2HBuQuSnJpEKbsVj6_zsEmt3INw5lPwnrvQ4nse0bNA", "cq_start": "406be720 G0ADXKlyFBAyAicsGx-MJPylf_YIDB6vSkHmXd3EHp7zDCAiq_5TIVVwIXJ4", "cq_stop": "25aceb0a BLEvv_NmF_SzQ7HPX1At-XoQ2TDatMXPi0yJMEZD-QTRSdhkFg7mZOTZg7Qe", - "cq_tag_free_archive": "e558a126 txR8gXOv1VmkqMB-k7y2TiUFJNOXZbczXPo4y8pooi55h7Qh2OkxVs7E4Rwm", + "cq_tag_free_archive": "e558a126 txR8gXOv1VmkqMB-k7y2TiUFaaSXZbczXPo4y8pooi55h7Qh2OkxVs7E4Rwm", "cq_tag_level_balanced": "c0905088 cH6E9N-pLO-WCycfG3ozZE1OAXBk9uts-Y0JDoSO-WzZA4WifEt7pBJYi31R", "cq_tag_level_fast": "115dc360 k4Y4C4qLHj9Sx-sjL-w1P17T7r63SYOZGMqgtawj9S3Nh9MhZNFniu25R25R", "cq_tag_level_smallest": "3ccda332 M9VYvJXHxw9jlQyxtFDvK5oyaESPem2AwMOZytJWDFN1dbTDldKkRe2Aw2Aw", @@ -1866,7 +1866,7 @@ "cw_convert_inspect_failed": "5ad95894 ML3g6s_yHO73lXZHjvS6Lop3o-dYHSEUYty1CzwrQg_MLHlrK60KhFz6kXSE", "cw_convert_intro": "5133191e ifdkEKObAtO0qfhOcZj7KbB7SfZO9LS8viG20PeHmWRTxbElifp0lqIKLmwu", "cw_convert_leave_out_emu": "4b22f4da -Hd5vCPiTV_FF6xqCVhvl7PZCoSETTyHdeOIUukhXZ00NQqcAbS6I8dTsoIk", - "cw_convert_leave_out_emu_note": "84bf2023 0ziIqspIj1TZ2kE8DvPipt6g1CkpJiAmess4UwvE1sKQH4bZ362ZUX9bw6KV", + "cw_convert_leave_out_emu_note": "84bf2023 0ziIqspIj1TZlad8DvPipt6g1CkpJiAmess4UwvE1sKQH4bZ362ZUX9bw6KV", "cw_convert_level_default": "09fb66c9 WuGyjuQ1ST5l3m6Pfk4izr7x-L9bcdlvX2mJrp1MVoxvCNERBxanlRyUNwKO", "cw_convert_level_fast": "bf1dd16e 1fXxs1r2-Vh23SKv53HwKjOxu4liANdsmeej16LTWfR9EY2Sgmz1EnJSfJSf", "cw_convert_level_small": "e0284c95 HMQj9fO2CIlpPeZesfAs1q4yhyIr7KsWqnzw34ybhSopsZ8gcfOsKnZmha39", @@ -1897,8 +1897,8 @@ "cw_convert_stopped": "4532a207 5lnbvnc_iVddpxUOA0Vb0k-g3OAPuHII1GB6ewz3Gre1KOHdWQYdZCoXfDWS", "cw_convert_title": "5cd425f5 TwN40ECma9r64CG9r6HlOakNwUxrO4fO1RjO1sM4YoyPLkQhs0NsQbCw1eFy", "cw_convert_unpack": "1d695e78 ggudtOiDZos4sgc-DkDxHu7l44kTCKodI-T4oac6i7VISyaRXISq5C6qIPot", - "cw_convert_unpack_needs_emulator_v2": "d5846627 R1nl4mAxrNjt58l6BpkR-8JVv8twwufqTUd6-VC8OpVkigrfsQMukhJKvGyQ", - "cw_convert_unpack_note": "59b32a32 _ZOKeVM-4qmLG41Jks7KimasNkDo-vgGnJeOPsp9FKUwz-PEKqjmxFSonX5i", + "cw_convert_unpack_needs_emulator_v2": "d5846627 R1nl4mAxrNjtzIb6BpkR-8JVv8twwufqTUd6-VC8OpVkigrfBQoukhJKvGyQ", + "cw_convert_unpack_note": "59b32a32 _ZOKeVM-4qmLdbzJks7KimasNkDo-vgGnJeOPsp9FKUwz-PEKqjmxFSonX5i", "cw_convert_verify": "e371a673 7EZjKQDMK9MEZOoYwbyUxOTUjAOJ6gDF0XfHEsbkRkLW4e5YAT26k9xlDLD2", "cw_convert_verify_fast": "c1502c6a 3Wrg9CIiS0_n9OfScpislJjOuf4B2HwLAlzI1EbX5I6l8unEiOcTYHnTc1fI", "cw_convert_verify_full": "70b83246 f2I1ua7AuybAYspC3dKttWK51p7gEOvpsVdgi_b5tLLwjToWozsqsA7AQZi4", @@ -3067,7 +3067,7 @@ "engine_err_hint_macos": "15f79a54 db7lXHfQ3ylKSzBOXHgg_PDZmgTsnbooq-q1CrRKfTnDiwhpucvdczL4RNRE", "engine_err_hint_other": "31cc56d1 Hm6cC29d205ztipI5fJ3QdsX5JBj-O0z3FhTV64rppe8OvhvMb6Dbjg3r74W", "engine_err_hint_windows": "1aadf681 dRa3Bmd4YGuini3iCWqbSV0eLyy8BOPMwp7yp6hMN3Az4O1zzvzKLa6KBYuA", - "engine_err_in_app_blocked": "2ebe9917 waAu1bpj-1IO3sm4CSoRILo8pYe1_w4RYwEy-xGiTYeTwiS0kma8pWIGAQPe", + "engine_err_in_app_blocked": "2ebe9917 waA0B-pj-1IO3sm4CSURALo8pYe1_w4RYwEy-xGiTYeTwiS0kma8pWIGAQPe", "engine_err_in_app_failed": "5cdf541e NYnP68WiQqvVIGM67S5F0PpmxZziceNEyFIKl7KikkUrrl9JmnAASNeUu1AD", "engine_err_not_ready": "c8f0c817 E85lO0gLWG4zDojd3LRhgYRHoN2YqePYQ8j-igvuCPZMRiCrW8OVH8LmB0Hn", "engine_err_remote": "788e677e HSlbbZir4fq5Q2hEDSg7K-229GAcJp7T77I71LTEW8rTGJDo2mQiAm-I13Y4", @@ -3209,7 +3209,7 @@ "eta_h_min": "99422830 i3ZohyogvmUIlMOmUIhyquLyrwPmUIBpAFbUGcYmUICKmfi304W3Ip-x35v1", "eta_min": "913185ba yCJp5Xhs0kTGU-tkTGFCRHk1XwWkTGuJ7S5okTGkTGH8F804rGjfurisqN_L", "eta_sec": "2e304898 dsBbjAzVpjm3sPKjm3kD3EXXUr3jm3RnnMgMjm3jm3_6XV13-BCvRHRnnRnn", - "fakegame.fw.launch_kstuff_v2": "ada701b5 UdpywvGcEZnmeWIfAqaos35ijWn1LckkOhzjxWwXXCuSR4umrPjalaANQKav", + "fakegame.fw.launch_kstuff_v2": "ada701b5 4G2MPRGcEZnmZN4W9HZAW35ijWn1LckkOAjVxWw94puSR4umTU1_Cr0QoYmL", "fakelibs_action_failed": "57b25b95 qk7dLA37_hGtDBxvlLLrMZ0lLS6nxzzhTE5egUaoXoWlomzvdMYx-0G2JG2J", "fakelibs_empty": "dbb9e181 TCkrfnCC_LnUFZOZ8jb48c3v2emCYEcUI_wtU4lYItmHRG4E2oX_KW8BLgW2", "fakelibs_import_action": "6d4e30ee HZOVnaCD4f9fVdekSxtm3-ukManJti-C_zH8xBWaPSD7UTTPSP_MbGKddcIB", @@ -3226,7 +3226,7 @@ "fakelibs_scan_console": "836562b0 v_bf-4C6GoW_DfsUJdAheHFwy2_OC0I1frjNu5XoW_FOKZPmDr9VxA3MWvBn", "fakelibs_scan_none": "f03c73ae vEg8u0Kack1kCFUscixQ6j48LRGSi1Ttpmh-kbBPu4Uy1I9c9D4fgreYOCPy", "fakelibs_scan_none_new": "1333b45b dMQnf33oQHC_1MQ1k4zNDOrhhoWoj3YcMDHVaUpk73TmFqRCuk2epjkPFOju", - "fakelibs_scan_not_backported_v2": "a235ff32 w8KrxoCy_sT2vi85XUzzkGAHgcu8Fm0Xfr_8Gx2GdE3oZZONwr5AQCXV38Rg", + "fakelibs_scan_not_backported_v2": "a235ff32 w8KrxoCy_sT2vi8NRhzzkGAH5wU8Fm0XfsZ1Gx2GdE3oZZONwr5AQCXV38Rg", "fakelibs_scan_progress": "24e989f0 A1UerN_jT8tCcGFr1Oye4jJsu7HsWps-LExQbb48HcGiG9dOTboqfpZKMmcy", "fakelibs_scan_title": "8b21b141 LCJCGj9V2Li1j8S0APAok4fGc88E0oAp1jeVMaoqUZCvRum0u05G9S5FFbvS", "fakelibs_scan_unreachable": "738245d0 -bLtuLI-gc21gwq6b50sEheYdHX2KXAShmMHZU-qm5KLKDUBnYluPIyapXWL", @@ -3496,7 +3496,7 @@ "fpkg.kraken.mount_help": "68f4d07f jGDcaGJe5TFhe623I1hQbYOysoR_yb05RbYbGHZHstYywlW_pmcFCBO8Tlf3", "fpkg.language": "23349750 3s7TFwjfRsGIf05egyMlCwLIH1XCjvh1uwU8EcOs89urCxBLDIO8raGACX_G", "fpkg.languageEvery": "18bc1acd aTYXgZ_U8ncCHOAL-8spYLj_4hecZ-FnQDI1jvI3NzUdoaROxEbE-WEcBmfq", - "fpkg.languageEveryHint": "9c183fb3 NfHFiKCTp6WvoAzqZHJObvknqhrN6Xc1rsC_w-MDOL1Y_CnI2gzPfMbVK6sY", + "fpkg.languageEveryHint": "9c183fb3 NfHFiKCTp6WvoAzqZHJObvknrs2N6Xc1rsC_w-MDOL1Y_CnI2gzPfMbVK6sY", "fpkg.languageHint": "15f63c11 T7S0hmW14Ojw60FYeUE7f_3xHuDsv35eerAlfmhhmhV5U44U-tI0fUjbcmo8", "fpkg.languageOwn": "ccc3b706 VEdgrFBOwa2gQF7KwZ7zXklS-LCoPY1ExoS4xG-Urmy9wwpyjg0M4HFK5PK9", "fpkg.launch": "d61fdda2 ejVNQeK5PEo2Knv8U2MBEadvUaKteZRqeOgawjednCvVT2aq7_7iyjMrOhaJ", @@ -3515,7 +3515,7 @@ "fpkg.make.pick_game": "d10a603a XqXcbOT-qTHDsmeUAzM8PZZgXgg3envNjczM2xhJf9LfF9WXL9TTg9BvVTzL", "fpkg.make.pkg_body_kraken_v3": "695d1beb 3VbX50pN29mt1a7HXns8HhMKPflRTrsEx6Q7NDhLnFPkiM0kvcOpmMRTAMpf", "fpkg.make.pkg_body_v5": "65556b23 OKoVFWinR2LmXc7NI97uzg3f-EOJdTK4-6RyNBg9iywa3xySYL_Mt4o8qXnk", - "fpkg.make.pkg_title_v2": "c7b9af52 Z9b3YFm61Am0r5rVhL89dOIh51TbLUQsVXY92hzdBtV1avY6l8zuyNG3186m", + "fpkg.make.pkg_title_v2": "c7b9af52 Z9b3YFm61Am0r5rVhL89dh3651TbLUQsVXY92hzdBtV1avY6l8zuyNG3186m", "fpkg.make.ps4_pkg_body": "f070e4f9 Orx3tKagukEgn-g-_j_OXtTfwFtFLoivTfdjRWNKw9mSHXv0Bv35PkiBqxIn", "fpkg.make.ps4_pkg_title_v2": "6d13262a EuubUYRE-eI1RR2DvI6mGdmMDNdkmDt7pyRzOZNHeTfragGU4pMIdg31OB95", "fpkg.make.recommended": "d70604e8 z68QjxKZdX6cQTgtGuuEesjgDOIEPFs80WJGg0iX6ci3askAtf-BLrFFLBC1", @@ -3546,7 +3546,7 @@ "fpkg.pkg_packs.none": "4b9cac7e A1zJnfdkRtFYChSHOpsAFCtd6rFpbe4Vp1Eeol_KcoYnQKgn4YA1GGafOWp_", "fpkg.pkg_packs.pending": "b51fa652 QqwQQH1_RhD-oibnPnWeGRY_4M3U24ei9bvPLq79xygFNSRNHZ91bObIoZII", "fpkg.pkg_packs.title": "9d8047ce cDlxcLhc1r9kK2gPJuSDB14_WTLEHEpixpQ_v-iHiw-WiEKabL2oe59bWo9r", - "fpkg.pkg_packs.unchecked": "65ef6050 DP9p0eILUoMczMV0zI7dNgvTpZyWd0t2hStd7VTrAK6PhIZ_POoAXrnxyjLi", + "fpkg.pkg_packs.unchecked": "65ef6050 DP9p0eILUoMcZI20zI7dNgvTvrzWd0t2hStd7VTrAK6PhIZ_POoAXrnxyjLi", "fpkg.ps4_addon_note": "5de7b0cb T8H6TmaE4-XA0aiar_y6zqVPU3GgyqITDW0_O6OT1toLra5dwFtP9Ex6GQFs", "fpkg.ps4_game_note_v2": "8e5177df DINr1qiyNtFkOwZEFXxhBmm9nV4N2EWJPAU3WuNkoxvuZDcqjD-4Hkep5n45", "fpkg.ps4_licence_note": "e7910487 ZZpwde1jKVgt2z9_WI_cAV00eLP0hkKLjVQJ3P3-STLSrn_Bw3wVi4o0-V3l", @@ -3946,9 +3946,9 @@ "fs_space_here_v2": "33e38909 gjBsMj_9tl-IRzx54JqzGdw8CIGCI_ZBDp4V5hTQ_77zapPUNoPFoKKSjvm_", "fs_space_open_folder": "d79fbeb7 T7eb6nUpCsB-zeP8sRAqiwnSwo9uW5llqkslB6iQr584RfbASvkih3hhFcUb", "fs_space_title": "5e7e7d8c rdqYuBzJGURHaQ_6jgogqeWHVBf_U38tZNDZkflnnAj_gqxZZb2gPsLMPoSq", - "fs_staged_bar": "8bc3b186 muLpt78Z66qlcBolF4hscjlCyMhplWe_sBIRHeuPLiYP-qYj7zTKjWte6gMe", + "fs_staged_bar": "8bc3b186 muLpt78Z66qlGCElF4hscjlCyMhplWe_sBIRHeuPLiYP-qYj7zTKjWte6gMe", "fs_staged_copy": "611064f2 -vMJb1m7fVCA1z7T-4qzUjXCwrL7pVnsiMTcn3T8ACVODsEhaTngTuULQWyn", - "fs_staged_from": "0562430e p-DEu7x9ztBUoM3c6wlwXgZzc-9UWFojjC6n_4emz13EGUQo6Z8LpQEdnjBA", + "fs_staged_from": "0562430e p-DEu7x9ztBUoM3c6wlwXgZzc-9UWFQLLC6n_4emz13EGUQo6Z8LpQEdnjBA", "fs_staged_move": "35038a60 2EQ4TCez8CeFwAf_3E7jZ45bCE_CrKmrlenD029m3DpsRIpBnfy4yRVjKdGg", "fs_tag_folder": "74ccd433 vJBeHKMwKc0LhTELN8tQ7K3HdMzLpXj7D5VYdMzUY5c6DRDoHfmlU3fHgqrx", "fs_task_decompress": "d8134065 i2cbnCjFaS9UmMqyhgqiX5dFQIFAFWihCi3DjOXiiXEhvGeBhWItjXMrUSXH", @@ -4364,7 +4364,7 @@ "health_t_version": "f8cb53aa kJx4Ybd3odiVNsGRBvPoNOcR5F3hm64VNcoHFdGpxOCvuCuD9fEIxPnuXXjc", "health_title": "388d2fd1 2zfo0w3IOPXNRHoWuiTTSinEqLyqRnCYCEB6Mv8XZ6E8Tw_rdUS2962n0U9s", "help_title": "b79cac92 l8R9hSlUcMrQHA7LjBea6jJxcNvvqHMGckCQ_BR_grPiACebpSE5dXpXzbTy", - "helper_auto_gave_up_v2": "3d1a727f -kE5hOzT97FSMLKi_SZoLxot2LSBbW83WhaqlpSQKn0mTM3RV3AfD0hCj5B9", + "helper_auto_gave_up_v2": "3d1a727f -kE5hOzT97FSMLKi_SZoLxot2LSBbW83WhaqlpSQKn0mTM3RV3AfD08Ux8GA", "helper_auto_off": "8f46f3cf 61emScB5j1OcObkVsZBVqHFl58zW462PAmXIgm1fMDO6iqjIoJvbypaljf5h", "helper_auto_retry": "c6f33f22 VmQMW0i6V04DWr-jO_iS6f0uA5ocfdnpQ09GbJApvHgmxccicWa9C845bNhO", "helper_auto_update_hint_ps5": "82127a1e 4W7czTD-6NmW3UF8VdwDRuKA7sYYv4UqXPCpi4iPm9ZRI2ybD-zO4z5D_x-U", @@ -4417,11 +4417,11 @@ "helper_too_old_detail": "d4ffb38c v8EXwVEKg27SvS-xzvawmYfmvZolnJ8HKiW6twRVt1KiBwxcq6Yk7lOdjSqb", "helper_too_old_title": "ba4846fb 8m_kqe1RytP5pyHoslKpcReMF8Ik8wBBWREcRlY6zfd1PsdN067qZJlS-_s0", "helper_update_action": "f31b4249 gpvM0xMqssB9VVsc0DouyRn6VltSHYubZZbjIyaJ7pv5ESvjDv02UWzipzip", - "helper_update_body": "820b68bf edgxd3nZmvmQ3dJ08g645_pA3_en2wA68jTbHklBB4B24-y1HDL7z4CX59Og", - "helper_update_hold_busy": "425acf58 QusApK2CERuIKyR87hJZpVAdrRHQTXfQgDqyMjGApBgcWQ9H4Nv-NYM5o1pn", - "helper_update_hold_launch": "7bfed54a dJBplvKpKP_WpS1w8QHmRDc2FpLp4IBQQh8IJPvvxcVDTyZ_3UxnbiSNuhfD", - "helper_update_hold_stream": "b0345b37 kZ2keT0I9VS0IXHBca0kfCEa7C9I19Hu3NwJOVzCNUyha-mA2-ICgbvQqX_5", - "helper_update_hold_transfer": "163ebea5 fUZeIAZI3j3lz2kuQhG0cOqgrNAErt9C3h8KtBduX1YUdcmDyU-UMr3oh0jJ", + "helper_update_body": "820b68bf edgxd3nZmvmQ3dJ08g645_pA3_en2wA68jTblU-BB4B24-y1HDL7z4CX59Og", + "helper_update_hold_busy": "425acf58 QusApK2CERuIKyR87hJZpVAdrRHQTXfQgDqya-9ApBgcWQ9H4Nv-NYM5o1pn", + "helper_update_hold_launch": "7bfed54a dJBplvKpKP_WpS1w8QHmRDc2FpLp4IBQQh8IiyXvxcVDTyZ_3UxnbiSNuhfD", + "helper_update_hold_stream": "b0345b37 kZ2keT0I9VS0IXHBca0kfCEa7C9I19Hu3NwJCh-CNUyha-mA2-ICgbvQqX_5", + "helper_update_hold_transfer": "163ebea5 fUZeIAZI3j3lz2kuQhG0cOqgrNAErt9C3h8Kl2-uX1YUdcmDyU-UMr3oh0jJ", "helper_update_title": "f4c6f4af Aj6OANgtyCuxLoUoaUzuuimbdBuxIgULcmZbhvtkvqUhJAoJZKnKoHrrUtZR", "helper_work_convert": "a1a27171 0AFwQSxPrcvYtsVYc_EtmaH4xL0_R8fO1RjO67tEcr5h2L0JGIN2MCCw1eFy", "helper_work_dump": "158a349c -ZzRNrw-NphCqBpaG8vhuyR5kL2Ide0z5dbh2iy4rskiYqq8K_Ubtk1VogmV", @@ -5403,7 +5403,7 @@ "mesh_this_device": "d052579c 9CVlOh15kVjbp5cUkhMmqY-m_aLGxGslp5Z_7nHVjbnYIMvDdcJjDAYlZNBq", "mesh_unblock": "712da631 TyPABmBvM1MLJkAWrcnpdXbCMBVfCRbolDZKu141MLxXo13SrmaaaRKHTqsK", "minion_ampr_emu_done": "08343a7e rUWhZIyYSbXe1ds4s2Cx6gjbCxAwScQMNp0s-6FLnz7_4agKzBlawc74uNxZ", - "minion_ampr_emu_note": "bfd68d3d tKtgYbUHIkRSFZCB5oB30w1tZQvUaKI2VMdGMYXFkLjL7LtOcq32FsodMDz-", + "minion_ampr_emu_note": "bfd68d3d tKtgYbUHIkRSzPpB5oB30w1tFioUaKI2VMdGMYXFkLjL7LtOQ9z2FsodMDz-", "minion_ampr_emu_put": "dca3c21f lSvblMLLKY9774xAZrjgYYehiTnXLQDyFIZWohCM56qtcKjjRRw_swh7g4xq", "minion_boot_helper_note": "adf4affa sK-57ztVkqguojz61Jcj82j1cWd3ZRqildr5Fi8Ig4XG_buVNXtUnBGtgTJf", "minion_enabled_note": "06c7bd3e lELoJ1NLu0jjgPmchC_mIbNJsvilLwVdQM24TSySJTCDMq49GCdwJ-2YPu_X", @@ -5880,8 +5880,8 @@ "picker_choose_folder": "5c71b8cd NYPkPnsIkokFCdUiz4C66lx2T40VtB4xxq0NUXZiJw25jayIYDLH-RDW-FL5", "picker_edit_connection": "047f9f95 U4D00ouCB3mNukx3_oXo-LD1BWYcWryh5NSzJroUwTBpEGPrzaLIYvp_FS29", "picker_empty": "bd88d713 6KaAhsb3Q7rYDzNbJT8o-Qc8Pm9o3T2PUptyVSfc0I4LykRv_g67uHKpn5M-", - "picker_grant_hint": "c76424af eTB55JQOcQiSug2Yfh1OOR4gnvjudvubA5ltlTGljVFJjEdhDbLY_MAf3www", - "picker_grant_hint_prompt": "5421916c W5h8vnqFaRnNMyL5DbDGVX5fHCszBfmOdhf9mq_u4RtN-HJqol1QB1nlbczp", + "picker_grant_hint": "c76424af eTBU9XQOcQiSfAnYfh11ER4g6PLudvzqb5ltlTGljVFJjNqsDbL1ecAf3www", + "picker_grant_hint_prompt": "5421916c YAf8vnmwfRnNMAu5DbS3lX5fHCszBfmOdE48mq_u4RtN-Eiuol1QB1nlbczp", "picker_grant_title": "65e8ed63 2uTzKQ1lzMTdZYRxivjUzYWY001yinAWWZJpCsEVp6Gnqf-6Zi5pHsvYG5ks", "picker_install": "569ca49f II-3h79WgjooA-Nu2spZjT1fMh6xOZ2VvaiiUqLjoot81qq_XV4uHj6PiVMu", "picker_load_more": "ac8991ef TsE9rkLgAhs3UVGt1KS5A3h9KXPUszInCNde2IiNo1oTfx161-UpWzr5Cr0U", @@ -5981,9 +5981,9 @@ "pkg.patch_unverified": "5816a936 -XSBFYV_Ysoe4tMc-b9z68RuVttD8wxTD_V_eSxECqxUDUqvzeQGgdK_nquW", "pkg.preparing_installer": "7685626f J0ssNmNvNLhivohWw9ycMGNwpadWhgeX60jzjGBCaP0tJKm4UGuZTLu0y2h5", "pkg.reach_blocked": "32bdfb59 ZswfI5PKP8x8r3v7vLJKnZsdy_oMIXq89RaYo2XpJ_WCczKWFq1pX3nJbyyR", - "pkg.reach_no_fetch": "15e33355 9W52QlNGQKAHPG9DmukNIZcM69aOzkHF1lBzzfzEwCiNW-luVX7RyshMGyn1", - "pkg.reach_use_upload": "e3c73f97 d0OSpOJnjZvKXdmoJ2ONoyb4fcTBkbGC6ayxlQpaKI4IE2sWDd5eOa9dkojD", - "pkg.reach_usual_cause": "f9cdfde0 QpYj0EK2RjZBmx0uOSNBNAtjOaQ8xIYfknCzd2BDBSd0ASeKjbLvWVMQ8zb4", + "pkg.reach_no_fetch": "15e33355 9W52QlNGQKAHPG9DmukNIZcMyI7OzkHF1lBzzfzEwCiNW-luPT9RyshMGyn1", + "pkg.reach_use_upload": "e3c73f97 d0OSpOJnjZvKXdmFmUONoyb4fcTBkbGC6ayxlQpaKI4IE2sWMHQeOa9dkojD", + "pkg.reach_usual_cause": "f9cdfde0 QpYj0EK2RjZBmx07G2WyRMVROaQ8xIYfknCzd2BDBSd0ASeKX3uvWVMQ8zb4", "pkg.reading_link": "0e7f3895 ySs_bzfbiR_Dr3SBzIi1K225A0_s7eBBgLgy1T5kLdvIQgp_M5OSxdR_ZYep", "pkg.reading_meta": "e2ba60f5 BPsJ2KXT_sqI4ujlWqGnGryRLWzLhgjihn857hFxIPPGRFDx8Xuc44A9AdtC", "pkg.reapply_body": "05765429 4qaq2-sWvJWOH5JkJ1Vkz3R4aJ2TjWlSaLS0S0xfdKOHN6LO15xvCWIpZAkR", @@ -6043,7 +6043,7 @@ "pkg.verified_on_console": "d59cca8a xdkgWFXqcYah1TdVxzBqjRujaPqmeLbhdhSVEuBmTbflhDQYstkoAWNQBkeY", "pkg.verifying": "ad738439 j2Z-c4slssT8Aah_cgggWyhcvMdvY8cyDf3Y77kS-NtCNF7X3O67pp_z2XxD", "pkg.wait_console_fetch": "15cc6621 vij3GewAFL3wIe-4MBOPTcJoSi4mQNPcgDO4WQWA-IA1EVgZpQ-O7CB7lFFp", - "pkg.wait_previous_install": "6969939c NCaaf7162BxMjT2h42xjICcpPdns_JdvZQxk-IDUH7b4_u86dHC0yTv03OV1", + "pkg.wait_previous_install": "6969939c NCaaf7162BxMjT2h42xjICcpPdns_JdvZQxk-IDUH7b4_u86dHC0yTv03y0c", "pkg.wait_reach_check": "a915e010 dVzMudzX56YwGkeI8c1oZfn5eIUaMybezbb2TGAe7iwivpg7kjSTbIvVLQk2", "pkg.waiting_engine": "b3311d08 SWXCoyAAH5jdN2TvhGLRva_TPMvTlHt6-e3G1V0laSGCU3_BqgYaApV6DV6D", "pkg.waiting_ready": "d18f3c05 Yh-mgQaKee9R7IVcGdUox7Ah9Mh0Oa8r3KRmLw5V87VXnaNeXKXCxm9ds-z6", @@ -6111,7 +6111,7 @@ "pkglib.footer.count": "d547bf5b 2Onk5MjuoyGiZohPr_Z7x21PgxQgF_WiqWm7d_LRc2IBpgcAgxQdlFtq7l69", "pkglib.footer.size": "477cdf4e 1EXXgUvegreg-tO35MnOOtl8xzf_XzTy8sWIq4RTVZWtEpE-ii69yk6uqhMY", "pkglib.fpkgsupport.firmware_v4": "e5c77419 Yf7h1RJQGkTyxI2BQsYB-vWWlfDAuEhRVEnVJMUOp3fhNE7jbzaMR4IIWaJG", - "pkglib.fpkgsupport.kstuff_v3": "c923dc2b QZs-wUkpkrN-twEz4U0CC2IV859OZSz5TS_pT0lW84F0QINcelcYG0lAB8Gr", + "pkglib.fpkgsupport.kstuff_v3": "c923dc2b QZs-wUkpkrN-twEz4U0CC2IV859OZSz5TS_pT0lW84F0QINcN45YG0lAB8Gr", "pkglib.fpkgsupport.lead": "96a7b193 6Pw8RqkaDaOvqmN8-s1bdaa351Div1NLXn6PVs7ykQxQpA8uR__3h7osy8GN", "pkglib.fpkgsupport.ppr": "d23b99e4 CEoHAhECEhq5Lk2q2CiVHqXuOKWuONN5t7t8ByXIWC6U8HMBxrrT_VjlXmje", "pkglib.fpkgsupport.ppr_where": "1d3a3fca TaMeQeYPoxF8YBFVzFV-OFZz25BZfZxPWHX0rLSoa_Fm0ljHPpBXfmCWmghH", @@ -6526,7 +6526,7 @@ "profile.username.save": "1509f561 3fynd69rLE-UjP4cdxpTniH8BRCxZlowMX7ktqDrvftNMRF-wf46R8owM26R", "profile.username.slot": "18616a78 UIJvsZGGFksJwhQzQLceL1bYGGFGGFzIV6yWPsqGGFlT-yqYgWAb8Pb-nb-n", "profile.username.slot_label": "f6cfd423 2FehS8vuUOU1qLWEqDZFHI2iDI_rGl-gggpIPmzxsuYh5Qqc9bU9b7RCniKv", - "profile.username.tooLong": "092daf77 D5PJzNPY6LpzqyeinAakZ31gg7Dpfd0QU0rRrZ6lwK3desmx0iimFD1ctR5H", + "profile.username.tooLong": "092daf77 D5PJzNPY6LpzqyeinAakZ31gg7Dpfd0QU0rRrZ6lwK3desmx0iimFD1ctB_T", "profile.username.wipeSavesBody": "b82eb5fd yEJBa-qOdNmy2yBcwoPJjLogtQlAy9P4D1CznIpwM-JHpWF9d8MUvaDtYxSN", "profile.username.wipeSavesNo": "56fb1017 l1xeJto4FZ5rAOlLJ-7l1zOjEFd7wGl32t-gwQjoYM-cX2IzTJLa9EKngwHT", "profile.username.wipeSavesTitle": "027f4ff8 D2DA1-ogi4ox46DbVU7JZrGWQbZWnNEGEIBm3_bfrowFH3mO1d4t23GksQB1", @@ -6933,7 +6933,7 @@ "receive_connecting": "1dda7e06 osgxJ8wsiUTfg1cET1_gMYgKkDtBw9_IMnDO0Nd10QP2qYcgg1xPEylBRO9T", "receive_controls_used": "ee06fcd2 KhSoBViGoWysGUx2fZZ8CCklcG1ji6-kjgcXaRsJWG9AOALoI3SJ1yBUXBUX", "receive_data_unreadable": "70a9db0c 1BPXcVI1V8Vb0VDOpsO7uOZoBLD85M0OsW7uuRzDdX7L78md8Pt4N-qNetMU", - "receive_data_unreadable_body": "fce9b511 mmSvENLeYgXnOXsahgRMru2WDpF0A5sTFSUKSbnmOyA3Yl8Y1NDmsBWeNp9Z", + "receive_data_unreadable_body": "fce9b511 mmSvENLeYgXnOXs2JZRMru2WUhj0A5sTFSUKSbnmOyA3Yl8Y1NDmsBWeNp9Z", "receive_declined": "2f56155e HR1y3O7-jZJzpBPsVp7IEomOhv2303nwAkW9SzpufoRtieagDn8R3Jt5HWvj", "receive_done": "278a6cad ih2vpdlEvDm5fvQJ3pGHaaFpPUsmOHFNU8fpMm_ngZ_k5r1pMhrCi7wO5TDX", "receive_done_button": "11a6767d PvVIaYJdUtfpZdJ8orSbsC89_uXBZgEDFcnMPZ0bpF7wXYvjvoYpvRwLPwLP", From ffc38908a0c2695b7fa11704d89756fe603a20ff Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:47:33 -0800 Subject: [PATCH 21/75] API doc: every route has a summary, install status and queue items described - GET /api/pkg/install/status now documents its answer (InstallStatus), including `waiting`, `reach` and the stream_unreachable and cancelled reasons. The handler names the type; behaviour is unchanged. - The 25 routes without a summary have one (Tailscale, console backup, save backup folders and export, Payload Manager autoload, Remote Play controller and pairing tries, Play Together profiles, shares, Kraken remove, mounter rescan, payload latest release, archive free-check, AMPR emulator to the console). - /api/fpkg/extract/free-check describes every field it answers. - /api/ps5/volumes says its sizes are filesystem counters, not the PS5 Storage screen's, and where to read what a copy can take. - The queue's item fields and statuses are listed; `cancelled` is a stop, not a failure, with `code` cancelled. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- .../crates/ps5upload-engine/api/openapi.json | 369 +++++++++++++++++- .../ps5upload-engine/api/overrides.json | 69 ++++ .../ps5upload-engine/src/archive_free.rs | 16 +- .../ps5upload-engine/src/convert_runtime.rs | 5 +- .../ps5upload-engine/src/install/mod.rs | 13 +- engine/crates/ps5upload-engine/src/lib.rs | 6 + .../crates/ps5upload-engine/src/queue_api.rs | 13 +- 7 files changed, 473 insertions(+), 18 deletions(-) diff --git a/engine/crates/ps5upload-engine/api/openapi.json b/engine/crates/ps5upload-engine/api/openapi.json index 69ceec6c7..4d98a00e0 100644 --- a/engine/crates/ps5upload-engine/api/openapi.json +++ b/engine/crates/ps5upload-engine/api/openapi.json @@ -4087,6 +4087,28 @@ ], "type": "object" }, + "FailReason": { + "enum": [ + "loader_unreachable", + "no_bringup", + "no_image", + "source_gone", + "origin_changed", + "sony_refused", + "destructive_guard", + "bad_request", + "stalled", + "stream_unreachable", + "stream_proxy", + "staged_refused", + "cancelled", + "base_missing", + "busy", + "image_mounted", + "reply_lost" + ], + "type": "string" + }, "FanThresholdReq": { "properties": { "addr": { @@ -7185,6 +7207,177 @@ ], "type": "object" }, + "InstallStatus": { + "properties": { + "app_ver_after": { + "type": [ + "string", + "null" + ] + }, + "app_ver_before": { + "type": [ + "string", + "null" + ] + }, + "code": { + "minimum": 0, + "type": "integer" + }, + "content_id": { + "type": "string" + }, + "hint": { + "type": [ + "string", + "null" + ] + }, + "job": { + "type": "string" + }, + "metrics": { + "$ref": "#/components/schemas/Metrics" + }, + "net_diag": { + "anyOf": [ + { + "$ref": "#/components/schemas/NetDiag" + }, + { + "type": "null" + } + ], + "description": "Windows only: which local adapter faces the console, what network category Windows gave it\nand whether the firewall lets this engine in on it. Set when the console could not reach\nthis computer; the UI offers the fixes it implies. Never set off Windows." + }, + "package_type": { + "description": "The package's type as the engine came to know it (`PS4DP`, `PS5GD`…), for a check the\nclient goes on making after the job has ended.", + "type": [ + "string", + "null" + ] + }, + "patch_verdict": { + "anyOf": [ + { + "$ref": "#/components/schemas/PatchVerdict" + }, + { + "type": "null" + } + ] + }, + "phase": { + "$ref": "#/components/schemas/Phase" + }, + "ps5_addr": { + "type": "string" + }, + "reach": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReachFail" + }, + { + "type": "null" + } + ], + "description": "With `FailReason::StreamUnreachable` from the reach check or the no-request watchdog\n(#942): where the console was sent and how its connect ended, for the client to word." + }, + "reason": { + "anyOf": [ + { + "$ref": "#/components/schemas/FailReason" + }, + { + "type": "null" + } + ] + }, + "replaces": { + "description": "With `FailReason::DestructiveGuard`: what the install would replace, so the client can ask\nin the right words: \"game\" (Sony removes it first) or \"update\" (one already applied, which\nre-applying can undo).", + "type": [ + "string", + "null" + ] + }, + "retry_with_stream": { + "description": "The failure is the console refusing a package from its own storage and the same\npackage can safely be sent through Stream: the client may offer \"Retry with Stream\".", + "type": "boolean" + }, + "route": { + "anyOf": [ + { + "$ref": "#/components/schemas/Route" + }, + { + "type": "null" + } + ] + }, + "shortened": { + "type": "boolean" + }, + "started_at": { + "description": "Epoch seconds (the engine has no date crate and stamps time this way\neverywhere, e.g. session `created_at_unix`); the client formats it.", + "minimum": 0, + "type": "integer" + }, + "title_id": { + "type": [ + "string", + "null" + ] + }, + "updated_at": { + "minimum": 0, + "type": "integer" + }, + "verdict": { + "anyOf": [ + { + "$ref": "#/components/schemas/Verdict" + }, + { + "type": "null" + } + ] + }, + "waiting": { + "anyOf": [ + { + "$ref": "#/components/schemas/Waiting" + }, + { + "type": "null" + } + ], + "description": "On a running job: what it is waiting for before the console has moved a byte (an earlier\ninstall's call, the reach check, the console's first request). Absent otherwise." + } + }, + "required": [ + "job", + "ps5_addr", + "content_id", + "title_id", + "phase", + "route", + "verdict", + "code", + "hint", + "reason", + "metrics", + "app_ver_before", + "app_ver_after", + "patch_verdict", + "shortened", + "retry_with_stream", + "started_at", + "updated_at" + ], + "type": "object" + }, "InstalledApp": { "properties": { "image_backed": { @@ -9446,6 +9639,54 @@ ], "type": "object" }, + "NetCategory": { + "description": "A Windows network category.", + "enum": [ + "public", + "private", + "domain", + "unknown" + ], + "type": "string" + }, + "NetDiag": { + "description": "What was found about the link to the console.", + "properties": { + "adapter": { + "description": "The local adapter on the console's subnet (\"Ethernet 3\").", + "type": "string" + }, + "allowed_by_rule": { + "description": "Whether an enabled inbound Allow rule for this engine (by program, or by its port) covers\nthat category's profile (`None` = not read).", + "type": [ + "boolean", + "null" + ] + }, + "category": { + "$ref": "#/components/schemas/NetCategory" + }, + "firewall_enabled": { + "description": "Whether Windows Firewall is on for that category's profile (`None` = not read).", + "type": [ + "boolean", + "null" + ] + }, + "local_ip": { + "description": "This computer's address on that adapter.", + "type": "string" + } + }, + "required": [ + "adapter", + "local_ip", + "category", + "firewall_enabled", + "allowed_by_rule" + ], + "type": "object" + }, "NetInterface": { "properties": { "flags": { @@ -10193,6 +10434,15 @@ ], "type": "object" }, + "PatchVerdict": { + "enum": [ + "applied", + "did_not_apply", + "regressed", + "inconclusive" + ], + "type": "string" + }, "PathStat": { "description": "What `fs.stat` says about a path (a symbolic link is followed; a dangling one is `link`).", "properties": { @@ -10316,6 +10566,17 @@ ], "type": "object" }, + "Phase": { + "enum": [ + "resolve", + "deliver", + "install", + "verify", + "done", + "failed" + ], + "type": "string" + }, "PictureReq": { "properties": { "host": { @@ -11682,6 +11943,63 @@ ], "type": "object" }, + "ReachCause": { + "description": "How the console's connect ended.", + "enum": [ + "timed_out", + "refused", + "other", + "unknown" + ], + "type": "string" + }, + "ReachFail": { + "description": "A stream the console could not start, in facts: the app words it in the user's language.", + "properties": { + "cause": { + "$ref": "#/components/schemas/ReachCause" + }, + "detail": { + "description": "What is known beyond the usual cause: Windows' own account of the network, or that the\nengine runs in a container. English.", + "type": [ + "string", + "null" + ] + }, + "origin": { + "description": "`http://host:port` the console was (or would have been) sent to.", + "type": "string" + }, + "source": { + "description": "The install's source kind (`host_file`, `remote`, …): only a file on this computer can\nbe uploaded instead.", + "type": "string" + }, + "stage": { + "$ref": "#/components/schemas/ReachStage" + }, + "waited_s": { + "description": "Seconds waited for a request (`NoFetch`), else 0.", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "stage", + "origin", + "cause", + "waited_s", + "source" + ], + "type": "object" + }, + "ReachStage": { + "description": "Where a stream that never started was found out.", + "enum": [ + "check", + "no_fetch" + ], + "type": "string" + }, "ReaderMetadata": { "description": "The subset of [`PkgMetadata`] recoverable from ranged reads — enough to\nenrich a listing row without parsing the whole file.", "properties": { @@ -16009,6 +16327,15 @@ ], "type": "object" }, + "Waiting": { + "description": "What a job is waiting for before the console has moved a byte, for the app to say.", + "enum": [ + "previous_install", + "reach_check", + "console_fetch" + ], + "type": "string" + }, "WrappedGameHint": { "description": "A game found one level down inside an otherwise-empty wrapper folder.", "properties": { @@ -20140,6 +20467,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Back up the chosen parts of a console (saves, captures, payload settings, homebrew) into a folder on this computer", "tags": [ "console-backup" ], @@ -20317,6 +20645,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Put a console backup from this computer back onto a console", "tags": [ "console-backup" ], @@ -20433,6 +20762,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "How the running console backup or restore stands", "tags": [ "console-backup" ], @@ -23480,7 +23810,7 @@ }, "/api/fpkg/extract/free-check": { "post": { - "description": "POST /api/fpkg/extract/free-check — whether an archive can be unpacked with its own space\ngiven back (`free_archive` on `/api/fpkg/extract`), and how: `mode` is `entries` (a `.zip`:\nfreed file by file), `blocks` (a `.7z` of more than one block: block by block), `parts` (a\nmulti-part `.rar`: part by part) or `end` (anything else: deleted once the unpack is\nfinished and checked). `parts` counts the blocks or parts (1 otherwise); `game` is `folder`\nor `image`. Changes nothing. 400 with the plain reason when it can't be done.", + "description": "POST /api/fpkg/extract/free-check — whether an archive can be unpacked with its space given\nback. Asks before `free_archive` on `/api/fpkg/extract`, and says how it would go: `mode` is\n`entries` (a `.zip`: freed file by file), `blocks` (a `.7z` of more than one block: block by\nblock), `parts` (a multi-part `.rar`: part by part) or `end` (anything else: deleted once the\nunpack is finished and checked). `parts` counts the blocks or parts (1 otherwise); `game` is\n`folder` or `image`. `archive_bytes` is the archive's size (every part), `unpacked` what it\nunpacks to, `same_drive` whether it sits on the output folder's drive (only then does its\nfreed space count), `needed` the free bytes the unpack and the build after it need, and\n`free` the output folder's free bytes (null when they could not be read). Changes nothing.\n400 with the plain reason when it can't be done, including too little room.", "requestBody": { "content": { "application/json": { @@ -23529,6 +23859,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Whether an archive can be unpacked with its space given back", "tags": [ "workshop" ], @@ -25080,6 +25411,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "The profiles signed in on a console and which one each guest plays as", "tags": [ "play-together" ], @@ -28327,6 +28659,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "A payload's newest release", "tags": [ "payloads" ], @@ -28744,6 +29077,7 @@ }, "/api/pkg/install/status": { "get": { + "description": "`GET /api/pkg/install/status?job=`: how an install job stands. While it runs, `phase` says\nwhere it is, and `waiting` what it waits for before the console has moved a byte:\n`previous_install` (an earlier install's call has to end first), `reach_check` (asking the\nhelper whether the console reaches this computer) or `console_fetch` (the console has the\nlink and has not asked for the package yet). A failed job has `reason`: `stream_unreachable`\nwhen the console could not fetch from this computer, with `reach` saying where it was sent\n(`origin`), at which `stage` it was found (`check` before the link was handed over, or\n`no_fetch` after the console never asked for it), how its connect ended (`cause`) and how\nlong it was waited for (`waited_s`), and `hint` the message; `cancelled` when it was\nstopped. 404 for a job this engine does not know (finished ones are kept for a while).", "parameters": [ { "in": "query", @@ -28758,10 +29092,12 @@ "200": { "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/InstallStatus" + } } }, - "description": "Success: JSON the engine does not describe field by field, often what the console sent." + "description": "Success." }, "403": { "$ref": "#/components/responses/Error", @@ -28803,7 +29139,7 @@ ], "x-ps5upload": { "access": "loopback", - "response_schema": "json-unknown" + "response_schema": "struct" } } }, @@ -33803,7 +34139,7 @@ }, "/api/ps5/convert-ampr-emu": { "post": { - "description": "POST /api/ps5/convert-ampr-emu {host} — put ampr_emu (the release the desktop app installs\ninto games, digest checked, from this computer's cache or downloaded) on the console under\n/data/ps5upload/convert/runtime/ampr_emu-/, so Convert on the PS5 can keep an\nemulator when it unpacks asset packs. Only on request, never on its own. Answers {version,\npath, written}; written is false when that version was already there. 502 when it could not\nbe downloaded or written; needs the helper up.", + "description": "POST /api/ps5/convert-ampr-emu {host} — put the AMPR emulator on the console for Convert on\nthe PS5. That is ampr_emu, the release the desktop app installs into games (digest checked,\nfrom this computer's cache or downloaded), written under\n/data/ps5upload/convert/runtime/ampr_emu-/, so Convert on the PS5 can keep an\nemulator when it unpacks asset packs. Only on request, never on its own. Answers {version,\npath, written}; written is false when that version was already there. 502 when it could not\nbe downloaded or written; needs the helper up.", "requestBody": { "content": { "application/json": { @@ -33850,6 +34186,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Put the AMPR emulator on the console for Convert on the PS5", "tags": [ "console-tools" ], @@ -38115,6 +38452,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Remove a game Kraken Mount mounts, deleting its source", "tags": [ "console-tools" ], @@ -39119,6 +39457,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Set Payload Manager's boot autoload switch and list, and read it back", "tags": [ "payloads" ], @@ -40838,6 +41177,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "What Remote Play sends the console's controller, per controller", "tags": [ "remote-play" ], @@ -42113,6 +42453,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "The last Remote Play pairing tries and how each ended", "tags": [ "remote-play" ], @@ -44136,6 +44477,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Ask the console's mounter to scan for games again now", "tags": [ "shadowmount" ], @@ -44413,6 +44755,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "The console's Tailscale node: state, address, peers and who may reach it", "tags": [ "console-tools" ], @@ -44513,6 +44856,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Put the console on Tailscale, pause, sign out, rename it or change who may reach it", "tags": [ "console-tools" ], @@ -45519,7 +45863,7 @@ }, "/api/ps5/volumes": { "get": { - "description": "GET /api/ps5/volumes?addr=IP:PORT — enumerate mounted PS5 storage volumes.", + "description": "GET /api/ps5/volumes?addr=IP:PORT — enumerate mounted PS5 storage volumes.\n\n`total_bytes` and `free_bytes` are the filesystem's own counters (`statfs`), not the figures\nof the PS5's Settings > Storage screen, which can show less free space. On internal storage\n`free_bytes` already leaves out what the filesystem holds back (`user_reserved_bytes` in\n`/api/ps5/hw/storage`). For how much a copy can take, read `allocatable_bytes` and\n`likely_fits_bytes`.", "parameters": [ { "in": "query", @@ -45582,7 +45926,7 @@ }, "/api/queue": { "get": { - "description": "GET /api/queue?console= — one console's line, or every console's.", + "description": "GET /api/queue?console= — one console's line, or every console's. Answers `{items, consoles}`:\neach item is `{id, console, kind, label, status, request, stop_on_failure, added_at_ms,\nstarted_at_ms?, finished_at_ms?, job_id?, runs, error?, code?, verdict?, hint?, progress?,\nposition?}`, `status` one of `queued`, `running`, `paused`, `done`, `failed`, `cancelled`\n(stopped, not failed: `code` `cancelled`) or `interrupted`; `position` is a waiting item's\nplace in its console's line.", "parameters": [ { "in": "query", @@ -47259,6 +47603,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "One game's save backups on the console's chosen drives", "tags": [ "saves" ], @@ -47606,6 +47951,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Save a save backup as a file for a friend or another PS5", "tags": [ "saves" ], @@ -47679,6 +48025,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "The folder backups a console may be given back, per folder, newest first", "tags": [ "saves" ], @@ -47791,6 +48138,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Put a folder backup back where it came from", "tags": [ "saves" ], @@ -48559,6 +48907,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Continue the last save backup run, or retry some of its saves", "tags": [ "saves" ], @@ -50026,6 +50375,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "One incoming share and how it stands", "tags": [ "share" ], @@ -50369,6 +50719,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "One outgoing share and how it stands", "tags": [ "share" ], @@ -51229,6 +51580,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "This engine's own Tailscale node and the consoles it reaches through it", "tags": [ "tailnet" ], @@ -51313,6 +51665,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Turn this engine's own Tailscale node on or off, or change it", "tags": [ "tailnet" ], @@ -51709,6 +52062,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "Why the engine reaches a console the way it does now", "tags": [ "tailnet" ], @@ -51770,6 +52124,7 @@ "description": "Any other failure, in the same shape." } }, + "summary": "How the engine reaches one console now: on the home network, or through Tailscale direct or relayed", "tags": [ "tailnet" ], diff --git a/engine/crates/ps5upload-engine/api/overrides.json b/engine/crates/ps5upload-engine/api/overrides.json index 2df1696d6..287dc74f3 100644 --- a/engine/crates/ps5upload-engine/api/overrides.json +++ b/engine/crates/ps5upload-engine/api/overrides.json @@ -1175,6 +1175,75 @@ }, "PUT /api/shared/{name}": { "summary": "Write a shared document, 409 when another write came first" + }, + "GET /api/ps5/tailnet": { + "summary": "The console's Tailscale node: state, address, peers and who may reach it" + }, + "POST /api/ps5/tailnet": { + "summary": "Put the console on Tailscale, pause, sign out, rename it or change who may reach it" + }, + "GET /api/tailnet": { + "summary": "This engine's own Tailscale node and the consoles it reaches through it" + }, + "POST /api/tailnet": { + "summary": "Turn this engine's own Tailscale node on or off, or change it" + }, + "GET /api/tailnet/route": { + "summary": "Why the engine reaches a console the way it does now" + }, + "GET /api/tailnet/via": { + "summary": "How the engine reaches one console now: on the home network, or through Tailscale direct or relayed" + }, + "POST /api/console-backup/backup": { + "summary": "Back up the chosen parts of a console (saves, captures, payload settings, homebrew) into a folder on this computer" + }, + "POST /api/console-backup/restore": { + "summary": "Put a console backup from this computer back onto a console" + }, + "GET /api/console-backup/status": { + "summary": "How the running console backup or restore stands" + }, + "POST /api/save-backup/runs/continue": { + "summary": "Continue the last save backup run, or retry some of its saves" + }, + "GET /api/save-backup/folders": { + "summary": "The folder backups a console may be given back, per folder, newest first" + }, + "POST /api/save-backup/folders/restore": { + "summary": "Put a folder backup back where it came from" + }, + "GET /api/save-backup/console/list": { + "summary": "One game's save backups on the console's chosen drives" + }, + "POST /api/save-backup/export": { + "summary": "Save a save backup as a file for a friend or another PS5" + }, + "POST /api/ps5/pldmgr/autoload": { + "summary": "Set Payload Manager's boot autoload switch and list, and read it back" + }, + "GET /api/ps5/rp/controller": { + "summary": "What Remote Play sends the console's controller, per controller" + }, + "GET /api/ps5/rp/pair/attempts": { + "summary": "The last Remote Play pairing tries and how each ended" + }, + "GET /api/join/profiles": { + "summary": "The profiles signed in on a console and which one each guest plays as" + }, + "GET /api/share/{id}": { + "summary": "One outgoing share and how it stands" + }, + "GET /api/share/receive/{id}": { + "summary": "One incoming share and how it stands" + }, + "POST /api/ps5/kraken/remove": { + "summary": "Remove a game Kraken Mount mounts, deleting its source" + }, + "POST /api/ps5/smp/rescan": { + "summary": "Ask the console's mounter to scan for games again now" + }, + "GET /api/payloads/{id}/releases/latest": { + "summary": "A payload's newest release" } }, "tags": { diff --git a/engine/crates/ps5upload-engine/src/archive_free.rs b/engine/crates/ps5upload-engine/src/archive_free.rs index 3858fc8b6..c642a7360 100644 --- a/engine/crates/ps5upload-engine/src/archive_free.rs +++ b/engine/crates/ps5upload-engine/src/archive_free.rs @@ -153,12 +153,16 @@ pub(crate) struct FreeCheckReq { password: Option, } -/// POST /api/fpkg/extract/free-check — whether an archive can be unpacked with its own space -/// given back (`free_archive` on `/api/fpkg/extract`), and how: `mode` is `entries` (a `.zip`: -/// freed file by file), `blocks` (a `.7z` of more than one block: block by block), `parts` (a -/// multi-part `.rar`: part by part) or `end` (anything else: deleted once the unpack is -/// finished and checked). `parts` counts the blocks or parts (1 otherwise); `game` is `folder` -/// or `image`. Changes nothing. 400 with the plain reason when it can't be done. +/// POST /api/fpkg/extract/free-check — whether an archive can be unpacked with its space given +/// back. Asks before `free_archive` on `/api/fpkg/extract`, and says how it would go: `mode` is +/// `entries` (a `.zip`: freed file by file), `blocks` (a `.7z` of more than one block: block by +/// block), `parts` (a multi-part `.rar`: part by part) or `end` (anything else: deleted once the +/// unpack is finished and checked). `parts` counts the blocks or parts (1 otherwise); `game` is +/// `folder` or `image`. `archive_bytes` is the archive's size (every part), `unpacked` what it +/// unpacks to, `same_drive` whether it sits on the output folder's drive (only then does its +/// freed space count), `needed` the free bytes the unpack and the build after it need, and +/// `free` the output folder's free bytes (null when they could not be read). Changes nothing. +/// 400 with the plain reason when it can't be done, including too little room. pub(crate) async fn free_check_handler(Json(req): Json) -> impl IntoResponse { let source = crate::fpkg_api::resolve_engine_path(&req.source); if archive_extract::archive_kind(&source).is_none() || !source.is_file() { diff --git a/engine/crates/ps5upload-engine/src/convert_runtime.rs b/engine/crates/ps5upload-engine/src/convert_runtime.rs index 4029bbecc..a0e310cf2 100644 --- a/engine/crates/ps5upload-engine/src/convert_runtime.rs +++ b/engine/crates/ps5upload-engine/src/convert_runtime.rs @@ -550,8 +550,9 @@ pub(crate) async fn put_handler(Json(req): Json) -> impl } } -/// POST /api/ps5/convert-ampr-emu {host} — put ampr_emu (the release the desktop app installs -/// into games, digest checked, from this computer's cache or downloaded) on the console under +/// POST /api/ps5/convert-ampr-emu {host} — put the AMPR emulator on the console for Convert on +/// the PS5. That is ampr_emu, the release the desktop app installs into games (digest checked, +/// from this computer's cache or downloaded), written under /// /data/ps5upload/convert/runtime/ampr_emu-/, so Convert on the PS5 can keep an /// emulator when it unpacks asset packs. Only on request, never on its own. Answers {version, /// path, written}; written is false when that version was already there. 502 when it could not diff --git a/engine/crates/ps5upload-engine/src/install/mod.rs b/engine/crates/ps5upload-engine/src/install/mod.rs index e9e3e79ce..ef2f327d9 100644 --- a/engine/crates/ps5upload-engine/src/install/mod.rs +++ b/engine/crates/ps5upload-engine/src/install/mod.rs @@ -1386,11 +1386,22 @@ pub async fn install_stop_handler( } } +/// `GET /api/pkg/install/status?job=`: how an install job stands. While it runs, `phase` says +/// where it is, and `waiting` what it waits for before the console has moved a byte: +/// `previous_install` (an earlier install's call has to end first), `reach_check` (asking the +/// helper whether the console reaches this computer) or `console_fetch` (the console has the +/// link and has not asked for the package yet). A failed job has `reason`: `stream_unreachable` +/// when the console could not fetch from this computer, with `reach` saying where it was sent +/// (`origin`), at which `stage` it was found (`check` before the link was handed over, or +/// `no_fetch` after the console never asked for it), how its connect ended (`cause`) and how +/// long it was waited for (`waited_s`), and `hint` the message; `cancelled` when it was +/// stopped. 404 for a job this engine does not know (finished ones are kept for a while). pub async fn install_status_handler( State(state): State, Query(q): Query, ) -> Response { - match state.jobs.get(&q.job) { + let found: Option = state.jobs.get(&q.job); + match found { Some(st) => Json(st).into_response(), None => ( StatusCode::NOT_FOUND, diff --git a/engine/crates/ps5upload-engine/src/lib.rs b/engine/crates/ps5upload-engine/src/lib.rs index 10099f9cb..978170d2d 100644 --- a/engine/crates/ps5upload-engine/src/lib.rs +++ b/engine/crates/ps5upload-engine/src/lib.rs @@ -7066,6 +7066,12 @@ async fn ps5_pkg_metadata( } /// GET /api/ps5/volumes?addr=IP:PORT — enumerate mounted PS5 storage volumes. +/// +/// `total_bytes` and `free_bytes` are the filesystem's own counters (`statfs`), not the figures +/// of the PS5's Settings > Storage screen, which can show less free space. On internal storage +/// `free_bytes` already leaves out what the filesystem holds back (`user_reserved_bytes` in +/// `/api/ps5/hw/storage`). For how much a copy can take, read `allocatable_bytes` and +/// `likely_fits_bytes`. async fn ps5_volumes( State(state): State, Query(q): Query, diff --git a/engine/crates/ps5upload-engine/src/queue_api.rs b/engine/crates/ps5upload-engine/src/queue_api.rs index 45c60ae08..ba5720bb2 100644 --- a/engine/crates/ps5upload-engine/src/queue_api.rs +++ b/engine/crates/ps5upload-engine/src/queue_api.rs @@ -180,7 +180,8 @@ pub(crate) enum Status { Paused, Done, Failed, - /// Someone stopped its job or install directly. + /// Someone stopped its job or install directly, whatever words its error used: `code` is + /// then `cancelled`. Not a failure: it never holds the items after a `stop_on_failure` item. Cancelled, /// Was running when the engine stopped, or its job can no longer be found. Interrupted, @@ -229,6 +230,9 @@ pub(crate) struct Item { runs: u32, #[serde(default, skip_serializing_if = "Option::is_none")] error: Option, + /// Why it ended as it did, for a client to word: the job's or install's own reason (such as + /// `stream_unreachable`), `cancelled`, `job_lost`, or `held_after_failure` on an item paused + /// because an earlier `stop_on_failure` item failed. #[serde(default, skip_serializing_if = "Option::is_none")] code: Option, /// How an install ended: installed, may_not_launch, unverified. @@ -1349,7 +1353,12 @@ struct ListQuery { console: Option, } -/// GET /api/queue?console= — one console's line, or every console's. +/// GET /api/queue?console= — one console's line, or every console's. Answers `{items, consoles}`: +/// each item is `{id, console, kind, label, status, request, stop_on_failure, added_at_ms, +/// started_at_ms?, finished_at_ms?, job_id?, runs, error?, code?, verdict?, hint?, progress?, +/// position?}`, `status` one of `queued`, `running`, `paused`, `done`, `failed`, `cancelled` +/// (stopped, not failed: `code` `cancelled`) or `interrupted`; `position` is a waiting item's +/// place in its console's line. async fn list_handler(State(queue): State, Query(q): Query) -> Response { let wanted = q .console From 0cf0c48a90a6480fdc91240d5fd2891fc2ae42a0 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:47:33 -0800 Subject: [PATCH 22/75] MCP: tools for a package's name and Convert's archive and emulator steps New tools: install_pkg_name (read a fake package's names and how long a new one may be), install_pkg_rename (change it in the file; destructive), convert_archive_free_check (whether an archive can give its space back while it unpacks; read only) and convert_ampr_emu_to_console (write the AMPR emulator to the console for Convert on the PS5; destructive). The destructive ones are listed in MCP.md with the others a client should ask about first. install_status now names `waiting`, `reach` and the stream_unreachable reason, queue_list says cancelled is a stop and not a failure, and files_volumes says its sizes are the filesystem's, not the PS5 Storage screen's. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- MCP.md | 5 +- .../crates/ps5upload-engine/src/mcp/tests.rs | 55 ++++++++++++++++ .../ps5upload-engine/src/mcp/tools/convert.rs | 63 +++++++++++++++++++ .../ps5upload-engine/src/mcp/tools/install.rs | 49 ++++++++++++++- .../ps5upload-engine/src/mcp/tools/mod.rs | 2 + .../src/mcp/tools/more_files.rs | 5 +- .../ps5upload-engine/src/mcp/tools/queue.rs | 8 ++- 7 files changed, 180 insertions(+), 7 deletions(-) create mode 100644 engine/crates/ps5upload-engine/src/mcp/tools/convert.rs diff --git a/MCP.md b/MCP.md index fde6994b0..397ee2e58 100644 --- a/MCP.md +++ b/MCP.md @@ -23,7 +23,8 @@ More than 120 tools, all of them thin layers over [the engine's API](API.md): | Consoles | `consoles_*`, `tailnet_consoles` | The known ones, find them on the network or on Tailscale, how one stands and how its last status checks went, make sure the helper runs | | Files | `files_*` | List, read, write, copy, move, delete, hash, extract, mount, eject | | Moving things | `upload_*`, `queue_*`, `files_download`, `sources_*`, `jobs_*` | Send a file or folder or archive, line work up per console, follow it, pause or stop it, fetch from a NAS | -| Installs | `install_*` | Install a package by the best route, check first, wait for it | +| Installs | `install_*` | Install a package by the best route, check first, wait for it; read or change a fake package's name before it goes | +| Convert | `convert_*` | Whether an archive can give its space back while it unpacks; put the AMPR emulator on a console for Convert on the PS5 (a conversion itself goes through `api_request`) | | Games | `games_*`, `processes_*`, `saves_*`, `cheats_*` | Installed titles, launch and stop, back up saves, cheats | | Hardware | `hw_*`, `power_*`, `notifications_*`, `health_*`, `disk_usage_*`, `cleanup_*`, `shell_run` | Temperatures, rest and wake, health checks and repairs, what fills the drive | | Payloads | `payloads_*` | Catalogue, new-version checks and rollback, send (a file, or a copy already on the computer: ps5upload never downloads payloads), store, autoload, Payload Manager sync | @@ -273,6 +274,8 @@ clients let you allow tools one by one, so keep these on "ask". | `files_extract` | Unpack over what's already there | | `files_unmount`, `files_eject` | Pull a drive out from under a running game | | `upload_file`, `upload_dir`, `upload_archive`, `queue_add` | Overwrite what's at the destination | +| `install_pkg_rename` | Change the name inside a package file on this computer | +| `convert_ampr_emu_to_console` | Write the AMPR emulator onto the console | | `saves_restore` | Replace save data with a backup | | `games_unregister` | Remove a title from the console | | `games_stop`, `processes_kill` | End a game, losing what isn't saved | diff --git a/engine/crates/ps5upload-engine/src/mcp/tests.rs b/engine/crates/ps5upload-engine/src/mcp/tests.rs index 157cee144..a6200bcfe 100644 --- a/engine/crates/ps5upload-engine/src/mcp/tests.rs +++ b/engine/crates/ps5upload-engine/src/mcp/tests.rs @@ -3412,3 +3412,58 @@ async fn the_guides_and_the_document_are_resources() { assert!(text.len() > 1000, "{uri}"); } } + +/// The package-name and Convert tools reach their routes with fields the routes read, and the ones +/// that write are marked destructive, so a client asks the user first. +#[tokio::test] +async fn package_name_and_convert_tools_send_what_their_routes_read() { + let server = echo_server(); + let asked = route_of(&server, "install_pkg_name", json!({"path": "/g/a.pkg"})).await; + assert_eq!(asked["method"], "GET"); + assert_eq!(asked["path"], "/api/pkg/name"); + assert_eq!(asked["query"]["path"], "/g/a.pkg"); + + let asked = route_of( + &server, + "install_pkg_rename", + json!({"path": "/g/a.pkg", "name": "My game", "all_languages": true}), + ) + .await; + assert_eq!(asked["method"], "POST"); + assert_eq!(asked["path"], "/api/pkg/name"); + reads_as::(&asked["body"]); + assert_eq!(asked["body"]["all_languages"], true); + + let asked = route_of( + &server, + "convert_archive_free_check", + json!({"source": "/g/a.7z", "output_dir": "/out"}), + ) + .await; + assert_eq!(asked["path"], "/api/fpkg/extract/free-check"); + reads_as::(&asked["body"]); + + let asked = route_of( + &server, + "convert_ampr_emu_to_console", + json!({"console": "1.2.3.4"}), + ) + .await; + assert_eq!(asked["path"], "/api/ps5/convert-ampr-emu"); + assert_eq!(asked["body"]["host"], "1.2.3.4"); + reads_as::(&asked["body"]); + + let answer = server.legacy("tools/list", json!({})).await; + let tools = answer.body["result"]["tools"].as_array().unwrap(); + let hints = |name: &str| { + let tool = tools.iter().find(|t| t["name"] == name).unwrap(); + ( + tool["annotations"]["readOnlyHint"].as_bool().unwrap(), + tool["annotations"]["destructiveHint"].as_bool().unwrap(), + ) + }; + assert_eq!(hints("install_pkg_name"), (true, false)); + assert_eq!(hints("convert_archive_free_check"), (true, false)); + assert_eq!(hints("install_pkg_rename"), (false, true)); + assert_eq!(hints("convert_ampr_emu_to_console"), (false, true)); +} diff --git a/engine/crates/ps5upload-engine/src/mcp/tools/convert.rs b/engine/crates/ps5upload-engine/src/mcp/tools/convert.rs new file mode 100644 index 000000000..c4860e317 --- /dev/null +++ b/engine/crates/ps5upload-engine/src/mcp/tools/convert.rs @@ -0,0 +1,63 @@ +//! Convert's checks and its part on the console: `convert_archive_free_check`, +//! `convert_ampr_emu_to_console`. +//! +//! A conversion itself (`/api/fpkg/build`, `/api/fpkg/extract`, …) is a long job with many +//! choices: `api_describe` and `api_request` reach it. + +use serde_json::json; + +use super::route::{route, text}; +use super::{console_required, object, Kind, ToolDef}; + +pub(super) fn tools() -> Vec { + vec![ + ToolDef { + name: "convert_archive_free_check", + title: "Can an archive free its space", + description: "Whether a .zip, .7z or .rar on the engine's computer can be unpacked \ + with its own space given back as it unpacks (`free_archive` on \ + /api/fpkg/extract, which DELETES the archive), and how: `mode` is \ + entries (.zip, file by file), blocks (.7z, block by block), parts \ + (multi-part .rar, part by part) or end (deleted once unpacked and \ + checked). `needed` and `free` are bytes in the output folder. Changes \ + nothing; an error says why it can't be done, including too little room.", + kind: Kind::Read, + schema: object( + json!({ + "source": text( + "The archive (for a multi-part .rar, its first part), on the computer \ + the engine runs on.", + ), + "output_dir": text( + "Where Convert would unpack it. Default: Convert's output folder.", + ), + "password": text("A .rar's password, if it has one. Never logged."), + }), + &["source"], + ), + run: route!( + method: "POST", + path: "/api/fpkg/extract/free-check", + done: "How the archive would be freed.", + ), + }, + ToolDef { + name: "convert_ampr_emu_to_console", + title: "Put the AMPR emulator on a console", + description: "Writes the AMPR emulator (ampr_emu, the release the app installs into \ + games, digest checked) to the console under \ + /data/ps5upload/convert/runtime/, so Convert on the PS5 can keep an \ + emulator when it unpacks asset packs. Only when the user asked for it. \ + Answers `{version, path, written}`; `written: false` when that version \ + was already there. Needs the helper running.", + kind: Kind::Destructive { idempotent: true }, + schema: object(json!({ "console": console_required() }), &["console"]), + run: route!( + method: "POST", + path: "/api/ps5/convert-ampr-emu", + console: "host", + done: "The AMPR emulator is on the console.", + ), + }, + ] +} diff --git a/engine/crates/ps5upload-engine/src/mcp/tools/install.rs b/engine/crates/ps5upload-engine/src/mcp/tools/install.rs index d733df386..9e321e019 100644 --- a/engine/crates/ps5upload-engine/src/mcp/tools/install.rs +++ b/engine/crates/ps5upload-engine/src/mcp/tools/install.rs @@ -1,5 +1,6 @@ //! Installing packages: `install_pkg`, `install_status`, `install_wait`, `install_stop`, -//! `install_preflight`, `install_sessions`, `install_history`. +//! `install_preflight`, `install_sessions`, `install_history`, and a fake package's name before +//! it is installed: `install_pkg_name`, `install_pkg_rename`. //! //! An install is not a job of `/api/jobs`: it has its own status route and states, and the engine //! allows one per console at a time. @@ -90,7 +91,12 @@ pub(super) fn tools() -> Vec { name: "install_status", title: "Follow an install", description: "How an install stands: its `phase` (resolve, deliver, install, verify, \ - done, failed), `verdict`, and `hint` when it failed.", + done, failed), `verdict`, and `hint` when it failed. Before the console \ + has moved a byte, `waiting` says what it waits for (previous_install, \ + reach_check, console_fetch). `reason` says why it failed: \ + stream_unreachable means the console could not fetch the package from \ + this computer (most often its firewall), with `reach` saying where it \ + was sent and how the connect ended; cancelled means it was stopped.", kind: Kind::Read, schema: object(json!({ "job": job_argument() }), &["job"]), run: |ctx, args| Box::pin(status(ctx, args)), @@ -168,6 +174,45 @@ pub(super) fn tools() -> Vec { done: "The install history.", ), }, + ToolDef { + name: "install_pkg_name", + title: "A package's name", + description: "The names a .pkg on the engine's computer holds (one per language), \ + and whether it can be renamed: `room` is how long a new name may be, in \ + UTF-8 bytes (`default_name` for the default name only, `all_languages` \ + for every language); `refusal` says why not (retail: signed by its \ + publisher, patch, no_name, unsupported). Reads only.", + kind: Kind::Read, + schema: object( + json!({ "path": text("The package, on the computer the engine runs on.") }), + &["path"], + ), + run: route!(path: "/api/pkg/name", done: "The package's names."), + }, + ToolDef { + name: "install_pkg_rename", + title: "Rename a package", + description: "Changes the name a fake package (FPKG) on the engine's computer shows on \ + the PS5, in the package file itself, before it is installed. A game \ + already installed keeps its name. Check install_pkg_name first: an \ + official package, a delta patch, a split package or a name longer than \ + `room` is refused (400), and a package an install, upload or build still uses \ + is refused (409) with what holds it. On any failure the file is as it \ + was.", + kind: Kind::Destructive { idempotent: true }, + schema: object( + json!({ + "path": text("The package, on the computer the engine runs on."), + "name": text("The new name: no line breaks, at most `room` bytes of UTF-8."), + "all_languages": flag( + "Give every language this name. Otherwise only the entries that hold \ + the current default name change.", + ), + }), + &["path", "name"], + ), + run: route!(method: "POST", path: "/api/pkg/name", done: "Renamed the package."), + }, ] } diff --git a/engine/crates/ps5upload-engine/src/mcp/tools/mod.rs b/engine/crates/ps5upload-engine/src/mcp/tools/mod.rs index 3dd36c3e2..e33bf60aa 100644 --- a/engine/crates/ps5upload-engine/src/mcp/tools/mod.rs +++ b/engine/crates/ps5upload-engine/src/mcp/tools/mod.rs @@ -9,6 +9,7 @@ mod api; mod cheats; pub(crate) mod consoles; +mod convert; mod disk; mod engine; pub(crate) mod files; @@ -97,6 +98,7 @@ fn all() -> &'static [ToolDef] { more_files::tools(), transfer::tools(), install::tools(), + convert::tools(), queue::tools(), power::tools(), hw::tools(), diff --git a/engine/crates/ps5upload-engine/src/mcp/tools/more_files.rs b/engine/crates/ps5upload-engine/src/mcp/tools/more_files.rs index 64d35d584..46467851a 100644 --- a/engine/crates/ps5upload-engine/src/mcp/tools/more_files.rs +++ b/engine/crates/ps5upload-engine/src/mcp/tools/more_files.rs @@ -20,7 +20,10 @@ pub(super) fn tools() -> Vec { name: "files_volumes", title: "Console drives", description: "A console's drives and mounts: each `path`, `fs_type`, `free_bytes`, \ - `total_bytes` and whether it is `writable`.", + `total_bytes` and whether it is `writable`. Sizes are the filesystem's \ + own counters; the PS5's Storage screen can show less free space. For \ + how much a copy can take, read `allocatable_bytes` and \ + `likely_fits_bytes`.", kind: Kind::Read, schema: object(json!({ "console": console_optional() }), &[]), run: route!(path: "/api/ps5/volumes", done: "The console's drives."), diff --git a/engine/crates/ps5upload-engine/src/mcp/tools/queue.rs b/engine/crates/ps5upload-engine/src/mcp/tools/queue.rs index 29537a3a2..7bd419682 100644 --- a/engine/crates/ps5upload-engine/src/mcp/tools/queue.rs +++ b/engine/crates/ps5upload-engine/src/mcp/tools/queue.rs @@ -26,9 +26,11 @@ pub(super) fn tools() -> Vec { name: "queue_list", title: "See the queue", description: "The engine's queue: `items` in order with each one's status (queued, \ - running, paused, done, failed, cancelled, interrupted), and for each \ - console whether it runs or what it waits for (`waiting_for`: hold, \ - other_work, console, settle). Leave `console` out for all of them.", + running, paused, done, failed, cancelled, interrupted; cancelled is \ + stopped, not failed, and holds nothing after it), with `code` saying \ + why it ended, and for each console whether it runs or what it waits for \ + (`waiting_for`: hold, other_work, console, settle). Leave `console` out \ + for all of them.", kind: Kind::Read, schema: object( json!({ "console": text("Only this console's queue.") }), From c8d57f5a3f76313d960241058f5907949d8ad9e1 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:45:40 -0800 Subject: [PATCH 23/75] Minion: a smaller logo and no unused styles, 7.5 KiB back The top bar drew the 256 px app logo at 1.8rem, at most about 90 px. A 96 px, 64-colour copy is 1.2 KB instead of 6.7 KB, and five style rules no element uses anymore are gone. The page goes from 767.7 to 760.2 KiB (223.4 to 216.6 KiB gzip). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/src/console/console.css | 27 --------------------------- client/src/console/shell/TopBar.tsx | 3 ++- client/src/console/shell/logo.png | Bin 0 -> 1218 bytes 3 files changed, 2 insertions(+), 28 deletions(-) create mode 100644 client/src/console/shell/logo.png diff --git a/client/src/console/console.css b/client/src/console/console.css index e40797bd0..7e1b837f3 100644 --- a/client/src/console/console.css +++ b/client/src/console/console.css @@ -551,26 +551,11 @@ button { margin: 0 0 0.4rem; margin-inline-end: 0.6rem; } -.cw-toolbar-path { - flex: 1; - min-width: 10rem; - margin: 0 0 0.4rem; - margin-inline-end: 0.8rem; -} .cw-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.cw-toolbar-free { - margin: 0 0 0.4rem; - margin-inline-start: auto; - font-size: 0.85rem; -} -.cw-pin.is-pinned svg { - color: var(--color-accent); - fill: currentColor; -} /* Path bar: Up, then the folder as buttons (✕ jumps there). */ .cw-pathbar { display: flex; @@ -914,15 +899,6 @@ button { max-height: 100%; margin: 0 auto; } -.cw-viewer-text { - margin: 0; - padding: 0.1rem 0.4rem; - font-family: var(--font-mono, monospace); - font-size: 0.85rem; - white-space: pre-wrap; - word-break: break-all; - cursor: default; -} /* ---- Fan ---- */ .cw-fan-readings { @@ -1872,9 +1848,6 @@ button { } /* ---- Files: sort, filter, status ---- */ -.cw-listbar { - margin-bottom: 0.3rem; -} .cw-status { margin: 0 0 0.6rem; font-size: 0.85rem; diff --git a/client/src/console/shell/TopBar.tsx b/client/src/console/shell/TopBar.tsx index ff2931bd7..a8c666a88 100644 --- a/client/src/console/shell/TopBar.tsx +++ b/client/src/console/shell/TopBar.tsx @@ -1,4 +1,5 @@ -import logo from "../../../public/logo-square.png?inline"; +// public/logo-square.png at 96 px, 64 colours (1.2 KB, not 6.7 KB): drawn at 1.8rem, at most ~90 px. +import logo from "./logo.png?inline"; /** What /api/status answers (payload/src/webui_api.c r_status). */ export interface ConsoleStatus { diff --git a/client/src/console/shell/logo.png b/client/src/console/shell/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..b611cd3e8ac2999463f2588ce9da9333d9d24ad8 GIT binary patch literal 1218 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD3?#3*wSy!M1o(uw{`>b&L_~~(10_=DtbRMQFpX#B|fSWs`jF zt51v1Nj!K;brn}#Y+Lr>GWTLxz0H?I-mK%dKinzXcR4_HH(v0-{q z+{3WV)5J9@jlm)EsPz-CXZ5l3CaXiz6Lu^v^t50v z^mp@ekElIT=%5ol;gNaRly?RPTvo3xZ7^A87dKn$jn{0k4wj= zNHDvPIV)!xtBgXa-C^H^#w*u%K2uoh7Be%P&)I_ShQ;r{KJId-_A+f)@#osZin$!E zxf}l`tc;rC$ba0t|NFxq)ixRL2y95tft?_Kxw)2?amkYihGkG+Rt+!*_!`nM;-)#xU$tweoo9&wUWv$z%G|k%G z(>Epljn)0`u_MUN#Nq!9XQh}TyB&o;KRsakyIB4HhYvhgAKTY67%=DsZdRVL29!fR MUHx3vIVCg!0GN>rK>z>% literal 0 HcmV?d00001 From 7b533a4508f165733b2acadbc0614f90c5b4d24f Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:46:57 -0800 Subject: [PATCH 24/75] Minion on a phone: a long task name no longer pushes the page off the screen The page's grid column grew to the widest row's natural width. On a 360 px phone, a running copy of a file with a long name made every section 587 px wide, cut at the right edge (Cancel, drive sizes, Settings choices), and the page cannot scroll sideways. The column now shrinks to the screen. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/e2e/console-page-phone.spec.ts | 67 +++++++++++++++++++++++++++ client/src/console/console.css | 3 ++ 2 files changed, 70 insertions(+) create mode 100644 client/e2e/console-page-phone.spec.ts diff --git a/client/e2e/console-page-phone.spec.ts b/client/e2e/console-page-phone.spec.ts new file mode 100644 index 000000000..f494afdb1 --- /dev/null +++ b/client/e2e/console-page-phone.spec.ts @@ -0,0 +1,67 @@ +import { readFileSync } from "node:fs"; +import { resolve } from "node:path"; +import { expect, test } from "@playwright/test"; + +// The helper's own page opened from a phone over the LAN, the helper's API stood in for. Needs +// `npm run build:console` first. + +const ORIGIN = "http://console.test"; +const G = 1024 ** 3; + +test.use({ viewport: { width: 360, height: 800 }, isMobile: true, hasTouch: true }); + +const BODIES: Record = { + "/api/token": { token: "test" }, + "/api/status": { version: "12.6.32", firmware: "13.60", model: "CFI-1215A", temp_c: 54, running: null, tz_min: 0 }, + "/api/volumes": { + volumes: [ + { path: "/data", mount_from: "/dev/ssd0.user", total_bytes: 800 * G, free_bytes: 163 * G, allocatable_bytes: 161 * G, writable: true }, + { path: "/mnt/usb0", mount_from: "/dev/da0s1", total_bytes: 2000 * G, free_bytes: 1200 * G, allocatable_bytes: 1200 * G, writable: true }, + ], + }, + // A running copy with a long name: its row is wider than the phone. + "/api/jobs": { + jobs: [ + { + job: "a".repeat(32), + kind: "copy", + state: "running", + files_done: 3, + files_total: 10, + bytes_done: 4 * G, + bytes_total: 12 * G, + mine: true, + name: "/data/homebrew/A-Rather-Long-Folder-Name/AnotherLongGameFileName.pkg", + }, + ], + uploading: [], + }, + "/api/fs/list": { entries: [], path: "/data", truncated: false }, +}; + +test("a running task's long name does not push the page past a phone's edge", async ({ page }) => { + const errors: string[] = []; + await page.addInitScript(() => localStorage.setItem("ps5upload.console.tourSeen", "1")); + page.on("pageerror", (e) => errors.push(e.message)); + const html = readFileSync(resolve(process.cwd(), "dist-console/index.html"), "utf8"); + await page.route(`${ORIGIN}/**`, async (route) => { + const url = new URL(route.request().url()); + if (!url.pathname.startsWith("/api/")) { + if (url.pathname === "/" || url.pathname.endsWith(".html")) return route.fulfill({ contentType: "text/html", body: html }); + return route.fulfill({ status: 404, body: "" }); + } + return route.fulfill({ contentType: "application/json", body: JSON.stringify(BODIES[url.pathname] ?? {}) }); + }); + await page.goto(`${ORIGIN}/`); + await expect(page.getByText("From this console")).toBeVisible({ timeout: 20_000 }); + for (const section of ["home", "files", "games", "saves", "settings"]) { + await page.locator(`[data-rail-id="${section}"]`).click(); + await page.waitForTimeout(300); + const widths = await page.evaluate(() => { + const content = document.querySelector(".cw-content"); + return { page: document.documentElement.scrollWidth, content: content ? content.getBoundingClientRect().right : 0 }; + }); + expect(widths, section).toEqual({ page: 360, content: 360 }); + } + expect(errors).toEqual([]); +}); diff --git a/client/src/console/console.css b/client/src/console/console.css index 7e1b837f3..1f0b9a498 100644 --- a/client/src/console/console.css +++ b/client/src/console/console.css @@ -84,6 +84,9 @@ button { .cw-app { display: grid; + /* minmax(0, …): the column never grows to a wide row's width (a running task's long name on a + * phone pushed every section past the screen's edge, cut off since body does not scroll). */ + grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; height: 100vh; } From 7c0031a0354b322ffafd0e4a86481cf61c4e2b03 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:50:35 -0800 Subject: [PATCH 25/75] Minion Games: Find games on a new USB drive shows what it found, and scans once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Opened from Home's "USB drive connected", Drives & Shares said "Reading the installed games…" through the scan and after it, with nothing listed: the scan was the section's first read, and only a plain read marked it loaded. - Switching to Installed and back started a full scan of every source again, on every switch. - Copy here listed "Reading the installed games…" for good when the drives could not be read. It now says it could not read them. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/e2e/console-page-library.spec.ts | 80 +++++++++++++++++++++ client/src/console/games/GamesSection.tsx | 9 ++- client/src/console/library/Library.test.tsx | 10 ++- client/src/console/library/Library.tsx | 24 ++++--- 4 files changed, 110 insertions(+), 13 deletions(-) create mode 100644 client/e2e/console-page-library.spec.ts diff --git a/client/e2e/console-page-library.spec.ts b/client/e2e/console-page-library.spec.ts new file mode 100644 index 000000000..9d1e29e49 --- /dev/null +++ b/client/e2e/console-page-library.spec.ts @@ -0,0 +1,80 @@ +import { readFileSync } from "node:fs"; +import { resolve } from "node:path"; +import { expect, test } from "@playwright/test"; + +// Home's "USB drive connected" → Find games on the helper's own page, the helper's API stood in +// for. Needs `npm run build:console` first. +// - The section opened scanning showed "Reading the installed games…" through and after the scan (the scan was its +// first load, and only a load counted as one). +// - Switching to Installed and back scanned every source again, on every switch. + +const PS5_AGENT = + "Mozilla/5.0 (PlayStation; PlayStation 5/13.60) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Safari/605.1.15"; +const ORIGIN = "http://console.test"; +const G = 1024 ** 3; + +test.use({ userAgent: PS5_AGENT, viewport: { width: 1920, height: 1080 } }); + +const DATA = { path: "/data", mount_from: "/dev/ssd0.user", total_bytes: 800 * G, free_bytes: 163 * G, writable: true }; +const USB = { path: "/mnt/usb0", mount_from: "/dev/da0s1", total_bytes: 64 * G, free_bytes: 20 * G, writable: true }; +const SCAN = { + source: "console", + scanned: 1764000000, + complete: true, + stopped: null, + entries: 3, + items: [{ kind: "folder", path: "/mnt/usb0/homebrew/PPSA01650", name: "PPSA01650", title: "Astro Bot", title_id: "PPSA01650", content_id: "", version: "01.000", category: "gd", type: "game", platform: "ps5", fw: "", fake: false, size: 0, icon: "" }], +}; + +test("Find games on a new USB drive shows what it found, and scans once", async ({ page }) => { + const errors: string[] = []; + let usb = false; + let scans = 0; + await page.clock.install(); + await page.addInitScript(() => localStorage.setItem("ps5upload.console.tourSeen", "1")); + page.on("pageerror", (e) => errors.push(e.message)); + const html = readFileSync(resolve(process.cwd(), "dist-console/index.html"), "utf8"); + await page.route(`${ORIGIN}/**`, async (route) => { + const url = new URL(route.request().url()); + if (!url.pathname.startsWith("/api/")) { + if (url.pathname === "/" || url.pathname.endsWith(".html")) return route.fulfill({ contentType: "text/html", body: html }); + return route.fulfill({ status: 404, body: "" }); + } + const json = (body: unknown, status = 200) => route.fulfill({ status, contentType: "application/json", body: JSON.stringify(body) }); + switch (url.pathname) { + case "/api/token": + return json({ token: "test" }); + case "/api/volumes": + return json({ volumes: usb ? [DATA, USB] : [DATA] }); + case "/api/smb/shares": + return json({ shares: [] }); + case "/api/library/scan": + scans++; + return json({ job: "j1" }); + case "/api/smb/job": + return json({ job: "j1", kind: "download", state: "done", bytes_done: 0, bytes_total: 0, files_done: 3, files_total: 3, scanning: false, current: "", error: null, failed: "", reconnects: 0 }); + case "/api/fs/read": + return scans ? route.fulfill({ contentType: "application/octet-stream", body: JSON.stringify(SCAN) }) : json({ error: "not_found" }, 404); + default: + return json({}); + } + }); + await page.goto(`${ORIGIN}/`); + await expect(page.locator('[data-rail-id="home"]')).toBeVisible({ timeout: 20_000 }); + await page.clock.runFor(2_000); + usb = true; + // Home reads the drives again every 15 s. + await page.clock.runFor(16_000); + await page.locator('[data-action="usb-find-games"]').click({ timeout: 10_000 }); + for (let i = 0; i < 10 && !(await page.locator("[data-lib-key]").count()); i++) await page.clock.runFor(1_500); + await expect(page.locator("[data-lib-key]")).toHaveCount(1); + await expect(page.getByText("Reading the installed games…")).toHaveCount(0); + expect(scans).toBe(1); + + await page.locator('[data-action="games-view-installed"]').click(); + await page.locator('[data-action="games-view-library"]').click(); + await page.clock.runFor(3_000); + await expect(page.locator("[data-lib-key]")).toHaveCount(1); + expect(scans).toBe(1); + expect(errors).toEqual([]); +}); diff --git a/client/src/console/games/GamesSection.tsx b/client/src/console/games/GamesSection.tsx index e2061b03b..c8271cd30 100644 --- a/client/src/console/games/GamesSection.tsx +++ b/client/src/console/games/GamesSection.tsx @@ -22,6 +22,8 @@ export function gamesViewOf(params: Record | null): GamesView { */ export function GamesSection({ ctx }: { ctx: SectionContext }) { const [view, setView] = useState(() => gamesViewOf(ctx.params)); + // Home's "USB drive connected" asks for one scan: switching to Installed and back does not scan again. + const [scan, setScan] = useState(ctx.params?.scan === "1"); const switcher = (
); return view === "library" ? ( - + ) : ( ); diff --git a/client/src/console/library/Library.test.tsx b/client/src/console/library/Library.test.tsx index 21b22f3ae..853a23fc0 100644 --- a/client/src/console/library/Library.test.tsx +++ b/client/src/console/library/Library.test.tsx @@ -3,7 +3,7 @@ import { describe, expect, it, vi } from "vitest"; import { gamesViewOf } from "../games/GamesSection"; import { SECTIONS } from "../sections"; import { t } from "../strings"; -import { LibraryView, groupSize, type LibraryViewProps } from "./Library"; +import { DrivePicker, LibraryView, groupSize, type LibraryViewProps } from "./Library"; import { baseTitleId, compareVersions, filterGroups, formatOf, groupEntries, nameKey, roleOf, titleFromFileName } from "./group"; import { copyDest, displayName, entriesOf, parseScan, stagePath, STAGE_DIR, type Entry, type LibItem, type LibScan } from "./model"; @@ -259,4 +259,12 @@ describe("Library section", () => { expect(html({ open: "ps4:CUSA07842", copied: { key: folder.key, path: "/mnt/usb0/homebrew/CUSA07842" } })).toContain(t("cw_lib_register")); expect(html({ open: "ps4:CUSA07842", onShowInFiles: vi.fn() })).toContain(t("cw_cleanup_show_in_files")); }); + + it("says when the drives for a copy could not be read, instead of reading them forever", () => { + const e = entriesOf(base().sources, new Map([["3fa2c1d0", parseScan(SCAN_JSON)]])).find((x) => x.kind === "folder")!; + const picker = (drives: LibraryViewProps["drives"]) => renderToStaticMarkup(); + expect(picker(null)).toContain(t("cw_games_loading")); + expect(picker([])).toContain(t("cw_home_err_load_storage")); + expect(picker([])).not.toContain(t("cw_games_loading")); + }); }); diff --git a/client/src/console/library/Library.tsx b/client/src/console/library/Library.tsx index 649647509..63df48a64 100644 --- a/client/src/console/library/Library.tsx +++ b/client/src/console/library/Library.tsx @@ -131,7 +131,8 @@ export interface LibraryViewProps { message: Message | null; /** The game whose detail is open (by group key), or null. */ open: string | null; - drives: Volume[]; + /** Null while they are read; empty when they could not be (or none is writable). */ + drives: Volume[] | null; /** The folder a copy just put on the console, for Register. */ copied: { key: string; path: string } | null; /** This console's titles; null until read (or when they could not be). */ @@ -213,13 +214,13 @@ function PartRow({ g, part, first, p, onCopyPick }: { g: GameGroup; part: Part; } /** Which drive a copy goes to. */ -function DrivePicker({ e, p, onClose }: { e: Entry; p: LibraryViewProps; onClose: () => void }) { +export function DrivePicker({ e, p, onClose }: { e: Entry; p: LibraryViewProps; onClose: () => void }) { return (

{t("cw_lib_copy_where")}

{displayName(e)}

- {p.drives.length ? ( + {p.drives?.length ? ( p.drives.map((d, i) => (
@@ -529,13 +530,14 @@ async function scanAll(): Promise { if (end.end === "failed") failed.push(`${s.name}: ${failText(new ApiError(502, end.status.error ?? "io_error"))}`); else if (end.end === "gone") failed.push(`${s.name}: ${failText(new ApiError(502, "smb_job_lost"))}`); const scan = await readScan(s.id); - patch({ scans: new Map(lib.scans).set(s.id, scan) }); + // loaded: a scan started before the section's first load (Home's USB card) is that load + patch({ scans: new Map(lib.scans).set(s.id, scan), loaded: true }); } catch (e) { failed.push(`${s.name}: ${failText(e)}`); } } // a new scan: folder sizes are counted again when asked - patch({ task: null, sizes: new Map(), ...(failed.length ? { message: { tone: "error", text: t("cw_lib_scan_failed", { list: failed.join(" · ") }) } } : {}) }); + patch({ task: null, loaded: true, sizes: new Map(), ...(failed.length ? { message: { tone: "error", text: t("cw_lib_scan_failed", { list: failed.join(" · ") }) } } : {}) }); void loadInstalledIds(); } @@ -693,7 +695,7 @@ export function Library({ const [, bump] = useReducer((n: number) => n + 1, 0); const [query, setQuery] = useState(""); const [open, setOpen] = useState(null); - const [drives, setDrives] = useState([]); + const [drives, setDrives] = useState(null); const live = useRef(true); const root = useRef(null); const stopCount = useRef<(() => void) | null>(null); @@ -734,11 +736,13 @@ export function Library({ if (!g) return; stopCount.current = countFolders(g); if (g.titleId) void loadInstalledVersion(g.titleId); - if (g.parts.some((p) => p.entry.source !== CONSOLE_SOURCE && p.entry.kind !== "pkg")) + if (g.parts.some((p) => p.entry.source !== CONSOLE_SOURCE && p.entry.kind !== "pkg")) { + setDrives(null); void call<{ volumes?: unknown }>("/api/volumes").then( - (r) => live.current && setDrives((Array.isArray(r.volumes) ? (r.volumes as Volume[]) : []).filter((v) => isDrive(v) && v.writable)), - () => setDrives([]), + (r) => live.current && setDrives((Array.isArray(r?.volumes) ? (r.volumes as Volume[]) : []).filter((v) => isDrive(v) && v.writable)), + () => live.current && setDrives([]), ); + } }, []); const showInFiles = ctx?.canOpen("files") ? (path: string) => ctx.openSection("files", { path }) : null; From 0b680334b7dd569cdb3e7475defb1f9004ce77ce Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:55:04 -0800 Subject: [PATCH 26/75] Minion Files: an open dialog survives a paste question, and errors in plain words MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - A paste or share copy that met a name already there replaced the open dialog with its question. An open Upload dialog was closed by it, which stopped every upload; an open editor lost its unsaved text. The question now shows over the dialog, which stays. - Copy to… / Move to… said "Loading…" for good on a folder it could not read. It now says why, with Try again. - Uploads into a protected folder, saving a text file there, and Go to path with the console out of reach said "That did not work (path_not_allowed)" or a code; they say it in words now. Permissions on a job the console lost says so instead of "(gone)". - Decompress and Extract on a page newer than its helper waited for a check that helper doesn't have (it answers 404 "not_found"); they let the helper decide again, as meant. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/src/console/files/ExtractDialog.tsx | 4 +-- client/src/console/files/Files.test.tsx | 26 +++++++++++++++-- client/src/console/files/Files.tsx | 9 +++--- client/src/console/files/PathPicker.tsx | 28 +++++++++++++++---- .../src/console/files/PermissionsDialog.tsx | 9 +++--- client/src/console/files/UnpackDialog.tsx | 4 +-- client/src/console/files/UploadDialog.tsx | 4 +-- client/src/console/files/editing.test.tsx | 5 ++++ client/src/console/files/navigation.test.tsx | 4 ++- client/src/console/files/opJob.test.ts | 13 ++++++++- client/src/console/files/opJob.ts | 8 ++++++ client/src/console/files/pathParts.ts | 5 +++- .../src/console/files/viewer/TextEditor.tsx | 4 +-- 13 files changed, 95 insertions(+), 28 deletions(-) diff --git a/client/src/console/files/ExtractDialog.tsx b/client/src/console/files/ExtractDialog.tsx index 2fc1833fe..0c23d0196 100644 --- a/client/src/console/files/ExtractDialog.tsx +++ b/client/src/console/files/ExtractDialog.tsx @@ -12,7 +12,7 @@ import { filesErrorText } from "./Files"; import { joinPath, volumeOf } from "./move"; import { freeName, statOrNull } from "./paste"; import { PathPicker } from "./PathPicker"; -import { extractInfo, type ExtractInfo } from "./opJob"; +import { checkUnavailable, extractInfo, type ExtractInfo } from "./opJob"; type Load = { info: ExtractInfo } | { error: string | null; generic: boolean } | null; @@ -149,7 +149,7 @@ export function ExtractDialog({ (e: unknown) => { if (!live) return; // A helper without the check (or a check that could not run): let the helper decide. - const generic = e instanceof ApiError && (e.status === 0 || e.status >= 500 || e.code === "http_404"); + const generic = checkUnavailable(e); setState({ error: generic ? null : extractErrorText(e), generic }); }, ); diff --git a/client/src/console/files/Files.test.tsx b/client/src/console/files/Files.test.tsx index d1caa62d9..a779278c3 100644 --- a/client/src/console/files/Files.test.tsx +++ b/client/src/console/files/Files.test.tsx @@ -18,6 +18,8 @@ import { clearClipboard, getClipboard, setClipboard } from "./clipboard"; import { ConflictDialog } from "./ConflictDialog"; import { IntoItselfError, renameEntry } from "./move"; import { TextPrompt } from "./TextPrompt"; +import { PickerWait } from "./PathPicker"; +import { UploadDialog } from "./UploadDialog"; import type { DirState, Entry } from "./useDir"; const mockCall = vi.mocked(call); @@ -372,13 +374,19 @@ describe("Files listing controls", () => { clearClipboard(); }); - it("a waiting paste conflict shows its dialog over anything else", () => { + it("a waiting paste conflict shows its dialog over anything else, which stays open under it", () => { const answer = vi.fn(); const conflict = { item: "/data/a/x.txt", dest: "/data/games/x.txt", destDir: false, canReplace: true, left: 2 }; const p = props({ ask: { kind: "sheet", names: ["b"] }, conflict: { conflict, answer } }); const els = elements(FilesView(p)); const d = els.find((e) => e.type === ConflictDialog)!; - expect(els.find((e) => e.type === ActionsSheet)).toBeUndefined(); + // The open dialog is kept (an Upload dialog closed stops its uploads), and the question is + // after it: the last modal in the page is the one the controller works in. + const sheet = els.findIndex((e) => e.type === ActionsSheet); + expect(sheet).toBeGreaterThan(-1); + expect(els.indexOf(d)).toBeGreaterThan(sheet); + const up = elements(FilesView(props({ ask: { kind: "upload" }, conflict: { conflict, answer } }))); + expect(up.some((e) => e.type === UploadDialog)).toBe(true); (d.props.onAnswer as (x: unknown) => void)({ choice: "skip", all: false }); expect(answer).toHaveBeenCalledWith({ choice: "skip", all: false }); @@ -437,3 +445,17 @@ describe("failed items stay selected after a batch", () => { expect(failedNamesIn({ started: [], moved: [], failed: [], jobFailed: ["/x"], skipped: [] }, "/")).toEqual(["x"]); }); }); + +describe("Copy to… / Move to…", () => { + it("says why a folder could not be read, with Retry, instead of loading for good", () => { + const retry = vi.fn(); + const failed = renderToStaticMarkup(); + expect(failed).toContain(t("cw_files_err_denied").replace("'", "'")); + expect(failed).toContain('data-action="retry"'); + expect(failed).not.toContain(t("cw_home_loading")); + const btn = elements(PickerWait({ dir: { error: new ApiError(500, "timeout") }, onRetry: retry })).find((e) => e.props["data-action"] === "retry")!; + (btn.props.onClick as () => void)(); + expect(retry).toHaveBeenCalledTimes(1); + expect(renderToStaticMarkup()).toContain(t("cw_home_loading")); + }); +}); diff --git a/client/src/console/files/Files.tsx b/client/src/console/files/Files.tsx index a2f946c88..cd8a5a499 100644 --- a/client/src/console/files/Files.tsx +++ b/client/src/console/files/Files.tsx @@ -1284,11 +1284,10 @@ export function FilesView(p: FilesViewProps) { ) : null} )} - {p.conflict ? ( - - ) : ( - askView(p) - )} + {askView(p)} + {/* Over the open dialog, which stays: closing it would stop an upload or drop an editor's + unsaved text. Last in the page, so it is the topmost modal. */} + {p.conflict ? : null}
); } diff --git a/client/src/console/files/PathPicker.tsx b/client/src/console/files/PathPicker.tsx index 6c13f1efd..3f114f50b 100644 --- a/client/src/console/files/PathPicker.tsx +++ b/client/src/console/files/PathPicker.tsx @@ -1,11 +1,27 @@ import { useCallback, useEffect, useRef, useState } from "react"; -import { ArrowUp, Check, File as FileIcon, Folder, HardDrive } from "lucide-react"; +import { ArrowUp, Check, File as FileIcon, Folder, HardDrive, RotateCw } from "lucide-react"; import { isDrive, volumeLabel, type Volume } from "../home/Home"; import { focusElement } from "../nav"; import { t } from "../strings"; import { Modal } from "../ui/Modal"; +import { filesErrorText } from "./Files"; import { joinPath, upFrom } from "./move"; -import { useDir } from "./useDir"; +import { useDir, type DirState } from "./useDir"; + +/** A folder still being read, or why it could not be, with Retry (it said "Loading…" for good). */ +export function PickerWait({ dir, onRetry }: { dir: Pick; onRetry: () => void }) { + return dir.error ? ( +
+ {filesErrorText(dir.error)} + +
+ ) : ( +

{t("cw_home_loading")}

+ ); +} /** * Copy to… / Move to…: drives, then folders; "Here" picks the folder shown. @@ -43,11 +59,11 @@ export function PathPicker({ // On open and after a level change, focus the first row (else "Here"). const moved = useRef(true); useEffect(() => { - if (!moved.current || (path != null && !dir.loaded)) return; + if (!moved.current || (path != null && !dir.loaded && !dir.error)) return; moved.current = false; - const el = list.current?.querySelector("[data-pick]") ?? list.current?.querySelector("[data-pick-here]"); + const el = list.current?.querySelector("[data-pick], [data-action=retry]") ?? list.current?.querySelector("[data-pick-here]"); if (el) focusElement(el); - }, [path, dir.loaded]); + }, [path, dir.loaded, dir.error]); const go = (p: string | null) => { moved.current = true; @@ -121,7 +137,7 @@ export function PathPicker({ )) : null} - {path != null && !dir.loaded ?

{t("cw_home_loading")}

: null} + {path != null && !dir.loaded ? : null} {path != null && dir.loaded && !folders.length && !files.length && !dir.more ? (

{t("cw_files_no_folders")} {t("cw_files_no_folders_next")} diff --git a/client/src/console/files/PermissionsDialog.tsx b/client/src/console/files/PermissionsDialog.tsx index fe78bb971..c7f0c82f7 100644 --- a/client/src/console/files/PermissionsDialog.tsx +++ b/client/src/console/files/PermissionsDialog.tsx @@ -1,9 +1,9 @@ import { useState } from "react"; import { Check, Square, SquareCheck } from "lucide-react"; -import { call } from "../api"; -import { errorText } from "../home/Home"; +import { ApiError, call } from "../api"; import { t } from "../strings"; import { Modal } from "../ui/Modal"; +import { filesErrorText } from "./Files"; import { watchOp } from "./opJob"; import { hasPerm, keepsPermissions, modeLetters, modeText, PERM_BITS, PERM_WHO, togglePerm, type PermBit, type PermWho } from "./permissions"; @@ -15,7 +15,8 @@ export async function applyMode(path: string, mode: number, recursive: boolean): const r = await call<{ job?: string }>("/api/fs/chmod", { path, mode: modeText(mode), recursive }); if (r && typeof r.job === "string") { const end = await watchOp(r.job); - if (end.end !== "done") throw new Error(end.end === "failed" ? (end.status.message ?? "failed") : end.end); + // gone: the console no longer has the job (said as such); failed: its first word (no paths) + if (end.end !== "done") throw end.end === "failed" ? new ApiError(500, (end.status.message ?? "failed").split(":")[0]) : end.end; } } @@ -55,7 +56,7 @@ export function PermissionsDialog({ () => onDone(mode), (e: unknown) => { setBusy(false); - setError(errorText(e)); + setError(e === "gone" ? t("cw_files_op_gone") : filesErrorText(e)); }, ); }; diff --git a/client/src/console/files/UnpackDialog.tsx b/client/src/console/files/UnpackDialog.tsx index d45c6d294..9fda41c66 100644 --- a/client/src/console/files/UnpackDialog.tsx +++ b/client/src/console/files/UnpackDialog.tsx @@ -7,7 +7,7 @@ import { Modal } from "../ui/Modal"; import { refocusIfLost } from "../ui/restoreFocus"; import { filesErrorText } from "./Files"; import { freeName, statOrNull } from "./paste"; -import { unpackBlocker, unpackInfo, type UnpackInfo } from "./opJob"; +import { checkUnavailable, unpackBlocker, unpackInfo, type UnpackInfo } from "./opJob"; type Load = { info: UnpackInfo } | { error: string | null; generic: boolean } | null; @@ -80,7 +80,7 @@ export function UnpackDialog({ (e: unknown) => { if (!live) return; // A helper without the check (or a check that could not run): warn and let the helper decide. - const generic = e instanceof ApiError && (e.status === 0 || e.status >= 500 || e.code === "http_404"); + const generic = checkUnavailable(e); setState({ error: generic ? null : unpackErrorText(e), generic }); }, ); diff --git a/client/src/console/files/UploadDialog.tsx b/client/src/console/files/UploadDialog.tsx index f561fd22f..381bf0eb5 100644 --- a/client/src/console/files/UploadDialog.tsx +++ b/client/src/console/files/UploadDialog.tsx @@ -2,12 +2,12 @@ import { useEffect, useRef, useState } from "react"; import { FilePlus, FolderUp, Settings, Square, SquareCheck, X } from "lucide-react"; import { formatBytes } from "../../lib/format"; import { ApiError } from "../api"; -import { errorText } from "../home/Home"; import { t } from "../strings"; import { Modal } from "../ui/Modal"; import { PhoneHandoff } from "../ui/PhoneHandoff"; import { statOrNull, type ConflictChoice } from "./paste"; import { makeFolders, uploadFile, uploadItems, type UploadItem } from "./transfer"; +import { filesErrorText } from "./Files"; import { runUploads, type UploadProgress, type UploadSummary } from "./uploadRun"; /** Can this browser pick a whole folder (webkitdirectory)? */ @@ -23,7 +23,7 @@ export function uploadSummaryText(s: UploadSummary): string { if (s.stopped.length) parts.push(t("cw_files_up_stopped", { n: s.stopped.length })); if (s.failed.length) { const e = s.failed[0].error; - const why = e instanceof ApiError && e.code === "no_space" ? t("cw_files_up_no_space") : (errorText(e) ?? ""); + const why = e instanceof ApiError && e.code === "no_space" ? t("cw_files_up_no_space") : (filesErrorText(e) ?? ""); parts.push(t("cw_files_up_failed", { n: s.failed.length, reason: why })); } return parts.join(" · "); diff --git a/client/src/console/files/editing.test.tsx b/client/src/console/files/editing.test.tsx index af18ce626..fe3d138f0 100644 --- a/client/src/console/files/editing.test.tsx +++ b/client/src/console/files/editing.test.tsx @@ -118,6 +118,8 @@ describe("text editing", () => { expect(saveErrorText(new ApiError(413, "too_large"))).toBe(t("cw_files_edit_too_large")); expect(saveErrorText(new ApiError(404, "gone"))).toBe(t("cw_files_edit_gone")); expect(saveErrorText(new ApiError(507, "no_space"))).toBe(t("cw_files_edit_no_space")); + // a protected folder in plain words, not "That did not work (path_not_allowed)" + expect(saveErrorText(new ApiError(403, "path_not_allowed"))).toBe(t("cw_files_err_denied")); }); }); @@ -164,5 +166,8 @@ describe("upload and download (another device only)", () => { expect(s).toBe( [t("cw_files_up_done", { n: 2 }), t("cw_files_up_skipped", { n: 1 }), t("cw_files_up_failed", { n: 1, reason: t("cw_files_up_no_space") })].join(" · "), ); + const denied = uploadSummaryText({ uploaded: [], skipped: [], failed: [{ name: "d", error: new ApiError(403, "path_not_allowed") }], stopped: [] }); + expect(denied).toContain(t("cw_files_err_denied")); + expect(denied).not.toContain("path_not_allowed"); }); }); diff --git a/client/src/console/files/navigation.test.tsx b/client/src/console/files/navigation.test.tsx index 9646e845f..8591c1402 100644 --- a/client/src/console/files/navigation.test.tsx +++ b/client/src/console/files/navigation.test.tsx @@ -171,7 +171,9 @@ describe("path bar", () => { mockCall.mockRejectedValueOnce(new ApiError(403, "path_not_allowed")); expect(await checkFolder("/data/ps5upload/ava")).toBe(t("cw_files_err_denied")); expect(await checkFolder("relative")).toBe(t("cw_files_goto_bad")); - expect(mockCall).toHaveBeenCalledTimes(4); + mockCall.mockRejectedValueOnce(new ApiError(0, "offline")); + expect(await checkFolder("/data")).toBe(t("cw_home_err_offline")); + expect(mockCall).toHaveBeenCalledTimes(5); }); it("go to path is a text prompt with that check; OK navigates", () => { diff --git a/client/src/console/files/opJob.test.ts b/client/src/console/files/opJob.test.ts index 00b441b3d..cf46d0240 100644 --- a/client/src/console/files/opJob.test.ts +++ b/client/src/console/files/opJob.test.ts @@ -6,7 +6,7 @@ vi.mock("../api", async (importOriginal) => { }); import { ApiError, call } from "../api"; -import { crcHex, isFfpfsc, opCause, opResult, startOp, unpackBlocker, watchOp, type OpDeps, type OpStatus } from "./opJob"; +import { checkUnavailable, crcHex, isFfpfsc, opCause, opResult, startOp, unpackBlocker, watchOp, type OpDeps, type OpStatus } from "./opJob"; import { runVerify, type VerifyState } from "./VerifyDialog"; const mockCall = vi.mocked(call); @@ -147,3 +147,14 @@ describe("runVerify", () => { expect(stopped).toEqual({ step: "cancelled" }); }); }); + +describe("the check before Decompress and Extract", () => { + it("lets the helper decide when this helper has no check (404 not_found), not when the file is gone", () => { + expect(checkUnavailable(new ApiError(404, "not_found"))).toBe(true); + expect(checkUnavailable(new ApiError(404, "http_404"))).toBe(true); + expect(checkUnavailable(new ApiError(0, "offline"))).toBe(true); + expect(checkUnavailable(new ApiError(503, "busy"))).toBe(true); + expect(checkUnavailable(new ApiError(404, "fs_unpack_open_failed"))).toBe(false); + expect(checkUnavailable(new ApiError(403, "path_not_allowed"))).toBe(false); + }); +}); diff --git a/client/src/console/files/opJob.ts b/client/src/console/files/opJob.ts index 924fa249c..b6439206a 100644 --- a/client/src/console/files/opJob.ts +++ b/client/src/console/files/opJob.ts @@ -145,6 +145,14 @@ export async function unpackInfo(path: string): Promise { } /** Why a decompress cannot start (checked on the page before it is sent), or null. */ +/** + * The pre-start check could not say (it timed out, or this helper has no such route: it answers + * 404 "not_found", a missing file has its own code): Start warns and lets the helper decide. + */ +export function checkUnavailable(e: unknown): boolean { + return e instanceof ApiError && (e.status === 0 || e.status >= 500 || e.code === "http_404" || e.code === "not_found"); +} + export function unpackBlocker(info: UnpackInfo, name: string | null): "exists" | "space" | null { if (info.exists && (name == null || name === info.name)) return "exists"; if (info.free != null && info.free < info.need) return "space"; diff --git a/client/src/console/files/pathParts.ts b/client/src/console/files/pathParts.ts index 3e64e4c12..ef39e3cf0 100644 --- a/client/src/console/files/pathParts.ts +++ b/client/src/console/files/pathParts.ts @@ -1,5 +1,6 @@ /** The path bar's pieces and the "Go to path" check (pure, apart from checkFolder's one call). */ -import { ApiError, call } from "../api"; +import { ApiError, call, isOffline } from "../api"; +import { errorText } from "../home/Home"; import { isDrive, volumeLabel, type Volume } from "../home/Home"; import { t } from "../strings"; import { cleanPath } from "./prefs"; @@ -72,6 +73,8 @@ export async function checkFolder(raw: string): Promise { if (e instanceof ApiError) { if (e.status === 404 || /not_found|no_such|enoent|stat_failed/i.test(e.code)) return t("cw_files_goto_missing"); if (e.status === 403) return t("cw_files_err_denied"); + // the console out of reach or restarting: said as such, not as a code + if (isOffline(e)) return errorText(e); return t("cw_files_goto_failed", { code: e.code }); } return t("cw_files_goto_failed", { code: String(e) }); diff --git a/client/src/console/files/viewer/TextEditor.tsx b/client/src/console/files/viewer/TextEditor.tsx index 8639845e4..99f5da9a0 100644 --- a/client/src/console/files/viewer/TextEditor.tsx +++ b/client/src/console/files/viewer/TextEditor.tsx @@ -1,7 +1,7 @@ import { useEffect, useRef, useState } from "react"; import { Save, Undo2 } from "lucide-react"; import { ApiError } from "../../api"; -import { errorText } from "../../home/Home"; +import { filesErrorText } from "../Files"; import { t } from "../../strings"; import { encodeText, saveText, stampOf, type FileStamp } from "../transfer"; @@ -11,7 +11,7 @@ export function saveErrorText(e: unknown): string | null { if (e === "too_large" || (e instanceof ApiError && e.code === "too_large")) return t("cw_files_edit_too_large"); if (e instanceof ApiError && e.code === "gone") return t("cw_files_edit_gone"); if (e instanceof ApiError && e.code === "no_space") return t("cw_files_edit_no_space"); - return errorText(e); + return filesErrorText(e); } /** From 6594af0032238d89effc0b58261a347d0a40f2f0 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:56:36 -0800 Subject: [PATCH 27/75] Minion: a device's ask and Tailscale stay on screen through a failed read One failed read of the helper's device list (a busy helper, a timeout) took the Allow / Decline prompt off Home and the Devices section out of Settings until the next good read; one failed Tailscale read hid its section until Settings was opened again. Only a helper without these routes (404) hides them now. Both lists are read one at a time and not while the page is hidden: a slow read no longer stacks up behind the next. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/e2e/console-page-devices.spec.ts | 43 +++++++++++++++++++++++ client/src/console/settings/Devices.tsx | 19 +++++----- client/src/console/settings/Tailscale.tsx | 13 +++---- 3 files changed, 58 insertions(+), 17 deletions(-) create mode 100644 client/e2e/console-page-devices.spec.ts diff --git a/client/e2e/console-page-devices.spec.ts b/client/e2e/console-page-devices.spec.ts new file mode 100644 index 000000000..93d22d5a9 --- /dev/null +++ b/client/e2e/console-page-devices.spec.ts @@ -0,0 +1,43 @@ +import { readFileSync } from "node:fs"; +import { resolve } from "node:path"; +import { expect, test } from "@playwright/test"; + +// A device asking to use this PS5, on the helper's own page, the helper's API stood in for. +// Needs `npm run build:console` first. One failed read of /api/mesh (a busy helper, a timeout) +// took the Allow / Decline prompt away until the next good one; only a helper without the route +// (404) means there is nothing to show. + +const ORIGIN = "http://console.test"; + +test.use({ viewport: { width: 1280, height: 800 } }); + +test("a device's ask stays on Home through a failed read", async ({ page }) => { + const errors: string[] = []; + let reads = 0; + await page.clock.install(); + await page.addInitScript(() => localStorage.setItem("ps5upload.console.tourSeen", "1")); + page.on("pageerror", (e) => errors.push(e.message)); + const html = readFileSync(resolve(process.cwd(), "dist-console/index.html"), "utf8"); + await page.route(`${ORIGIN}/**`, async (route) => { + const url = new URL(route.request().url()); + if (!url.pathname.startsWith("/api/")) { + if (url.pathname === "/" || url.pathname.endsWith(".html")) return route.fulfill({ contentType: "text/html", body: html }); + return route.fulfill({ status: 404, body: "" }); + } + const json = (body: unknown, status = 200) => route.fulfill({ status, contentType: "application/json", body: JSON.stringify(body) }); + if (url.pathname === "/api/token") return json({ token: "test" }); + if (url.pathname === "/api/mesh") { + reads++; + // the first read answers; every later one fails as a busy helper does + return reads === 1 ? json({ devices: [], asks: [{ id: "d1", name: "Ana's phone" }] }) : json({ error: "busy" }, 503); + } + return json({}); + }); + await page.goto(`${ORIGIN}/`); + const ask = page.getByText("Ana's phone", { exact: false }); + await expect(ask).toBeVisible({ timeout: 20_000 }); + await page.clock.runFor(9_000); + await expect.poll(() => reads).toBeGreaterThan(1); + await expect(ask).toBeVisible(); + expect(errors).toEqual([]); +}); diff --git a/client/src/console/settings/Devices.tsx b/client/src/console/settings/Devices.tsx index 268fd337c..f106da9ad 100644 --- a/client/src/console/settings/Devices.tsx +++ b/client/src/console/settings/Devices.tsx @@ -1,6 +1,7 @@ import { useCallback, useEffect, useState } from "react"; -import { call } from "../api"; +import { ApiError, call } from "../api"; import { t } from "../strings"; +import { pollWhileVisible } from "../ui/visiblePoll"; /** One device in the helper's /api/mesh answer (the device list every PS5Upload app sees). */ export interface ConsoleDevice { @@ -75,18 +76,14 @@ export function useConsoleMesh(): { const read = useCallback(async () => { try { setMesh(await call("/api/mesh", {})); - } catch { - // An older helper has no /api/mesh: nothing to show. - setMesh(null); + } catch (e) { + // An older helper has no /api/mesh (404): nothing to show. A read that failed (a busy + // helper, a timeout) keeps the last answer: the section and an ask's prompt stay. + if (e instanceof ApiError && e.status === 404) setMesh(null); } }, []); - useEffect(() => { - void read(); - const id = window.setInterval(() => { - if (!document.hidden) void read(); - }, DEVICES_POLL_MS); - return () => window.clearInterval(id); - }, [read]); + // A read at a time: one can take up to the call's timeout, far past the interval. + useEffect(() => pollWhileVisible(read, DEVICES_POLL_MS), [read]); const run = async (op: "allow" | "decline" | "remove", id: string) => { setBusy(true); setErr(null); diff --git a/client/src/console/settings/Tailscale.tsx b/client/src/console/settings/Tailscale.tsx index e2a61543d..54f847944 100644 --- a/client/src/console/settings/Tailscale.tsx +++ b/client/src/console/settings/Tailscale.tsx @@ -1,7 +1,8 @@ import { useCallback, useEffect, useState } from "react"; -import { call } from "../api"; +import { ApiError, call } from "../api"; import { t } from "../strings"; import { encodeQr, qrPath } from "../ui/qr"; +import { pollWhileVisible } from "../ui/visiblePoll"; /** What the helper's /api/tailnet answers (the node's status, as the app's Connection panel reads it). */ export interface ConsoleTailnet { @@ -93,9 +94,10 @@ export function TailscaleSection() { try { setSt(await call("/api/tailnet", { op: "status" })); setMissing(false); - } catch { - // An older helper has no /api/tailnet: say nothing rather than an error. - setMissing(true); + } catch (e) { + // An older helper has no /api/tailnet (404): say nothing rather than an error. Any other + // failed read keeps what the section shows. + if (e instanceof ApiError && e.status === 404) setMissing(true); } }, []); @@ -104,8 +106,7 @@ export function TailscaleSection() { }, [read]); useEffect(() => { if (!st?.enabled || st.state === "running") return; - const id = window.setInterval(() => void read(), TAILNET_POLL_MS); - return () => window.clearInterval(id); + return pollWhileVisible(read, TAILNET_POLL_MS); }, [st?.enabled, st?.state, read]); const run = async (op: "enable" | "disable" | "logout" | "renew" | "allow_add" | "blocked_ignore", ip?: string) => { From 5ade8f477ba0e2a8fbc3b8d9168e380deaade91d Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:57:33 -0800 Subject: [PATCH 28/75] Minion Saves: the user can't be switched while a backup or restore runs Switching user while a backup, restore or delete ran let that task's list reload land on the next user: a game both users have showed the first user's backups, and restoring one of them then failed. The user buttons now wait for the task, as the backup place buttons already did. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/src/console/saves/Saves.test.tsx | 5 +++++ client/src/console/saves/Saves.tsx | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/client/src/console/saves/Saves.test.tsx b/client/src/console/saves/Saves.test.tsx index 775da075d..3a564c5fe 100644 --- a/client/src/console/saves/Saves.test.tsx +++ b/client/src/console/saves/Saves.test.tsx @@ -308,6 +308,11 @@ describe("Saves section", () => { expect(h).toContain(new Date(backups[0].when).toLocaleString()); }); + it("keeps the user while a backup, restore or delete runs (its result belongs to that user)", () => { + expect(html({ task: { text: "…" } }).match(/data-user="[^"]+" disabled=""/g)?.length).toBe(2); + expect(html()).not.toMatch(/data-user="[^"]+" disabled/); + }); + it("says when a user has no saves", () => { expect(html({ saves: [] })).toContain(t("cw_saves_none", { name: "Alex" })); }); diff --git a/client/src/console/saves/Saves.tsx b/client/src/console/saves/Saves.tsx index 0991e1c49..5380e6e85 100644 --- a/client/src/console/saves/Saves.tsx +++ b/client/src/console/saves/Saves.tsx @@ -267,7 +267,7 @@ export function SavesView(p: SavesViewProps) {

{(p.users ?? []).map((u) => ( - ))} @@ -633,6 +633,8 @@ export function Saves({ ctx }: { ctx: SectionContext }) { setPlace(r); }} onUser={(id) => { + // Not while a backup, restore or delete runs: its list reload would land on the next user. + if (st.task) return; setOpen(null); setUser(id); }} From 335fc81d0109fefbd12c872f86d68b0034a8123f Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 09:58:56 -0800 Subject: [PATCH 29/75] Minion on a phone: the sections in a bar at the bottom, no controller hints On a phone the left rail took a fifth of the width and the bottom line showed controller buttons a phone doesn't have. Below 640 px the sections now sit in one bar along the bottom, as in the app on a phone, and the content gets the full width. Tablets, computers and the PS5 are unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/e2e/console-page-phone.spec.ts | 7 ++++- client/src/console/console.css | 39 ++++++++++++++++++++++++--- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/client/e2e/console-page-phone.spec.ts b/client/e2e/console-page-phone.spec.ts index f494afdb1..6d2be46ee 100644 --- a/client/e2e/console-page-phone.spec.ts +++ b/client/e2e/console-page-phone.spec.ts @@ -39,7 +39,7 @@ const BODIES: Record = { "/api/fs/list": { entries: [], path: "/data", truncated: false }, }; -test("a running task's long name does not push the page past a phone's edge", async ({ page }) => { +test("a running task's long name does not push the page past a phone's edge; the sections are along the bottom", async ({ page }) => { const errors: string[] = []; await page.addInitScript(() => localStorage.setItem("ps5upload.console.tourSeen", "1")); page.on("pageerror", (e) => errors.push(e.message)); @@ -63,5 +63,10 @@ test("a running task's long name does not push the page past a phone's edge", as }); expect(widths, section).toEqual({ page: 360, content: 360 }); } + // The sections in a bar along the bottom (the rail took a fifth of the width), no controller hints. + const rail = (await page.locator(".cw-rail").boundingBox())!; + expect(rail.width).toBe(360); + expect(rail.y + rail.height).toBeGreaterThan(790); + await expect(page.locator(".cw-hints")).toBeHidden(); expect(errors).toEqual([]); }); diff --git a/client/src/console/console.css b/client/src/console/console.css index 1f0b9a498..3ee5870a4 100644 --- a/client/src/console/console.css +++ b/client/src/console/console.css @@ -2216,12 +2216,45 @@ button { overflow: hidden; text-overflow: ellipsis; } + /* The sections in a bar at the bottom, as the app has them on a phone, and no controller hints: + * the rail took a fifth of the width. */ + .cw-hints { + display: none; + } + .cw-body { + flex-direction: column-reverse; + } + .cw-content { + min-height: 0; + } .cw-rail { - width: 4.6rem; - padding: 0.5rem 0.25rem; + width: auto; + flex-direction: row; + padding: 0.15rem 0.2rem; + border-inline-end: 0; + border-top: 1px solid var(--color-border); + overflow: hidden; } .cw-rail-item { - font-size: 0.72rem; + flex: 1 1 0; + min-width: 0; + margin: 0; + padding: 0.3rem 0; + font-size: 0.62rem; + white-space: nowrap; + } + .cw-rail-item span { + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + } + .cw-rail-item svg { + width: 1.3rem; + height: 1.3rem; + margin-bottom: 0.15rem; + } + .cw-rail-help { + margin-top: 0; } .cw-content { padding: 0.6rem 0.6rem 1rem; From 3d35c375cd9f3be1caf090bd6929e6f1e8064a9d Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 10:03:35 -0800 Subject: [PATCH 30/75] Minion in Arabic and Persian: paths, sizes and names keep their order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The app's fix for right-to-left text, on the console's page: sizes and paths put into a sentence ("163 GiB", "/data") are kept whole, so they no longer read "GiB 163" or "data/". Paths shown on their own and a task's file name keep their order too, a drive's path is cut with "…" instead of running over its icon, and the title and console chip on a phone are cut at their end. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/src/console/console.css | 7 +++++++ client/src/console/files/DriveList.tsx | 2 +- client/src/console/home/Home.test.tsx | 3 ++- client/src/console/home/TaskRow.tsx | 2 +- client/src/console/strings.test.ts | 11 +++++++++++ client/src/console/strings.ts | 17 ++++++++++++++++- 6 files changed, 38 insertions(+), 4 deletions(-) diff --git a/client/src/console/console.css b/client/src/console/console.css index 3ee5870a4..349c6a4b8 100644 --- a/client/src/console/console.css +++ b/client/src/console/console.css @@ -306,6 +306,8 @@ button { .cw-mono { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.8rem; + /* A path keeps its order in Arabic and Persian ("/data", not "data/"). */ + unicode-bidi: plaintext; } .cw-tag { display: inline-block; @@ -2216,6 +2218,11 @@ button { overflow: hidden; text-overflow: ellipsis; } + /* Cut at their end in Arabic and Persian too ("PS5Upload Mi…", not "…Upload Minion"). */ + .cw-brand, + .cw-chip { + unicode-bidi: plaintext; + } /* The sections in a bar at the bottom, as the app has them on a phone, and no controller hints: * the rail took a fifth of the width. */ .cw-hints { diff --git a/client/src/console/files/DriveList.tsx b/client/src/console/files/DriveList.tsx index 8e2bdb07c..5b44fec3d 100644 --- a/client/src/console/files/DriveList.tsx +++ b/client/src/console/files/DriveList.tsx @@ -218,7 +218,7 @@ export function DriveList({ {volumeLabel(v)} {!v.writable ? {t("cw_home_vol_readonly")} : null} - {v.path} + {v.path} diff --git a/client/src/console/home/Home.test.tsx b/client/src/console/home/Home.test.tsx index 2a816c6ed..1692334b2 100644 --- a/client/src/console/home/Home.test.tsx +++ b/client/src/console/home/Home.test.tsx @@ -105,7 +105,8 @@ describe("Home", () => { it("names what a network-share copy copies", () => { const row = renderToStaticMarkup( {}} />); - expect(row).toContain(" · PPSA01234"); + // In its own direction: a path keeps its order in Arabic and Persian ("/data/x", not "data/x/"). + expect(row).toContain(' · PPSA01234'); expect(renderToStaticMarkup( {}} />)).not.toContain("PPSA01234"); }); diff --git a/client/src/console/home/TaskRow.tsx b/client/src/console/home/TaskRow.tsx index 2c6e70235..57e09004c 100644 --- a/client/src/console/home/TaskRow.tsx +++ b/client/src/console/home/TaskRow.tsx @@ -53,7 +53,7 @@ export function TaskRow({ job, onCancel }: { job: Job; onCancel: (job: Job) => v
{kindLabel(job.kind)} - {job.name ? {` · ${job.name}`} : null} + {job.name ? · {job.name} : null} {t(job.mine ? "cw_task_from_console" : "cw_task_from_pc")} diff --git a/client/src/console/strings.test.ts b/client/src/console/strings.test.ts index c4e748df6..dfcee3417 100644 --- a/client/src/console/strings.test.ts +++ b/client/src/console/strings.test.ts @@ -74,6 +74,17 @@ describe("console strings", () => { expect(say("cw_missing_everywhere")).toBe("cw_missing_everywhere"); }); + it("keeps a path or a size whole in Arabic and Persian, as the app does", () => { + const maps = { en: { cw_x: "{free} free of {total} in {path} ({n})" }, ar: { cw_x: "{free} متاحة من {total} في {path} ({n})" } }; + const ar = makeT(maps, "ar"); + expect(ar("cw_x", { free: "163 GiB", total: "800 GiB", path: "/data", n: 3 })).toBe( + "⁦163 GiB⁩ متاحة من ⁦800 GiB⁩ في ⁦/data⁩ (3)", + ); + // Arabic text and plain numbers are left as they are; a left-to-right language is untouched. + expect(ar("cw_x", { free: "1", total: "2", path: "مجلد", n: 3 })).toBe("1 متاحة من 2 في مجلد (3)"); + expect(makeT(maps, "en")("cw_x", { free: "1 GiB", total: "2 GiB", path: "/data", n: 3 })).toBe("1 GiB free of 2 GiB in /data (3)"); + }); + it("picks the closest shipped language for the browser's", () => { const have = ["en", "zh-CN", "zh-TW", "pt-BR", "de"]; expect(pickLanguage("de-DE", have)).toBe("de"); diff --git a/client/src/console/strings.ts b/client/src/console/strings.ts index 52d8f1ac2..e2470c3b8 100644 --- a/client/src/console/strings.ts +++ b/client/src/console/strings.ts @@ -30,11 +30,26 @@ function interpolate(raw: string, vars?: Vars): string { ); } +/** + * In Arabic or Persian a value written left to right (a path, a size with its unit, a file name) + * is kept whole and in its own order: "/data" read "data/" and "163 GiB" "GiB 163". It goes between + * LEFT-TO-RIGHT ISOLATE and POP DIRECTIONAL ISOLATE (drawn as nothing), as the app's tr() does. + */ +function isolated(vars: Vars): Vars { + const out: Vars = {}; + for (const k of Object.keys(vars)) { + const s = String(vars[k]); + out[k] = /[A-Za-z/\\]/.test(s) && !/[֐-ࣿיִ-ﻼ]/.test(s) ? `⁦${s}⁩` : vars[k]; + } + return out; +} + /** A translator over `maps` for `lang`, falling back to English, then to the key. */ export function makeT(maps: StringMaps, lang: string): (key: string, vars?: Vars) => string { const own = maps[lang] ?? {}; const fallback = maps.en ?? {}; - return (key, vars) => interpolate(own[key] ?? fallback[key] ?? key, vars); + const rtl = lang === "ar" || lang === "fa"; + return (key, vars) => interpolate(own[key] ?? fallback[key] ?? key, vars && rtl ? isolated(vars) : vars); } /** From 28df0d963d1e16f82369b9d2bd08b0ab5e9773e1 Mon Sep 17 00:00:00 2001 From: phantomptr Date: Thu, 26 Nov 2026 10:07:10 -0800 Subject: [PATCH 31/75] Minion Files: internal storage says how much is likely to fit As the app's Volumes screen does since 12.6.32: the PS5 holds back more of its internal storage as data is written, so the free space shown is more than a copy can use. The internal drive's row in Files now says about how much new data is likely to fit (the engine's own rule). The sentence is the app's, with its reviewed translations in all 21 languages. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT --- client/src/console/files/DriveList.tsx | 14 ++++++++++++++ client/src/console/files/navigation.test.tsx | 15 ++++++++++++++- client/src/console/home/Home.tsx | 2 ++ client/src/console/locales/ar.json | 1 + client/src/console/locales/bn.json | 1 + client/src/console/locales/de.json | 1 + client/src/console/locales/en.json | 1 + client/src/console/locales/es.json | 1 + client/src/console/locales/fa.json | 1 + client/src/console/locales/fr.json | 1 + client/src/console/locales/hi.json | 1 + client/src/console/locales/hu.json | 1 + client/src/console/locales/id.json | 1 + client/src/console/locales/it.json | 1 + client/src/console/locales/ja.json | 1 + client/src/console/locales/ko.json | 1 + client/src/console/locales/pl.json | 1 + client/src/console/locales/pt-BR.json | 1 + client/src/console/locales/ru.json | 1 + client/src/console/locales/th.json | 1 + client/src/console/locales/tr.json | 1 + client/src/console/locales/vi.json | 1 + client/src/console/locales/zh-CN.json | 1 + client/src/console/locales/zh-TW.json | 1 + client/src/i18n/locales/ar.ts | 1 + client/src/i18n/locales/bn.ts | 1 + client/src/i18n/locales/de.ts | 1 + client/src/i18n/locales/en.ts | 1 + client/src/i18n/locales/es.ts | 1 + client/src/i18n/locales/fa.ts | 1 + client/src/i18n/locales/fr.ts | 1 + client/src/i18n/locales/hi.ts | 1 + client/src/i18n/locales/hu.ts | 1 + client/src/i18n/locales/id.ts | 1 + client/src/i18n/locales/it.ts | 1 + client/src/i18n/locales/ja.ts | 1 + client/src/i18n/locales/ko.ts | 1 + client/src/i18n/locales/pl.ts | 1 + client/src/i18n/locales/pt-BR.ts | 1 + client/src/i18n/locales/ru.ts | 1 + client/src/i18n/locales/th.ts | 1 + client/src/i18n/locales/tr.ts | 1 + client/src/i18n/locales/vi.ts | 1 + client/src/i18n/locales/zh-CN.ts | 1 + client/src/i18n/locales/zh-TW.ts | 1 + scripts/i18n-source-hashes.json | 1 + 46 files changed, 73 insertions(+), 1 deletion(-) diff --git a/client/src/console/files/DriveList.tsx b/client/src/console/files/DriveList.tsx index 5b44fec3d..d46d073ec 100644 --- a/client/src/console/files/DriveList.tsx +++ b/client/src/console/files/DriveList.tsx @@ -23,6 +23,18 @@ export function isSystemVolume(path: string): boolean { } /** A disk image PS5Upload mounted (the helper names its source, or it sits under /mnt/ps5upload). */ +/** + * How much new data is likely to fit on internal storage, where the PS5 holds back about a fifth + * more as data is written (engine volumes.rs likely_fits_bytes, said the same in the app's Volumes); + * null elsewhere, or when it is all of the free space. For telling, never for refusing. + */ +export function likelyFitsBytes(v: Volume): number | null { + if (v.path !== "/data") return null; + const room = Math.max(0, Math.min(v.free_bytes, v.allocatable_bytes ?? v.free_bytes)); + const fits = Math.floor(Math.max(0, room - 1073741824) / 6) * 5; + return fits < v.free_bytes ? fits : null; +} + export function isImage(v: Volume): boolean { return !isDrive(v) && (!!v.source_image || v.path.startsWith("/mnt/ps5upload/")) && !isSystemVolume(v.path); } @@ -204,6 +216,7 @@ export function DriveList({ const Icon = isUsb(v) ? Usb : HardDrive; const used = v.total_bytes > 0 ? Math.max(0, Math.min(100, 100 - (v.free_bytes / v.total_bytes) * 100)) : 0; const eject = onEject && canEject(v); + const fits = likelyFitsBytes(v); return (