Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

fix(web): 来源和凭证页的 みんなのAV 卡用随应用打包的站标

longmeidaoa21ed62e1b3f
diff --git a/frontend/src/react/scraping/scraping-page.tsx b/frontend/src/react/scraping/scraping-page.tsx
index bda77e340..f047d751e 100644
--- a/frontend/src/react/scraping/scraping-page.tsx
+++ b/frontend/src/react/scraping/scraping-page.tsx
@@ -48,7 +48,7 @@ const COOKIE_METHODS = [['paste', '粘贴 Cookie'], ['file', '导入文件']] as
需要代理才通的来源更是常年空着。取不到时把 `<img>` 摘掉,不留破图。 */
function SiteMark({ source }: { source: string }) {
// 这几站的公开图标随静态资源提供,验证页和离线回放不影响来源身份。
- const bundled = ['javten', 'fc2ppvdb', 'avwikidb', 'github'].includes(source);
+ const bundled = ['javten', 'fc2ppvdb', 'avwikidb', 'minnano-av', 'github'].includes(source);
return (
<img src={bundled ? `/site-icon/${source}.png` : siteMarkUrl({ source })} alt="" width={16} height={16} loading="lazy"
onError={(event) => event.currentTarget.remove()}
diff --git a/resources/site-marks/ORIGIN.md b/resources/site-marks/ORIGIN.md
index 9ea9c4e12..2c6411a26 100644
--- a/resources/site-marks/ORIGIN.md
+++ b/resources/site-marks/ORIGIN.md
@@ -1,12 +1,13 @@
# 来源图标
-这四枚图标用于「来源和凭证」页的站点身份,归各站点所有,不用于 Peach 品牌。
+这五枚图标用于「来源和凭证」页的站点身份,归各站点所有,不用于 Peach 品牌。
| 文件 | 来源 | 获取原因 |
| --- | --- | --- |
| javten.png | JAVten 的公开图标缓存:`https://www.google.com/s2/favicons?domain=javten.com&sz=64` | 官方首页与图标端点返回 Cloudflare 403,favicon.ico 返回空文件 |
| fc2ppvdb.png | FC2PPV-DB 的公开图标缓存:`https://www.google.com/s2/favicons?domain=fc2ppv-db.com&sz=64` | 官方首页与图标端点返回 Cloudflare 403 |
| avwikidb.png | `https://avwikidb.com/apple-touch-icon.png` | 首页有验证页,公开图标可读取 |
+| minnano-av.png | みんなのAV 的公开图标缓存:`https://www.google.com/s2/favicons?domain=minnano-av.com&sz=64`(缓存只有 32×32) | 官方 apple-touch-icon 与 favicon.ico 对 HTTP 客户端返回 Cloudflare 403 |
| github.png | `https://github.githubassets.com/favicons/favicon.svg` | 官方声明的矢量图标,经现有 `link_marks` 渲染 |
-取证:2026-09-30。资源经 `/site-icon/{name}.png` 提供,前端不向图标缓存服务发送访客请求;其余站点沿用 `/site-mark` 的发现与缓存。
+取证:javten、fc2ppvdb、avwikidb、github 为 2026-09-30,minnano-av 为 2026-10-01。资源经 `/site-icon/{name}.png` 提供,前端不向图标缓存服务发送访客请求;其余站点沿用 `/site-mark` 的发现与缓存。
diff --git a/resources/site-marks/minnano-av.png b/resources/site-marks/minnano-av.png
new file mode 100644
index 000000000..f950922f4
Binary files /dev/null and b/resources/site-marks/minnano-av.png differ
diff --git a/src/peach/routes_pages.py b/src/peach/routes_pages.py
index 81a956163..09d313fd3 100644
--- a/src/peach/routes_pages.py
+++ b/src/peach/routes_pages.py
@@ -797,8 +797,8 @@ def agentation_bundle(request: Request, args: dict[str, str] = Depends(require_a
@router.api_route("/site-icon/{name}", methods=["GET", "HEAD"])
def bundled_site_icon(request: Request, name: str,
args: dict[str, str] = Depends(require_asset_auth)):
- """随应用提供的来源标识,文件名只认已登记的四个来源。"""
- if name not in {"javten.png", "fc2ppvdb.png", "avwikidb.png", "github.png"}:
+ """随应用提供的来源标识,文件名只认已登记的五个来源。"""
+ if name not in {"javten.png", "fc2ppvdb.png", "avwikidb.png", "minnano-av.png", "github.png"}:
return PlainTextResponse("missing", status_code=404)
path = PROJECT_ROOT / "resources" / "site-marks" / name
if not path.is_file():
diff --git a/tests/test_fastapi_api.py b/tests/test_fastapi_api.py
index 4926cee9a..657f5afcb 100644
--- a/tests/test_fastapi_api.py
+++ b/tests/test_fastapi_api.py
@@ -891,7 +891,7 @@ class FastApiContractTests(unittest.IsolatedAsyncioTestCase):
async def test_bundled_site_icons_require_auth_and_validate_names(self):
from peach.config import PROJECT_ROOT
self.assertEqual((await self.client.get('/site-icon/github.png')).status_code, 401)
- for name in ('javten', 'fc2ppvdb', 'avwikidb', 'github'):
+ for name in ('javten', 'fc2ppvdb', 'avwikidb', 'minnano-av', 'github'):
response = await self.client.get(f'/site-icon/{name}.png?t=secret')
self.assertEqual(response.status_code, 200)
self.assertEqual(response.headers['content-type'], 'image/png')
diff --git a/web/dist/peach-react.js b/web/dist/peach-react.js
index edee144a4..d31f3573c 100644
--- a/web/dist/peach-react.js
+++ b/web/dist/peach-react.js
@@ -47088,6 +47088,7 @@ function kI({ source: e }) {
"javten",
"fc2ppvdb",
"avwikidb",
+ "minnano-av",
"github"
].includes(e);
return /* @__PURE__ */ (0, R.jsx)("img", {