调整INFO日志打印量 && 回滚多线程过滤
This commit is contained in:
@ -173,7 +173,7 @@ class FilterModule(_ModuleBase):
|
||||
continue
|
||||
# 能命中优先级的才返回
|
||||
if not self.__get_order(torrent, rule_string):
|
||||
logger.info(f"种子 {torrent.site_name} - {torrent.title} {torrent.description} 不匹配优先级规则")
|
||||
logger.debug(f"种子 {torrent.site_name} - {torrent.title} {torrent.description} 不匹配优先级规则")
|
||||
continue
|
||||
ret_torrents.append(torrent)
|
||||
|
||||
@ -196,7 +196,7 @@ class FilterModule(_ModuleBase):
|
||||
torrent_episodes = meta.episode_list
|
||||
if not set(torrent_seasons).issubset(set(seasons)):
|
||||
# 种子季不在过滤季中
|
||||
logger.info(f"种子 {torrent.site_name} - {torrent.title} 包含季 {torrent_seasons} 不是需要的季 {list(seasons)}")
|
||||
logger.debug(f"种子 {torrent.site_name} - {torrent.title} 包含季 {torrent_seasons} 不是需要的季 {list(seasons)}")
|
||||
return False
|
||||
if not torrent_episodes:
|
||||
# 整季按匹配处理
|
||||
@ -206,7 +206,7 @@ class FilterModule(_ModuleBase):
|
||||
if need_episodes \
|
||||
and not set(torrent_episodes).intersection(set(need_episodes)):
|
||||
# 单季集没有交集的不要
|
||||
logger.info(f"种子 {torrent.site_name} - {torrent.title} "
|
||||
logger.debug(f"种子 {torrent.site_name} - {torrent.title} "
|
||||
f"集 {torrent_episodes} 没有需要的集:{need_episodes}")
|
||||
return False
|
||||
return True
|
||||
@ -228,7 +228,7 @@ class FilterModule(_ModuleBase):
|
||||
if self.__match_group(torrent, parsed_group.as_list()[0]):
|
||||
# 出现匹配时中断
|
||||
matched = True
|
||||
logger.info(f"种子 {torrent.site_name} - {torrent.title} 优先级为 {100 - res_order + 1}")
|
||||
logger.debug(f"种子 {torrent.site_name} - {torrent.title} 优先级为 {100 - res_order + 1}")
|
||||
torrent.pri_order = res_order
|
||||
break
|
||||
# 优先级降低,继续匹配
|
||||
|
@ -546,7 +546,7 @@ class TheMovieDbModule(_ModuleBase):
|
||||
detail = self.tmdb.get_person_detail(person_id=person_id)
|
||||
if detail:
|
||||
return schemas.MediaPerson(source="themoviedb", **detail)
|
||||
return schemas.MediaPerson
|
||||
return schemas.MediaPerson()
|
||||
|
||||
def tmdb_person_credits(self, person_id: int, page: int = 1) -> List[MediaInfo]:
|
||||
"""
|
||||
|
@ -759,10 +759,10 @@ class TmdbApi:
|
||||
if not self.movie:
|
||||
return {}
|
||||
try:
|
||||
logger.info("正在查询TMDB电影:%s ..." % tmdbid)
|
||||
logger.debug("正在查询TMDB电影:%s ..." % tmdbid)
|
||||
tmdbinfo = self.movie.details(tmdbid, append_to_response)
|
||||
if tmdbinfo:
|
||||
logger.info(f"{tmdbid} 查询结果:{tmdbinfo.get('title')}")
|
||||
logger.debug(f"{tmdbid} 查询结果:{tmdbinfo.get('title')}")
|
||||
return tmdbinfo or {}
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
@ -942,10 +942,10 @@ class TmdbApi:
|
||||
if not self.tv:
|
||||
return {}
|
||||
try:
|
||||
logger.info("正在查询TMDB电视剧:%s ..." % tmdbid)
|
||||
logger.debug("正在查询TMDB电视剧:%s ..." % tmdbid)
|
||||
tmdbinfo = self.tv.details(tv_id=tmdbid, append_to_response=append_to_response)
|
||||
if tmdbinfo:
|
||||
logger.info(f"{tmdbid} 查询结果:{tmdbinfo.get('name')}")
|
||||
logger.debug(f"{tmdbid} 查询结果:{tmdbinfo.get('name')}")
|
||||
return tmdbinfo or {}
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
@ -1018,7 +1018,7 @@ class TmdbApi:
|
||||
if not self.season:
|
||||
return {}
|
||||
try:
|
||||
logger.info("正在查询TMDB电视剧:%s,季:%s ..." % (tmdbid, season))
|
||||
logger.debug("正在查询TMDB电视剧:%s,季:%s ..." % (tmdbid, season))
|
||||
tmdbinfo = self.season.details(tv_id=tmdbid, season_num=season)
|
||||
return tmdbinfo or {}
|
||||
except Exception as e:
|
||||
@ -1035,7 +1035,7 @@ class TmdbApi:
|
||||
if not self.episode:
|
||||
return {}
|
||||
try:
|
||||
logger.info("正在查询TMDB集详情:%s,季:%s,集:%s ..." % (tmdbid, season, episode))
|
||||
logger.debug("正在查询TMDB集详情:%s,季:%s,集:%s ..." % (tmdbid, season, episode))
|
||||
tmdbinfo = self.episode.details(tv_id=tmdbid, season_num=season, episode_num=episode)
|
||||
return tmdbinfo or {}
|
||||
except Exception as e:
|
||||
@ -1051,7 +1051,7 @@ class TmdbApi:
|
||||
if not self.discover:
|
||||
return []
|
||||
try:
|
||||
logger.info(f"正在发现电影:{kwargs}...")
|
||||
logger.debug(f"正在发现电影:{kwargs}...")
|
||||
tmdbinfo = self.discover.discover_movies(kwargs)
|
||||
if tmdbinfo:
|
||||
for info in tmdbinfo:
|
||||
@ -1070,7 +1070,7 @@ class TmdbApi:
|
||||
if not self.discover:
|
||||
return []
|
||||
try:
|
||||
logger.info(f"正在发现电视剧:{kwargs}...")
|
||||
logger.debug(f"正在发现电视剧:{kwargs}...")
|
||||
tmdbinfo = self.discover.discover_tv_shows(kwargs)
|
||||
if tmdbinfo:
|
||||
for info in tmdbinfo:
|
||||
@ -1087,7 +1087,7 @@ class TmdbApi:
|
||||
if not self.movie:
|
||||
return {}
|
||||
try:
|
||||
logger.info(f"正在获取电影图片:{tmdbid}...")
|
||||
logger.debug(f"正在获取电影图片:{tmdbid}...")
|
||||
return self.movie.images(movie_id=tmdbid) or {}
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
@ -1100,7 +1100,7 @@ class TmdbApi:
|
||||
if not self.tv:
|
||||
return {}
|
||||
try:
|
||||
logger.info(f"正在获取电视剧图片:{tmdbid}...")
|
||||
logger.debug(f"正在获取电视剧图片:{tmdbid}...")
|
||||
return self.tv.images(tv_id=tmdbid) or {}
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
@ -1113,7 +1113,7 @@ class TmdbApi:
|
||||
if not self.movie:
|
||||
return []
|
||||
try:
|
||||
logger.info(f"正在获取相似电影:{tmdbid}...")
|
||||
logger.debug(f"正在获取相似电影:{tmdbid}...")
|
||||
return self.movie.similar(movie_id=tmdbid) or []
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
@ -1126,7 +1126,7 @@ class TmdbApi:
|
||||
if not self.tv:
|
||||
return []
|
||||
try:
|
||||
logger.info(f"正在获取相似电视剧:{tmdbid}...")
|
||||
logger.debug(f"正在获取相似电视剧:{tmdbid}...")
|
||||
return self.tv.similar(tv_id=tmdbid) or []
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
@ -1139,7 +1139,7 @@ class TmdbApi:
|
||||
if not self.movie:
|
||||
return []
|
||||
try:
|
||||
logger.info(f"正在获取推荐电影:{tmdbid}...")
|
||||
logger.debug(f"正在获取推荐电影:{tmdbid}...")
|
||||
return self.movie.recommendations(movie_id=tmdbid) or []
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
@ -1152,7 +1152,7 @@ class TmdbApi:
|
||||
if not self.tv:
|
||||
return []
|
||||
try:
|
||||
logger.info(f"正在获取推荐电视剧:{tmdbid}...")
|
||||
logger.debug(f"正在获取推荐电视剧:{tmdbid}...")
|
||||
return self.tv.recommendations(tv_id=tmdbid) or []
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
@ -1165,7 +1165,7 @@ class TmdbApi:
|
||||
if not self.movie:
|
||||
return []
|
||||
try:
|
||||
logger.info(f"正在获取电影演职人员:{tmdbid}...")
|
||||
logger.debug(f"正在获取电影演职人员:{tmdbid}...")
|
||||
info = self.movie.credits(movie_id=tmdbid) or {}
|
||||
cast = info.get('cast') or []
|
||||
if cast:
|
||||
@ -1182,7 +1182,7 @@ class TmdbApi:
|
||||
if not self.tv:
|
||||
return []
|
||||
try:
|
||||
logger.info(f"正在获取电视剧演职人员:{tmdbid}...")
|
||||
logger.debug(f"正在获取电视剧演职人员:{tmdbid}...")
|
||||
info = self.tv.credits(tv_id=tmdbid) or {}
|
||||
cast = info.get('cast') or []
|
||||
if cast:
|
||||
@ -1219,7 +1219,7 @@ class TmdbApi:
|
||||
if not self.person:
|
||||
return {}
|
||||
try:
|
||||
logger.info(f"正在获取人物详情:{person_id}...")
|
||||
logger.debug(f"正在获取人物详情:{person_id}...")
|
||||
return self.person.details(person_id=person_id) or {}
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
@ -1232,7 +1232,7 @@ class TmdbApi:
|
||||
if not self.person:
|
||||
return []
|
||||
try:
|
||||
logger.info(f"正在获取人物参演作品:{person_id}...")
|
||||
logger.debug(f"正在获取人物参演作品:{person_id}...")
|
||||
movies = self.person.movie_credits(person_id=person_id) or {}
|
||||
tvs = self.person.tv_credits(person_id=person_id) or {}
|
||||
cast = (movies.get('cast') or []) + (tvs.get('cast') or [])
|
||||
@ -1262,7 +1262,7 @@ class TmdbApi:
|
||||
return {}
|
||||
episode_years = {}
|
||||
for episode_group in episode_groups:
|
||||
logger.info(f"正在获取剧集组年份:{episode_group.get('id')}...")
|
||||
logger.debug(f"正在获取剧集组年份:{episode_group.get('id')}...")
|
||||
if episode_group.get('type') != 6:
|
||||
# 只处理剧集部分
|
||||
continue
|
||||
|
Reference in New Issue
Block a user