From 74d45922383e4b852ec4e0f7346b78f643452683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=AF=E5=A4=A7=E4=BE=A0?= Date: Mon, 2 Mar 2026 11:35:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(meta):=20=E4=BF=AE=E5=A4=8D=E6=AD=A3?= =?UTF-8?q?=E5=88=99=E8=A1=A8=E8=BE=BE=E5=BC=8F=E4=BB=A5=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=20`Sxx`=20=E5=AD=A3=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/meta/metavideo.py | 2 +- tests/cases/meta.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/app/core/meta/metavideo.py b/app/core/meta/metavideo.py index 541d1424..85a232a8 100644 --- a/app/core/meta/metavideo.py +++ b/app/core/meta/metavideo.py @@ -76,7 +76,7 @@ class MetaVideo(MetaBase): self.type = MediaType.TV return # 全名为Season xx 及 Sxx 直接返回 - season_full_res = re.search(r"^Season\s+(\d{1,3})$|^S(\d{1,3})$", title) + season_full_res = re.search(r"^(?:Season\s+|S)(\d{1,3})$", title) if season_full_res: self.type = MediaType.TV season = season_full_res.group(1) diff --git a/tests/cases/meta.py b/tests/cases/meta.py index 7becefef..b9f675e3 100644 --- a/tests/cases/meta.py +++ b/tests/cases/meta.py @@ -1069,6 +1069,38 @@ meta_cases = [{ "audio_codec": "", "tmdbid": 27205 } +}, { + "path": "/movies/Breaking Bad (2008) [tmdb=1396]/Season 2/", + "target": { + "type": "电视剧", + "cn_name": "", + "en_name": "Breaking Bad", + "year": "2008", + "part": "", + "season": "S02", + "episode": "", + "restype": "", + "pix": "", + "video_codec": "", + "audio_codec": "", + "tmdbid": 1396 + } +}, { + "path": "/movies/Breaking Bad (2008) [tmdb=1396]/S2/", + "target": { + "type": "电视剧", + "cn_name": "", + "en_name": "Breaking Bad", + "year": "2008", + "part": "", + "season": "S02", + "episode": "", + "restype": "", + "pix": "", + "video_codec": "", + "audio_codec": "", + "tmdbid": 1396 + } }, { "path": "/movies/Breaking Bad (2008) [tmdb=1396]/Season 1/Breaking.Bad.S01E01.1080p.mkv", "target": { From 7c48cafc71fe3a9fc7bdfc7b03f7109d7f72d305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E8=99=BE?= <802181+cddjr@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:47:47 +0800 Subject: [PATCH 2/2] Update app/core/meta/metavideo.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- app/core/meta/metavideo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/core/meta/metavideo.py b/app/core/meta/metavideo.py index 85a232a8..984e68c5 100644 --- a/app/core/meta/metavideo.py +++ b/app/core/meta/metavideo.py @@ -76,7 +76,7 @@ class MetaVideo(MetaBase): self.type = MediaType.TV return # 全名为Season xx 及 Sxx 直接返回 - season_full_res = re.search(r"^(?:Season\s+|S)(\d{1,3})$", title) + season_full_res = re.search(r"^(?:Season\s+|S)(\d{1,3})$", title, re.IGNORECASE) if season_full_res: self.type = MediaType.TV season = season_full_res.group(1)