feat: 强化集数定位模板智能自动生成 (#5801)

This commit is contained in:
Album
2026-05-20 21:41:35 +08:00
committed by GitHub
parent 284c272001
commit d37954e6bc
4 changed files with 1507 additions and 25 deletions
+4 -1
View File
@@ -126,7 +126,10 @@ class FormatParser(object):
if not ret or not ret.__contains__(self._key):
return None, None
episodes = ret.__getitem__(self._key)
if not re.compile(r"^(EP)?(\d{1,4})(-(EP)?(\d{1,4}))?$", re.IGNORECASE).match(episodes):
if not re.compile(
r"^([Ee][Pp]?)?(\d{1,4})(-([Ee][Pp]?)?(\d{1,4}))?$",
re.IGNORECASE,
).match(episodes):
return None, None
episode_splits = list(filter(lambda x: re.compile(r'[a-zA-Z]*\d{1,4}', re.IGNORECASE).match(x),
re.split(r'%s' % self._split_chars, episodes)))