From 79e05ee33893620abfb9b918d21cfdaee88a88bd Mon Sep 17 00:00:00 2001 From: Yuukiy <76897913+Yuukiy@users.noreply.github.com> Date: Mon, 8 Jan 2024 20:41:13 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20#191:=20=E6=94=B9=E8=BF=9B=E5=AF=B9?= =?UTF-8?q?=E4=BA=8Estage=202=20media=E7=B3=BB=E5=88=97=E7=95=AA=E5=8F=B7(?= =?UTF-8?q?S2M/S2MBD)=E7=9A=84=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/avid.py | 2 +- unittest/testdata_avid.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/avid.py b/core/avid.py index 162794cd9..f48df8c35 100644 --- a/core/avid.py +++ b/core/avid.py @@ -46,7 +46,7 @@ def get_id(filepath: str) -> str: if match: return 'heydouga-' + '-'.join(match.groups()) # 匹配片商 MUGEN 的奇怪番号。由于MK3D2DBD的模式,要放在普通番号模式之前进行匹配 - match = re.search(r'(MKB?D)[-_]*(S\d{2,3})|(MK3D2DBD)[-_]*(\d\d)', filename, re.I) + match = re.search(r'(MKB?D)[-_]*(S\d{2,3})|(MK3D2DBD|S2M|S2MBD)[-_]*(\d{2,3})', filename, re.I) if match: if match.group(1) is not None: avid = match.group(1) + '-' + match.group(2) diff --git a/unittest/testdata_avid.txt b/unittest/testdata_avid.txt index 9353d56cd..20e9602d9 100644 --- a/unittest/testdata_avid.txt +++ b/unittest/testdata_avid.txt @@ -647,3 +647,7 @@ MK3D2DBD-01 枢木みかん【MKV左右7.90G】.mkv MK3D2DBD-01 MKD-S148.mp4 MKD-S148 (KIRARI)(MKBD-S143)KIRARI 143 週末モデル 神田るな_1.mp4 MKBD-S143 (KIRARI)(MKBD-S143)KIRARI 143 週末モデル 神田るな_2.mp4 MKBD-S143 +S2MBD007.mp4 S2MBD-007 +Encore Vol.7 (S2MBD-007) Yui Hatano [1080p].mp4 S2MBD-007 +Encore Vol.07(アンコール Vol.07) 波多野結衣(Yui Hatano) S2MBD-007.iso S2MBD-007 +S2M-007 Encore Vol.7 波多野結衣~絶品美女再現絕代.mp4 S2M-007