This commit is contained in:
jxxghp 2023-07-08 14:37:51 +08:00
parent 6f3209f95d
commit b6d957c7d9
4 changed files with 12 additions and 1 deletions

View File

@ -467,6 +467,8 @@ class MediaInfo:
""" """
dicts = asdict(self) dicts = asdict(self)
dicts["type"] = self.type.value if self.type else None dicts["type"] = self.type.value if self.type else None
dicts["detail_link"] = self.detail_link
dicts["title_year"] = self.title_year
return dicts return dicts

View File

@ -446,4 +446,5 @@ class MetaBase(object):
""" """
dicts = asdict(self) dicts = asdict(self)
dicts["type"] = self.type.value if self.type else None dicts["type"] = self.type.value if self.type else None
dicts["season_episode"] = self.season_episode
return dicts return dicts

View File

@ -529,7 +529,9 @@ class TorrentSpider:
self.__remove(labels, selector) self.__remove(labels, selector)
items = self.__attribute_or_text(labels, selector) items = self.__attribute_or_text(labels, selector)
if items: if items:
self.torrents_info['labels'] = items self.torrents_info['labels'] = [item for item in items if item]
else:
self.torrents_info['labels'] = []
def get_info(self, torrent) -> dict: def get_info(self, torrent) -> dict:
""" """

View File

@ -36,6 +36,8 @@ class MetaInfo(BaseModel):
begin_episode: Optional[int] = None begin_episode: Optional[int] = None
# 识别的结束集 # 识别的结束集
end_episode: Optional[int] = None end_episode: Optional[int] = None
# SxxExx
season_episode: Optional[str] = None
# Partx Cd Dvd Disk Disc # Partx Cd Dvd Disk Disc
part: Optional[str] = None part: Optional[str] = None
# 识别的资源类型 # 识别的资源类型
@ -62,6 +64,8 @@ class MediaInfo(BaseModel):
title: Optional[str] = None title: Optional[str] = None
# 年份 # 年份
year: Optional[str] = None year: Optional[str] = None
# 标题(年份)
title_year: Optional[str] = None
# 季 # 季
season: Optional[int] = None season: Optional[int] = None
# TMDB ID # TMDB ID
@ -98,6 +102,8 @@ class MediaInfo(BaseModel):
actors: Optional[list] = [] actors: Optional[list] = []
# 导演 # 导演
directors: Optional[list] = [] directors: Optional[list] = []
# 详情链接
detail_link: Optional[str] = None
# 其它TMDB属性 # 其它TMDB属性
adult: Optional[bool] = False adult: Optional[bool] = False
created_by: Optional[list] = [] created_by: Optional[list] = []