Skip to content

Commit

Permalink
fix 特殊集数识别
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Apr 30, 2024
1 parent 76a8b02 commit ff1b0e0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/core/meta/metavideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MetaVideo(MetaBase):
def __init__(self, title: str, subtitle: str = None, isfile: bool = False):
"""
初始化
:param title: 标题
:param title: 标题,文件为去掉了后缀
:param subtitle: 副标题
:param isfile: 是否是文件名
"""
Expand All @@ -68,11 +68,10 @@ def __init__(self, title: str, subtitle: str = None, isfile: bool = False):
self._source = ""
self._effect = []
# 判断是否纯数字命名
title_path = Path(title)
if title_path.suffix.lower() in settings.RMT_MEDIAEXT \
and title_path.stem.isdigit() \
and len(title_path.stem) < 5:
self.begin_episode = int(title_path.stem)
if isfile \
and title.isdigit() \
and len(title) < 5:
self.begin_episode = int(title)
self.type = MediaType.TV
return
# 去掉名称中第1个[]的内容
Expand Down

0 comments on commit ff1b0e0

Please sign in to comment.