Peach: Local-first video metadata scraper and media manager.
fix(updates): macOS 独立包按本机架构检查 DMG 并改为下载替换
longmeidao8f22d2017017
diff --git a/frontend/src/react/bundle.d.ts b/frontend/src/react/bundle.d.tsindex 0d49e95e7..5713fc9a6 100644--- a/frontend/src/react/bundle.d.ts+++ b/frontend/src/react/bundle.d.ts@@ -246,8 +246,12 @@ export interface ReleaseState {message: string;release_url: string;checked_at?: number;- package_kind?: 'update' | 'full';+ /** `installer` 是 macOS 的 DMG:没有应用内安装,下载后手动替换。 */+ package_kind?: 'update' | 'full' | 'installer';+ asset_url?: string;asset_size?: number;+ /** 能在页面里下载并重启安装;只有 Windows 独立包是 true。 */+ in_app_update?: boolean;}export interface UpdateJob {diff --git a/frontend/src/react/settings/release-updates.tsx b/frontend/src/react/settings/release-updates.tsxindex d26bd963f..f59ab2fa8 100644--- a/frontend/src/react/settings/release-updates.tsx+++ b/frontend/src/react/settings/release-updates.tsx@@ -4,7 +4,7 @@import { useEffect, useRef, useState } from 'react';import { confirmModal } from '@peach/legacy/ui';-import { Button } from '@/components/base/buttons/button';+import { Button, ButtonLink } from '@/components/base/buttons/button';import { apiGet, apiSend, errorMessage } from '../../api';import type { ReleaseState, UpdateJob } from '../bundle';@@ -97,13 +97,14 @@ export function ReleaseUpdates({ initial, initialJob }: { initial: ReleaseState;<Fact term="更新通道">{data.channel}</Fact><Fact term="最新版本">{data.latest_version || '未取得'}</Fact>{data.package_kind ? <Fact term="下载内容">- {data.package_kind === 'update' ? '应用更新包' : '应用与工具'}+ {data.package_kind === 'update' ? '应用更新包' : data.package_kind === 'installer' ? 'macOS 安装镜像' : '应用与工具'}{data.asset_size ? ` · ${(data.asset_size / 1048576).toFixed(1)} MB` : ''}</Fact> : null}</FactList>{data.package_kind === 'update'? <Help>应用更新包复用已安装工具;工具缺失、损坏或版本变化时会另行下载所需工具包。</Help>- : data.package_kind === 'full' ? <Help>本次更新包含媒体工具。</Help> : null}+ : data.package_kind === 'full' ? <Help>本次更新包含媒体工具。</Help>+ : data.package_kind === 'installer' ? <Help>下载后打开镜像,把 Peach 拖入「应用程序」替换旧版本,数据目录与设置保留;提示已损坏时按发布页说明移除隔离标记。</Help> : null}{data.state === 'unchecked' && !data.checked_at && !error && job.state === 'idle' ? null : <Stack divided>{data.checked_at ? <Help>检查于 {new Date(data.checked_at * 1000).toLocaleString()}</Help> : null}{data.state === 'available' && !error@@ -127,9 +128,11 @@ export function ReleaseUpdates({ initial, initialJob }: { initial: ReleaseState;</div>}><Button variant={job.state === 'ready' || (data.state === 'available' && data.installation === '独立测试包') ? 'secondary' : 'primary'}disabled={running} onClick={check} {...busyProps(action.busy === 'check')}>检查更新</Button>- {data.state === 'available' && data.installation === '独立测试包' && job.state !== 'ready'+ {data.state === 'available' && data.in_app_update && job.state !== 'ready'? <Button variant="primary" onClick={download} {...busyProps(running || action.busy === 'download')}>下载并安装</Button>- : null}+ : data.state === 'available' && data.installation === '独立测试包' && data.asset_url+ ? <ButtonLink variant="primary" href={data.asset_url}>下载新版本</ButtonLink>+ : null}{job.state === 'ready' ? <Button variant="primary" onClick={confirmRestart}>重启安装</Button> : null}</Footer></Section>diff --git a/frontend/test/react/maintenance-settings.test.tsx b/frontend/test/react/maintenance-settings.test.tsxindex 9afc4ea0a..d4551853e 100644--- a/frontend/test/react/maintenance-settings.test.tsx+++ b/frontend/test/react/maintenance-settings.test.tsx@@ -11,7 +11,7 @@ import { actionOrder, buttonNamed, choose, click, fetchMock, mount, section, senconst automatic = { mode: 'off', interval_hours: 24, available: true, download_available: true };const release: ReleaseState = {- current_version: '0.9.0', latest_version: null, channel: '测试版', installation: '独立测试包',+ current_version: '0.9.0', latest_version: null, channel: '测试版', installation: '独立测试包', in_app_update: true,state: 'unchecked', message: '尚未检查', release_url: 'https://github.com/peach-mitao/peach/releases',};const uninstall = { available: true, full_available: true, message: '', data_root: 'fixture', directories: ['fixture', 'fixture/cache'] };@@ -135,6 +135,18 @@ describe('检查更新', () => {expect(check.disabled).toBe(false);});+ it('macOS 独立包没有应用内安装,给本机架构的安装镜像下载键', async () => {+ const dmg = 'https://github.com/peach-mitao/peach/releases/download/v1.0.0/Peach-1.0.0-macos-arm64.dmg';+ const host = await mount(<ReleaseUpdates initial={{ ...release, in_app_update: false, state: 'available',+ latest_version: '1.0.0', message: '有新版本可下载。', package_kind: 'installer', asset_url: dmg, asset_size: 300 * 1048576 }} />);+ const updates = section(host, '检查更新')!;+ expect(updates.textContent).toContain('macOS 安装镜像 · 300.0 MB');+ expect(updates.textContent).toContain('把 Peach 拖入「应用程序」');+ expect(buttonNamed('下载并安装', updates)).toBeNull();+ const link = [...updates.querySelectorAll('a')].find((a) => a.textContent === '下载新版本');+ expect(link?.getAttribute('href')).toBe(dmg);+ });+it('已是最新就不再提示可用更新,也不给安装键', async () => {const current = await mount(<ReleaseUpdates initial={{ ...release, latest_version: '0.9.0', state: 'current', message: '已是最新测试版。' }} />);expect(current.textContent).not.toContain('有可用更新');diff --git a/scripts/MACOS_DOWNLOADS.md b/scripts/MACOS_DOWNLOADS.mdindex 60ce1f608..2afa982ce 100644--- a/scripts/MACOS_DOWNLOADS.md+++ b/scripts/MACOS_DOWNLOADS.md@@ -6,6 +6,6 @@ kind: howtoApple Silicon 下载文件名含 `macos-arm64.dmg` 的安装镜像;Intel 下载含 `macos-x86_64.dmg` 的安装镜像。在「关于本机」中查看芯片或处理器。打开镜像,将 Peach 拖入「应用程序」,再打开应用完成首次设置。提示「已损坏,无法打开」时,在终端执行 `sudo /usr/bin/xattr -rd com.apple.quarantine "/Applications/Peach.app"` 后重新打开。提示输入密码时,输入这台 Mac 的登录密码;输入过程中屏幕不显示字符。这条命令只移除 Peach 的隔离标记;安装新版本后需要再运行一次。-应用内置 Python,可独立运行;单机使用不依赖 Windows。测试包使用 ad-hoc 签名,尚未完成 Developer ID 签名与 Apple 公证。媒体工具需另行准备,macOS 暂无在线更新安装器。系统版本下限以包内 `LSMinimumSystemVersion` 为准。+应用内置 Python,可独立运行;单机使用不依赖 Windows。测试包使用 ad-hoc 签名,尚未完成 Developer ID 签名与 Apple 公证。媒体工具需另行准备,macOS 不做应用内安装,配置页「检查更新」给出本机架构新版 DMG 的下载键。系统版本下限以包内 `LSMinimumSystemVersion` 为准。安装、来源挂载与双机复制见 [macOS 使用说明](https://github.com/peach-mitao/peach/blob/master/docs/OPERATIONS.md#macos-独立测试包)。各架构的原生构建、镜像挂载与独立运行通过后,两个 DMG 才会随同一 Release 上传;哈希包含在 `SHA256SUMS.txt`。diff --git a/src/peach/automatic_updates.py b/src/peach/automatic_updates.pyindex c54d089be..7e56d415a 100644--- a/src/peach/automatic_updates.py+++ b/src/peach/automatic_updates.py@@ -38,7 +38,7 @@ class AutomaticUpdates:data["result"] = dict(result, checked_at=data.get("checked_at"))else:data.pop("result")- return dict(data, available=self.available, download_available=distribution.standalone())+ return dict(data, available=self.available, download_available=distribution.in_app_update())def remember(self, result: dict) -> None:"""手动检查与后台检查共享最近一次结果。"""@@ -62,7 +62,7 @@ class AutomaticUpdates:raise ValueError("请选择自动更新方式")if type(hours) is not int or hours not in (6, 24, 168):raise ValueError("请选择检查频率")- if mode == "download" and not distribution.standalone():+ if mode == "download" and not distribution.in_app_update():raise ValueError("自动下载仅适用于 Windows 独立测试包")self.path.parent.mkdir(parents=True, exist_ok=True)with FileLock(str(self.path) + ".lock", timeout=0):@@ -90,7 +90,8 @@ class AutomaticUpdates:data.pop("error", None)data = dict(data, checked_at=now, result=result)self.write(data)- if data["mode"] == "download" and distribution.standalone() and result["state"] == "available":+ # 以前在 macOS 独立包上存下的「自动下载」只按检查处理:那里没有应用内安装。+ if data["mode"] == "download" and distribution.in_app_update() and result["state"] == "available":job = standalone_update.public()if job["state"] not in standalone_update.ACTIVE | {"ready"}:try:diff --git a/src/peach/distribution.py b/src/peach/distribution.pyindex 3055421d1..0003b4fcf 100644--- a/src/peach/distribution.py+++ b/src/peach/distribution.py@@ -10,6 +10,11 @@ def standalone() -> bool:(Path(getattr(sys, "_MEIPASS", "")) / "standalone.txt").is_file())+def in_app_update() -> bool:+ """应用内下载并替换安装只有 Windows 独立包有;macOS 独立包下载 DMG 手动替换。"""+ return sys.platform == "win32" and standalone()++def user_data_root(environ: dict[str, str]) -> Path:if sys.platform == "win32":base = Path(environ.get("LOCALAPPDATA") or Path.home() / "AppData" / "Local")diff --git a/src/peach/release_updates.py b/src/peach/release_updates.pyindex fbb71fdd0..f88437608 100644--- a/src/peach/release_updates.py+++ b/src/peach/release_updates.py@@ -2,7 +2,10 @@from __future__ import annotationsimport json+import platformimport re+import sys+import httpxfrom . import __version__, distribution@@ -28,6 +31,7 @@ def download_sources(url: str) -> tuple[str, ...]:def snapshot() -> dict:return {"current_version": __version__, "latest_version": None,"channel": "测试版", "installation": "独立测试包" if distribution.standalone() else "源码运行",+ "in_app_update": distribution.in_app_update(),"state": "unchecked", "message": "尚未检查", "release_url": RELEASES_URL}@@ -37,8 +41,12 @@ def _version(value: object) -> tuple[int, ...] | None:return tuple(map(int, value.removeprefix("v").split(".")))-def _release_candidates(rows: list, endpoint: str) -> list[tuple]:- """从一个公开发行源选择完整包,并构造受信任的下载地址。"""+def _release_candidates(rows: list, endpoint: str, system: str = "win32", machine: str = "") -> list[tuple]:+ """从一个公开发行源选择本机平台的完整包,并构造受信任的下载地址。++ macOS 选与本机架构同名的 DMG(`build_macos_standalone.py` 按 `platform.machine()` 命名),+ 没有分包与工具包;其余平台沿用 Windows 包判断有无新版本。+ """releases = []for row in rows:if not isinstance(row, dict) or row.get("draft"):@@ -48,13 +56,18 @@ def _release_candidates(rows: list, endpoint: str) -> list[tuple]:continuetag = row["tag_name"]assets = row.get("assets") or []- prefix = f"Peach-{tag.removeprefix('v')}-windows-x64"uploaded = {a.get("name"): a for a in assets if isinstance(a, dict) and a.get("state") == "uploaded"}- full = uploaded.get(prefix + ".zip")- if full is None:- continue- complete_tools = all(prefix + f"-tools-{tool}.zip" in uploaded for tool in TOOL_PATHS)- asset = uploaded.get(prefix + "-update.zip", full) if complete_tools else full+ if system == "darwin":+ full = asset = uploaded.get(f"Peach-{tag.removeprefix('v')}-macos-{machine}.dmg")+ if full is None:+ continue+ else:+ prefix = f"Peach-{tag.removeprefix('v')}-windows-x64"+ full = uploaded.get(prefix + ".zip")+ if full is None:+ continue+ complete_tools = all(prefix + f"-tools-{tool}.zip" in uploaded for tool in TOOL_PATHS)+ asset = uploaded.get(prefix + "-update.zip", full) if complete_tools else fullif endpoint == DOWNLOADS_API:if not all(re.fullmatch(r"sha256:[0-9a-f]{64}", item.get("digest") or "") for item in (asset, full)):continue@@ -66,8 +79,10 @@ def _release_candidates(rows: list, endpoint: str) -> list[tuple]:return releases-def check(*, transport=None) -> dict:+def check(*, transport=None, system: str | None = None, machine: str | None = None) -> dict:result = snapshot()+ system = system or sys.platform+ machine = machine or platform.machine()client = transport or HttpxTransport()try:releases = []@@ -84,7 +99,7 @@ def check(*, transport=None) -> dict:if not isinstance(rows, list):continueobtained = True- releases.extend(_release_candidates(rows, endpoint))+ releases.extend(_release_candidates(rows, endpoint, system, machine))except (OSError, ValueError, TypeError, TimeoutError, httpx.HTTPError):continueif not releases:@@ -99,7 +114,7 @@ def check(*, transport=None) -> dict:return dict(result, latest_version=tag.removeprefix("v"), state=state, message=message,asset_url=f"{directory}/{asset['name']}",asset_size=asset.get("size", 0), asset_digest=asset.get("digest"),- package_kind="update" if asset is not full else "full",+ package_kind="installer" if system == "darwin" else "update" if asset is not full else "full",# 应用更新包准备不下去(清单或工具包与本版更新器对不上)时改下的同版本完整包。full_url=f"{directory}/{full['name']}", full_size=full.get("size", 0),full_digest=full.get("digest"),diff --git a/src/peach/standalone_update.py b/src/peach/standalone_update.pyindex bca658f2b..317f6ab06 100644--- a/src/peach/standalone_update.py+++ b/src/peach/standalone_update.py@@ -245,8 +245,8 @@ def prepare(data: dict, lock: FileLock) -> None:def start() -> dict:- if not distribution.standalone() or sys.platform != "win32":- raise ValueError("此安装方式不支持独立包更新")+ if not distribution.in_app_update():+ raise ValueError("此安装方式不支持应用内更新,请从发布页下载新版本")lock = FileLock(str(state_path()) + ".lock", thread_local=False)try:lock.acquire(timeout=0)@@ -273,8 +273,8 @@ def _update_writer(stage: Path) -> bool:def request_restart() -> dict:- if not distribution.standalone() or sys.platform != "win32":- raise ValueError("此安装方式不支持独立包更新")+ if not distribution.in_app_update():+ raise ValueError("此安装方式不支持应用内更新,请从发布页下载新版本")with FileLock(str(state_path()) + ".lock", timeout=0):data = read()if data.get("state") != "ready":diff --git a/tests/test_automatic_updates.py b/tests/test_automatic_updates.pyindex 6f41c8ef3..946c89485 100644--- a/tests/test_automatic_updates.py+++ b/tests/test_automatic_updates.py@@ -23,7 +23,7 @@ class AutomaticUpdateTests(unittest.TestCase):{"mode": "check", "interval_hours": 1}):with self.assertRaises(ValueError):self.updates.save(body)- with patch("peach.distribution.standalone", return_value=False), self.assertRaises(ValueError):+ with patch("peach.distribution.in_app_update", return_value=False), self.assertRaises(ValueError):self.updates.save({"mode": "download", "interval_hours": 24})self.updates.save({"mode": "off", "interval_hours": 24})with patch("peach.release_updates.check") as check:@@ -49,7 +49,7 @@ class AutomaticUpdateTests(unittest.TestCase):self.assertEqual(self.updates.read()["result"]["state"], "error")def test_download_prepares_once_and_never_requests_restart(self):- with patch("peach.distribution.standalone", return_value=True), patch(+ with patch("peach.distribution.in_app_update", return_value=True), patch("peach.release_updates.check", return_value={"state": "available"}), patch("peach.standalone_update.public", return_value={"state": "idle"}), patch("peach.standalone_update.start") as start, patch("peach.standalone_update.request_restart") as restart:@@ -59,7 +59,7 @@ class AutomaticUpdateTests(unittest.TestCase):start.assert_called_once()restart.assert_not_called()for state in ("ready", "downloading", "installing"):- with patch("peach.distribution.standalone", return_value=True), patch(+ with patch("peach.distribution.in_app_update", return_value=True), patch("peach.release_updates.check", return_value={"state": "available"}), patch("peach.standalone_update.public", return_value={"state": state}), patch("peach.standalone_update.start") as start:@@ -67,6 +67,17 @@ class AutomaticUpdateTests(unittest.TestCase):self.updates.tick()start.assert_not_called()+ def test_macos_standalone_only_checks_even_with_saved_download_mode(self):+ self.updates.write({"mode": "download", "interval_hours": 24})+ with patch("peach.distribution.in_app_update", return_value=False), patch(+ "peach.release_updates.check", return_value={"state": "available"}) as check, patch(+ "peach.standalone_update.start") as start:+ self.assertFalse(self.updates.snapshot()["download_available"])+ self.updates.tick()+ check.assert_called_once()+ start.assert_not_called()+ self.assertNotIn("error", self.updates.read(), "没有应用内安装的系统不能每轮记一次下载失败")+def test_unmanaged_and_corrupt_settings_fail_closed(self):other = AutomaticUpdates(self.root, available=False)with self.assertRaises(ValueError):diff --git a/tests/test_release_updates.py b/tests/test_release_updates.pyindex a33c319eb..c5ff5f3a3 100644--- a/tests/test_release_updates.py+++ b/tests/test_release_updates.py@@ -1,11 +1,12 @@"""发行通道、故障状态和独立托盘检查的隔离回归。"""import json+from types import SimpleNamespaceimport unittestfrom unittest.mock import Mock, patchimport httpx-from peach import release_updates+from peach import distribution, release_updatesfrom peach.http import HttpResponsefrom peach.versioning import VersionManager@@ -16,6 +17,12 @@ def release(version, **extra):class ReleaseUpdateTests(unittest.TestCase):+ def setUp(self):+ # 选包跟着本机系统走;这一组用例按 Windows 包写,在 macOS runner 上同样要选 Windows 包。+ windows = patch.object(release_updates, "sys", SimpleNamespace(platform="win32"))+ windows.start()+ self.addCleanup(windows.stop)+def test_r2_release_is_available_when_github_is_unavailable_and_uses_verified_digest(self):row = release("1.0.0")row["assets"][0].update(size=123, digest="sha256:" + "a" * 64,@@ -133,3 +140,30 @@ class ReleaseUpdateTests(unittest.TestCase):self.assertEqual(result.state, "available")self.assertIn("1.0.0", result.message)execute.assert_not_called()++ def test_macos_offers_the_dmg_for_its_own_architecture_without_in_app_install(self):+ row = release("1.0.0")+ row["assets"] += [+ {"name": "Peach-1.0.0-macos-arm64.dmg", "state": "uploaded", "size": 456, "digest": "sha256:" + "b" * 64},+ {"name": "Peach-1.0.0-macos-x86_64.dmg", "state": "uploaded", "size": 789},+ ]+ transport = Mock(return_value=HttpResponse(200, {}, json.dumps([row]).encode()))+ with patch.object(release_updates, "__version__", "0.9.0"):+ result = release_updates.check(transport=transport, system="darwin", machine="arm64")+ intel = release_updates.check(transport=transport, system="darwin", machine="x86_64")+ self.assertEqual(result["state"], "available")+ self.assertEqual(result["package_kind"], "installer")+ self.assertEqual(result["asset_url"], release_updates.RELEASES_URL + "/download/v1.0.0/Peach-1.0.0-macos-arm64.dmg")+ self.assertEqual(result["asset_size"], 456)+ self.assertTrue(intel["asset_url"].endswith("Peach-1.0.0-macos-x86_64.dmg"))+ with patch("peach.distribution.standalone", return_value=True):+ with patch.object(distribution, "sys", SimpleNamespace(platform="darwin")):+ self.assertFalse(release_updates.snapshot()["in_app_update"], "macOS 独立包没有应用内安装")+ with patch.object(distribution, "sys", SimpleNamespace(platform="win32")):+ self.assertTrue(release_updates.snapshot()["in_app_update"])++ def test_macos_skips_releases_without_its_dmg(self):+ transport = Mock(return_value=HttpResponse(200, {}, json.dumps([release("1.0.0")]).encode()))+ with patch.object(release_updates, "__version__", "0.9.0"):+ result = release_updates.check(transport=transport, system="darwin", machine="arm64")+ self.assertEqual(result["state"], "empty", "只有 Windows 包的版本不能提示 macOS 更新")diff --git a/web/dist/peach-app.configuration-page-DFsNUGcd.js b/web/dist/peach-app.configuration-page-E7k2Oc56.jssimilarity index 99%rename from web/dist/peach-app.configuration-page-DFsNUGcd.jsrename to web/dist/peach-app.configuration-page-E7k2Oc56.jsindex 185c3494e..432539dc9 100644--- a/web/dist/peach-app.configuration-page-DFsNUGcd.js+++ b/web/dist/peach-app.configuration-page-E7k2Oc56.js@@ -1,7 +1,7 @@(function() {try {var e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t = new e.Error().stack;- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "edb71d45-6592-462a-ab5f-d73a107296a0", e._sentryDebugIdIdentifier = "sentry-dbid-edb71d45-6592-462a-ab5f-d73a107296a0");+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "bc657e5d-36da-439b-8df5-3d349bded86f", e._sentryDebugIdIdentifier = "sentry-dbid-bc657e5d-36da-439b-8df5-3d349bded86f");} catch {}})();import { AnimatedItems as e, Cell as t, ChartBackground as n, ChartContainer as r, ChartLegend as i, ChartLegendContent as a, ChartTip as o, ChartTooltip as s, ChartTooltipContent as c, Curve as l, DATA_ITEM_GRAPHICAL_ITEM_ID_ATTRIBUTE_NAME as u, DATA_ITEM_INDEX_ATTRIBUTE_NAME as d, DefaultZIndexes as f, EvilBarChart as p, LabelList as m, LabelListFromLabelProp as h, Layer as g, LoadingIndicator as _, PolarChart as v, PolarLabelContextProvider as y, PolarLabelListContextProvider as b, RegisterGraphicalItemId as x, Sector as S, SetPolarGraphicalItem as C, SetPolarLegendPayload as w, SetTooltipEntrySettings as T, Shape as ee, TIP_SWATCH as te, Text as ne, ZIndexLayer as re, adaptEventsOfChild as ie, arrayTooltipSearcher as ae, createSelector as oe, defaultPolarChartProps as se, findAllByType as ce, get as le, getClassNameFromUnknown as ue, getColorsCount as de, getMaxRadius as fe, getPercentValue as pe, getTooltipNameProp as me, getValueByDataKey as he, interpolate as ge, isNumber as _e, matchAppend as ve, mathSign as ye, polarToCartesian as be, resolveDefaultProps as xe, selectActiveTooltipDataKey as Se, selectActiveTooltipGraphicalItemId as Ce, selectActiveTooltipIndex as we, selectChartDataAndAlwaysIgnoreIndexes as Te, selectChartOffsetInternal as Ee, selectUnfilteredPolarItems as De, svgPropertiesNoEvents as Oe, svgPropertiesNoEventsFromUnknown as ke, tone as Ae, useAnimationCallbacks as je, useAppSelector as Me, useMouseClickItemDispatch as Ne, useMouseEnterItemDispatch as Pe, useMouseLeaveItemDispatch as Fe, usePolarChartLayout as Ie } from "./peach-app.chart-tip-CRxYp6KT.js";@@ -2334,10 +2334,10 @@ function ma({ initial: e, initialJob: t }) {}),n.package_kind ? /* @__PURE__ */ (0, Q.jsxs)(j, {term: "下载内容",- children: [n.package_kind === "update" ? "应用更新包" : "应用与工具", n.asset_size ? ` · ${(n.asset_size / 1048576).toFixed(1)} MB` : ""]+ children: [n.package_kind === "update" ? "应用更新包" : n.package_kind === "installer" ? "macOS 安装镜像" : "应用与工具", n.asset_size ? ` · ${(n.asset_size / 1048576).toFixed(1)} MB` : ""]}) : null] }),- n.package_kind === "update" ? /* @__PURE__ */ (0, Q.jsx)(N, { children: "应用更新包复用已安装工具;工具缺失、损坏或版本变化时会另行下载所需工具包。" }) : n.package_kind === "full" ? /* @__PURE__ */ (0, Q.jsx)(N, { children: "本次更新包含媒体工具。" }) : null,+ n.package_kind === "update" ? /* @__PURE__ */ (0, Q.jsx)(N, { children: "应用更新包复用已安装工具;工具缺失、损坏或版本变化时会另行下载所需工具包。" }) : n.package_kind === "full" ? /* @__PURE__ */ (0, Q.jsx)(N, { children: "本次更新包含媒体工具。" }) : n.package_kind === "installer" ? /* @__PURE__ */ (0, Q.jsx)(N, { children: "下载后打开镜像,把 Peach 拖入「应用程序」替换旧版本,数据目录与设置保留;提示已损坏时按发布页说明移除隔离标记。" }) : null,n.state === "unchecked" && !n.checked_at && !g && i.state === "idle" ? null : /* @__PURE__ */ (0, Q.jsxs)(V, {divided: !0,children: [@@ -2392,11 +2392,15 @@ function ma({ initial: e, initialJob: t }) {...K(c.busy === "check"),children: "检查更新"}),- n.state === "available" && n.installation === "独立测试包" && i.state !== "ready" ? /* @__PURE__ */ (0, Q.jsx)(E, {+ n.state === "available" && n.in_app_update && i.state !== "ready" ? /* @__PURE__ */ (0, Q.jsx)(E, {variant: "primary",onClick: m,...K(d || c.busy === "download"),children: "下载并安装"+ }) : n.state === "available" && n.installation === "独立测试包" && n.asset_url ? /* @__PURE__ */ (0, Q.jsx)(Je, {+ variant: "primary",+ href: n.asset_url,+ children: "下载新版本"}) : null,i.state === "ready" ? /* @__PURE__ */ (0, Q.jsx)(E, {variant: "primary",@@ -5458,4 +5462,4 @@ function $o({ data: e, receipt: t, reopenTutorial: n, section: r, diagnostics: i}export { Xo as ConfigurationPage };-//# debugId=edb71d45-6592-462a-ab5f-d73a107296a0\ No newline at end of file+//# debugId=bc657e5d-36da-439b-8df5-3d349bded86f\ No newline at end of filediff --git a/web/dist/peach-app.js b/web/dist/peach-app.jsindex fefae06bd..361bb9176 100644--- a/web/dist/peach-app.js+++ b/web/dist/peach-app.js@@ -2,7 +2,7 @@(function() {try {var e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t = new e.Error().stack;- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "1887a47f-16fe-4cdd-88a0-e023e9a3fd51", e._sentryDebugIdIdentifier = "sentry-dbid-1887a47f-16fe-4cdd-88a0-e023e9a3fd51");+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "3f3b8996-a56a-420e-93d8-e59122a3dd06", e._sentryDebugIdIdentifier = "sentry-dbid-3f3b8996-a56a-420e-93d8-e59122a3dd06");} catch {}})();var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, n) => {@@ -75589,7 +75589,7 @@ async function v6(e, t) {if (n.status === "rejected") throw n.reason;}var y6 = _6(() => import("./peach-app.jav-page-DHl3Jm_q.js")), b6 = _6(() => import("./peach-app.stats-page-CxbUCXeP.js")), x6 = _6(() => import("./peach-app.taste-page-C5j4APwJ.js")), S6 = _6(() => import("./peach-app.review-page-BoybwF8-.js")), C6 = _6(() => import("./peach-app.data-cleanup-page-Ctwipl6H.js")), w6 = _6(() => import("./peach-app.duplicates-page-Bau8HIlx.js")), T6 = _6(() => import("./peach-app.quality-goals-page-DwyqtX3v.js")), E6 = _6(() => import("./peach-app.scraping-page-Ddbx11Bn.js")), D6 = _6(async () => {- let [{ ConfigurationPage: e }, { DiagnosticsPage: t }] = await Promise.all([import("./peach-app.configuration-page-DFsNUGcd.js"), import("./peach-app.diagnostics-page-CZQmu5mE.js")]);+ let [{ ConfigurationPage: e }, { DiagnosticsPage: t }] = await Promise.all([import("./peach-app.configuration-page-E7k2Oc56.js"), import("./peach-app.diagnostics-page-CZQmu5mE.js")]);return {ConfigurationPage: e,DiagnosticsPage: t@@ -80812,4 +80812,4 @@ if (!$9) throw Error("主界面宿主缺失");cIe($9);export { UI as $2ec61d1d4f780267$export$a8a3e93435678ff9, ZI as $3a442827418ebe87$export$eb2fcfdbd7ba97d4, mR as $542a13ca2fa5b484$export$5b6b19405a83ff9d, KT as $72abaeab4d80592f$export$78efe591171d7d45, oz as $76d00c5a4edb230a$export$76ccd210b9029917, rz as $76d00c5a4edb230a$export$816b5d811295e6bc, lz as $76d00c5a4edb230a$export$b59bdbef9ce70de2, dz as $76d00c5a4edb230a$export$f6f0c3fe4ec306ea, nz as $76d00c5a4edb230a$export$f850895b287ef28e, npe as $b4f18e3395fe64d7$export$3d96ec278d3efce4, tpe as $b4f18e3395fe64d7$export$3e41faf802a29e71, Qfe as $b4f18e3395fe64d7$export$b2539bed5023c21c, hz as $b4f18e3395fe64d7$export$e51a686c67fdaa2d, ape as $bd263d78e9bf3c56$export$f5c9f3c2c4054eec, Nw as $ea3928288112382f$export$439d29a4e110a164, DR as $f2ff30fde7b014be$export$3ddf2d174ce01153, PR as $fe21c36db05242bb$export$a98f0dcb43a68a25, FR as $fe21c36db05242bb$export$d7b12c4107be0d61, Vpe as $l, gA as ACCENTS, BEe as AMANE_BRIDGE_CHECK_URL, J$ as AMANE_BRIDGE_KEY, VEe as AMANE_BRIDGE_REBUILD_URL, or as ApiError, rG as ArtSlot, q as Button, xI as ButtonLink, Xpe as Bx, _n as CLOUD_LOCATIONS, J1 as CLOUD_PROXY_HELP, Gr as COLUMN_SORT, o1 as CONFIGURATION_KEY, GY as CONFIGURATION_URL, HEe as COOKIE_TEXT_LIMIT, q$ as COVER_JOB_KEY, Ji as CREDENTIAL_STATE, U$ as CUSTOM_SOURCES_KEY, H$ as CUSTOM_SOURCES_URL, hV as Checkbox, mV as CheckboxGlyph, aV as ChevronSortDown, aZ as Chip, K2 as CloudDownloadDialog, iU as CollapseChevron, rU as CollapseRegion, u$ as CollectionSummary, yxe as DEFAULT_CATEGORY, ur as DEFAULT_SORT, kQ as DIAGNOSTICS_KEY, vSe as DIRECTORY_TEMPLATE_ERROR, k0 as DISCOVERY_SORTS, B2 as DOWNLOADS_KEY, z2 as DOWNLOADS_URL, dY as DUPLICATES_KEY, KJ as DataTableFooter, HJ as DataTableFrame, GJ as DataTableSort, uU as Disclosure, $ke as DownloadsPanel, Mpe as E3, bxe as ENTITY_REVIEW_KINDS, K1 as ENTRY_LINKS_HELP, q1 as ENTRY_LINKS_HINT, Wpe as Ea, sme as EmptyFocusButton, qz as EmptyState, cU as ErrorText, Uge as ExternalLink, Br as FEEDS_KEY, $Y as FEED_SCHEDULE_KEY, T$ as FIELDSET_FOOT, Qje as FLOW_LABEL_X, R3 as FLOW_VIEWBOX, Rr as FOLLOW_CHECK_KEY, Lr as FOLLOW_CREDENTIALS_KEY, N8 as FOLLOW_INITIAL_RANGE_OPTIONS, Ir as FOLLOW_MANAGE_KEY, NZ as FOLLOW_MANAGE_NAV, zr as FOLLOW_RESOLVE_KEY, QY as FOLLOW_SCHEDULE_KEY, Kge as Fact, Gge as FactList, lU as FieldLabel, F$ as Fieldset, P$ as FieldsetTitle, $ue as FilterGlass, mI as FilterGlassRows, pI as FilterIconButton, hI as FilterPill, Hge as Footer, jz as Gg, gI as GlassPill, sU as Help, Rz as HintText, Wje as IDLE_POLL_MS, cxe as IDLE_REPAIR, lI as IconButton, Uz as Input, Hz as InputBase, PA as JAV_LAYOUTS, j0 as JAV_RECOMMENDATION_GRID, SX as JUNK_KEY, Z3 as JavHeader, nxe as KEEP_LABELS, Hr as LAYOUTS, G1 as LIBRARY_FOLDER_HELP, SH as LIBRARY_PROCESSING_KEY, LY as LINKS_KEY, RY as LINK_CHECK_KEY, Wxe as LINK_KINDS, zY as LINK_PRUNE_KEY, tr as LOC, Lz as Label, R$ as LibraryProcessingCard, uB as LibraryShortcuts, RH as LinkButton, QH as LoadingDots, Ppe as M6, Yxe as MEDIA_PROCESSING_KEY, tX as MEDIA_PROCESSING_URL, gY as MEDIA_REPAIR_KEY, hY as MEDIA_REPAIR_URL, vr as MEDIA_SOURCES_KEY, gs as MEDIA_SOURCE_ICONS, hn as MEDIA_SOURCE_OPTIONS, lV as MENU_ITEM, uV as MENU_ITEM_INTERACTIVE, cV as MENU_POPOVER_SURFACE, HH as MenuDialog, $G as MixCard, Wz as ModalFrame, wy as MotionConfigContext, Iz as NR, Kz as Note, rme as OA, iX as ORGANIZE_KEY, sX as ORPHAN_RECORDS_KEY, Az as OV, Cz as P7, nEe as PHASES, KY as PICK_FOLDER_URL, B$ as PLAYLISTS_KEY, UDe as POLICY_COLUMNS, GDe as POLICY_COVER_NOTE, WDe as POLICY_MATRIX, W1 as POLICY_SUMMARY, WJ as Pagination, L$ as PathLine, zF as PillTabList, eU as Progress, xY as QUALITY_GOALS_KEY, O$ as REPAIR_CARD_TEXT, _Y as REPAIR_LIBRARIES_KEY, fX as RESOURCE_APPLY_KEY, dX as RESOURCE_SCAN_KEY, hEe as RESULT_PANEL, gEe as RESULT_SECTION, vxe as REVIEW_CATEGORIES, xX as REVIEW_COUNTS_KEY, xxe as REVIEW_DECISION_LABELS, wY as REVIEW_KEY, TY as REVIEW_LABELS, DY as REVIEW_QUEUES, OY as REVIEW_QUEUE_LABELS, nG as RetryNote, nme as Rf, zge as Rows, REe as SCRAPING_CHECK_URL, G$ as SCRAPING_COVER_URL, K$ as SCRAPING_KEY, LEe as SCRAPING_SETTINGS_URL, qU as SEGMENT, KU as SEGMENTED_TRACK, ZY as SETTINGS_KEY, qY as SETTINGS_URL, dr as SORT_DEFAULT_DIR, lr as SORT_OPTIONS, vn as SOURCE_LABELS, l3 as STATS_KEY, Rge as Section, Vge as SectionSkeleton, GU as SegmentedRadioGroup, I_e as SegmentedTabList, PW as Segments, UJ as Select, RU as Select$1, u1 as SelectField, zU as SelectItem, $J as SelectionActions, Jk as SelectionDock, eY as SelectionPopover, aU as SettingsCard, Lge as SettingsRow, oU as SettingsSectionLabel, Xge as SiteLabel, QU as SortDirectionIcon, LW as SortKeys, fQ as SourceAvatar, mU as SourceLabel, dU as SourceMark, Bge as Stack, I$ as StatusLabel, N2 as Switch, JF as TASKS_KEY, Nje as TASTE_REFRESH_KEY, Pje as TASTE_WINDOWS, eX as THUMBNAIL_JOBS_KEY, wX as TRASH_KEY, Nue as TRIGGER_LABELS, NJ as Table, tY as TableColumnControls, nY as TableColumnResizer, iY as TableSelectionHeader, $Q as TagManager, Wge as TaskCenterLink, tU as TaskProgress, Bz as TextField, zz as TextFieldContext, kz as Un, m$ as WANTS_KEY, n4 as WantMagnets, qp as WithPromise, wz as Wt, Oz as Xc, Fz as Xf, Ipe as Xt, Npe as _8, o as __commonJSMin, s as __exportAll, l as __toESM, tme as aB, Ti as addAlias, wi as addSource, g$ as addWant, bb as animate, B as apiGet, V as apiSend, OA as appSettingsStore, LSe as applyConfirmText, bX as applyLeftovers, ISe as applyPlanText, zSe as applyText, MA as applyTheme, f_ as asNumber, TSe as attachOrphan, si as authorAvatar, li as authorGroups, oi as authorInitial, ai as authorName, xq as autoResetPageIndex, go as avatarInner, h3 as bandRows, ySe as baseName, sxe as batchOperate, $k as boundedPreference, ixe as bulkCloudPreferences, Zz as busyProps, eme as cB, lAe as cachedMagnetStates, Lp as calcGeneratorVelocity, Oxe as canApprove, Yf as cancelFrame, ASe as candidateText, ZH as cardClass, qA as cardRatio, Dz as cc, Wi as checkEvidenceGap, Ui as checkFailures, Pi as checkFeeds, Jxe as checkLine, Vi as checkReceipt, Hi as checkSummary, WEe as checkText, Gi as checkedText, TG as clickedBlank, Xbe as cloudLocations, T0 as cloudProxySkeleton, $x as clsx, qpe as cn, Xh as collectMotionValues, Vq as columnVisibilityFeature, OJ as column_getCanSort, wJ as column_getSortFn, Exe as commonReviewSources, yV as configurationSection, Rje as configureTasteBrowser, ol as confirmModal, rq as copyInstancePropertiesWithoutMemos, co as coverUrl, Mq as createColumnHelper, jEe as createPlaylist, Yi as credentialDone, x0 as credentialsSkeleton, Lxe as currentReviewRow, IF as cx, Nz as dZ, Pxe as decisionPayload, Fxe as decisionReceipt, Nxe as defaultChoice, NEe as deletePlaylist, x as diagnosticHeaders, U1 as diagnosticsSkeleton, uEe as discoveryArtwork, x$ as discoveryKey, hOe as discoveryScore, exe as distinctName, zi as dropSources, $pe as du, axe as duplicateVictims, tI as elapsedText, tn as entityDisplayName, ho as entityFaceImg, Nn as entityPath, ei as errorHeadline, cr as errorMessage, z as esc, bq as expandRowModel, bz as f1, $r as feedIntervalText, Z$ as fetchAmaneBridge, _i as fetchCheckJob, s1 as fetchConfiguration, X$ as fetchCoverJob, gi as fetchCredentials, W$ as fetchCustomSources, AQ as fetchDiagnostics, S$ as fetchDiscoveries, pY as fetchDuplicates, Oue as fetchEarlier, Qxe as fetchFeedSchedule, ji as fetchFeeds, hi as fetchFollow, Zxe as fetchFollowSchedule, EX as fetchJunkSummary, HY as fetchLinkCheck, UY as fetchLinkPrune, VY as fetchLinkStats, Xxe as fetchMediaProcessing, vY as fetchMediaRepair, yr as fetchMediaSources, aX as fetchOrganize, dSe as fetchOrganizeExample, cX as fetchOrphanRecords, Ai as fetchPending, V$ as fetchPlaylists, SY as fetchQualityGoals, yY as fetchRepairLibraries, vi as fetchResolveJob, mX as fetchResourceApply, pX as fetchResourceScan, PY as fetchReview, TX as fetchReviewCounts, nX as fetchSettings, Y$ as fetchSources, u3 as fetchStats, yi as fetchSuggestions, XF as fetchTasks, F3 as fetchTaste, zje as fetchTasteJob, $xe as fetchThumbnailJobs, DX as fetchTrashSummary, h$ as fetchWants, wxe as filterReviewRows, $n as firstGrapheme, zK as flexRender, eMe as flowGraph, tMe as flowLabel, $Ae as fmtCount, qn as fmtDur, Yn as fmtSize, Due as foldByKind, Hue as foldRoutine, Ii as followFeedByName, Vr as followSuggestKey, Wue as followupDetail, Eue as followupTally, Jf as frame, Cpe as g4, Wq as getDefaultPaginationState, KA as gridLayout, ci as groupByAuthor, Vue as groupFollowups, jY as groupReviewRows, PSe as hasChanges, hX as hasResourceRoots, QF as hasResultProblems, Gje as historySpan, xz as i2, Uje as importTasteExport, S0 as indexersSkeleton, kp as interpolate, v$ as invalidateWants, eI as isActive, Qr as isBroken, Kr as isLayout, ug as isMotionValue, EY as isReviewCategory, Uue as isRoutine, C0 as javBrowserSkeleton, N0 as javContentSkeleton, zA as javLayout, M0 as javTagSkeleton, WSe as junkBreakdown, PEe as keepPlaylist, ke as keepPreviousData, fi as keepSelected, d3 as known, Dpe as l7, Bue as latestOfKind, dje as lengthRows, Sr as localTime, Fi as lookupFeedActor, Ape as m7, Mz as mM, En as mapLimit, ki as markItem, g3 as max, lje as mediumRows, kue as mergeFinished, _3 as min, Hxe as mirrorText, dxe as missingToolText, mY as mixedCloudPreferences, aI as momentText, xb as motion, Qh as motionValue, xSe as organizeOutcome, J0 as overlayHost, qr as pageSizeOf, di as pageWindow, mr as paginationRange, Ri as patchSource, sH as peachHistory, sH as peachHistory$1, Mxe as pendingGenres, tje as percentText, mSe as pickOrganizeFolder, bSe as planSummary, f3 as playedFor, rje as playedItemUrl, YF as pollInterval, Js as popCount, AEe as posterUrl, xG as previewLibraryColor, pSe as previewOrganize, mxe as previewUrl, zue as problemDestination, nI as progressText, pU as providerIcon, qxe as pruneText, _X as purgeCount, ESe as purgeOrphan, Pz as pv, Qpe as qE, H as queryClient, Sz as r2, Zje as radarRows, oje as radialArc, sje as radialBarSize, aje as radialCeiling, ije as radialSlices, cM as randomId, Yje as rankDetail, Xje as rankShares, m3 as reachedShare, rI as readableErrorHeadline, gOe as recommendationScore, Rxe as recordGenre, OSe as recordsText, FEe as recreatePlaylist, OEe as refreshPlaylists, Bl as relayoutCovers, Bi as reloadFollowManage, Vxe as reloadReview, JDe as rememberShape, gSe as rememberTemplates, Ei as removeAlias, Ni as removeFeed, Ci as removeSource, Hje as removeTasteSource, _$ as removeWants, Di as renameAliasGroup, MEe as renamePlaylist, pje as replayRows, ie as require_jsx_runtime, A as require_react, te as require_react_dom, $K as require_with_selector, aEe as resetWants, pr as resolveFollowSort, Up as resolveStartTime, kEe as resumeAssetId, Cxe as reviewGroupingOptions, AY as reviewQueueData, kY as reviewQueueOf, USe as reviewSummary, Txe as reviewWindow, Axe as rowEvidence, NY as rowFieldName, Zq as rowPaginationFeature, vJ as rowSelectionFeature, jJ as rowSortingFeature, MY as rowSubject, jxe as rowTags, kxe as rowTitle, wpe as s5, Oi as saveCredential, FSe as scanLine, iSe as schedulePollInterval, sEe as searchNote, Dxe as selectReviewRange, pi as selectionState, Mi as setFeedEnabled, Si as setSourceEnabled, CV as settingsPath, Bxe as settleReviewRows, $be as sharedNamePrefix, cH as shellNavigate, b8 as showToast, zn as siteMarkUrl, dq as skipFirstRun, LF as sortCx, Yr as sortLabel, yn as sourceDefaultCost, qi as sourceIconUrl, RSe as sourceMeta, zs as spinnerHtml, Ep as spring, Yz as spriteGlyph, bi as startCheck, Gxe as startLinkCheck, Kxe as startLinkPrune, hSe as startOrganize, xi as startResolve, MSe as startResourceApply, jSe as startResourceScan, Vje as startTasteRefresh, Fue as statusLabel, uxe as statusLine, Zr as statusText, JA as storeJavLayout, Ixe as submitDecision, oI as summaryItems, Nq as tableFeatures, fq as tableMemo, ui as tableRows, Rue as taskIssues, I3 as tasteDate, qje as tasteDimensions, Kje as tasteHours, P3 as tasteKey, Ije as tasteRefetchInterval, Lje as tasteTime, UF as textLang, Od as time, Bpe as tl, mi as toggleGroup, L3 as topScores, Upe as uo, zH as useAction, OZ as useBackgroundJob, jU as useClientUpdates, Bu as useConstant, sI as useEntityNames, fI as useHorizontalScroller, Vu as useIsomorphicLayoutEffect, CG as useLibraryTints, Ft as useMutation, gV as useOverlayScrollbar, Pt as useQuery, oe as useQueryClient, lb as useReducedMotion, rSe as useRunSchedule, tSe as useSaveFollowSchedule, rX as useSaveSettings, aSe as useSaveThumbnailMode, MJ as useTable, YJ as useTablePreferences, yI as useViewGlide, oxe as victimBytes, oEe as wantName, nje as watchNote, p3 as watchedShare, Dc as wireHorizontalScroller, _Se as withOrganizeJob };-//# debugId=1887a47f-16fe-4cdd-88a0-e023e9a3fd51\ No newline at end of file+//# debugId=3f3b8996-a56a-420e-93d8-e59122a3dd06\ No newline at end of file