diff --git a/app/core/context.py b/app/core/context.py index 162ebec9..c28d3b27 100644 --- a/app/core/context.py +++ b/app/core/context.py @@ -467,6 +467,8 @@ class MediaInfo: """ dicts = asdict(self) dicts["type"] = self.type.value if self.type else None + dicts["detail_link"] = self.detail_link + dicts["title_year"] = self.title_year return dicts diff --git a/app/core/meta/metabase.py b/app/core/meta/metabase.py index 2f33e22d..b86970bb 100644 --- a/app/core/meta/metabase.py +++ b/app/core/meta/metabase.py @@ -446,4 +446,5 @@ class MetaBase(object): """ dicts = asdict(self) dicts["type"] = self.type.value if self.type else None + dicts["season_episode"] = self.season_episode return dicts diff --git a/app/modules/indexer/spider.py b/app/modules/indexer/spider.py index 4501aea7..f0b7f2c3 100644 --- a/app/modules/indexer/spider.py +++ b/app/modules/indexer/spider.py @@ -529,7 +529,9 @@ class TorrentSpider: self.__remove(labels, selector) items = self.__attribute_or_text(labels, selector) 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: """ diff --git a/app/schemas/context.py b/app/schemas/context.py index 6a60410e..8317fb3c 100644 --- a/app/schemas/context.py +++ b/app/schemas/context.py @@ -36,6 +36,8 @@ class MetaInfo(BaseModel): begin_episode: Optional[int] = None # 识别的结束集 end_episode: Optional[int] = None + # SxxExx + season_episode: Optional[str] = None # Partx Cd Dvd Disk Disc part: Optional[str] = None # 识别的资源类型 @@ -62,6 +64,8 @@ class MediaInfo(BaseModel): title: Optional[str] = None # 年份 year: Optional[str] = None + # 标题(年份) + title_year: Optional[str] = None # 季 season: Optional[int] = None # TMDB ID @@ -98,6 +102,8 @@ class MediaInfo(BaseModel): actors: Optional[list] = [] # 导演 directors: Optional[list] = [] + # 详情链接 + detail_link: Optional[str] = None # 其它TMDB属性 adult: Optional[bool] = False created_by: Optional[list] = []