fix 特殊集数识别

This commit is contained in:
jxxghp 2024-04-30 11:49:03 +08:00
parent 76a8b02fe5
commit ff1b0e02d6

View File

@ -57,7 +57,7 @@ class MetaVideo(MetaBase):
def __init__(self, title: str, subtitle: str = None, isfile: bool = False): def __init__(self, title: str, subtitle: str = None, isfile: bool = False):
""" """
初始化 初始化
:param title: 标题 :param title: 标题文件为去掉了后缀
:param subtitle: 副标题 :param subtitle: 副标题
:param isfile: 是否是文件名 :param isfile: 是否是文件名
""" """
@ -68,11 +68,10 @@ class MetaVideo(MetaBase):
self._source = "" self._source = ""
self._effect = [] self._effect = []
# 判断是否纯数字命名 # 判断是否纯数字命名
title_path = Path(title) if isfile \
if title_path.suffix.lower() in settings.RMT_MEDIAEXT \ and title.isdigit() \
and title_path.stem.isdigit() \ and len(title) < 5:
and len(title_path.stem) < 5: self.begin_episode = int(title)
self.begin_episode = int(title_path.stem)
self.type = MediaType.TV self.type = MediaType.TV
return return
# 去掉名称中第1个[]的内容 # 去掉名称中第1个[]的内容