From 2b22158f4b1ad68568358f82cf723f95b3c730b4 Mon Sep 17 00:00:00 2001 From: mtvpls Date: Tue, 6 Jan 2026 15:56:57 +0800 Subject: [PATCH] =?UTF-8?q?emby=E5=89=A7=E9=9B=86=E5=BC=B9=E5=B9=95?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/play/page.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index d150373..ed15751 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -2930,6 +2930,14 @@ function PlayPageClient() { const extractEpisodeNumber = (title: string): number | null => { if (!title) return null; + + // 优先匹配 Emby 格式:S01E01, S02E09 等 + const embyMatch = title.match(/[Ss]\d+[Ee](\d+)/); + if (embyMatch) { + return parseInt(embyMatch[1], 10); + } + + // 降级到原本的策略:纯数字或"第X集/话"格式 const match = title.match(/^(\d+)$|第?\s*(\d+)\s*[集话話]?/); return match ? parseInt(match[1] || match[2], 10) : null; };