mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-08 17:08:35 +08:00
Merge pull request #5450 from CHANTXU64/v2
This commit is contained in:
@@ -798,7 +798,7 @@ class TheMovieDbModule(_ModuleBase):
|
|||||||
if not tmdb_info:
|
if not tmdb_info:
|
||||||
return []
|
return []
|
||||||
return [schemas.TmdbSeason(**sea)
|
return [schemas.TmdbSeason(**sea)
|
||||||
for sea in tmdb_info.get("seasons", []) if sea.get("season_number")]
|
for sea in tmdb_info.get("seasons", []) if sea.get("season_number") is not None]
|
||||||
|
|
||||||
def tmdb_group_seasons(self, group_id: str) -> List[schemas.TmdbSeason]:
|
def tmdb_group_seasons(self, group_id: str) -> List[schemas.TmdbSeason]:
|
||||||
"""
|
"""
|
||||||
@@ -1168,7 +1168,7 @@ class TheMovieDbModule(_ModuleBase):
|
|||||||
if not tmdb_info:
|
if not tmdb_info:
|
||||||
return []
|
return []
|
||||||
return [schemas.TmdbSeason(**sea)
|
return [schemas.TmdbSeason(**sea)
|
||||||
for sea in tmdb_info.get("seasons", []) if sea.get("season_number")]
|
for sea in tmdb_info.get("seasons", []) if sea.get("season_number") is not None]
|
||||||
|
|
||||||
async def async_tmdb_group_seasons(self, group_id: str) -> List[schemas.TmdbSeason]:
|
async def async_tmdb_group_seasons(self, group_id: str) -> List[schemas.TmdbSeason]:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ class TmdbApi:
|
|||||||
"""
|
"""
|
||||||
记录匹配调试日志
|
记录匹配调试日志
|
||||||
"""
|
"""
|
||||||
if season_number and season_year:
|
if season_number is not None and season_year:
|
||||||
logger.debug(f"正在识别{mtype.value}:{name}, 季集={season_number}, 季集年份={season_year} ...")
|
logger.debug(f"正在识别{mtype.value}:{name}, 季集={season_number}, 季集年份={season_year} ...")
|
||||||
else:
|
else:
|
||||||
logger.debug(f"正在识别{mtype.value}:{name}, 年份={year} ...")
|
logger.debug(f"正在识别{mtype.value}:{name}, 年份={year} ...")
|
||||||
@@ -473,7 +473,7 @@ class TmdbApi:
|
|||||||
info = self._set_media_type(info, MediaType.MOVIE)
|
info = self._set_media_type(info, MediaType.MOVIE)
|
||||||
else:
|
else:
|
||||||
# 有当前季和当前季集年份,使用精确匹配
|
# 有当前季和当前季集年份,使用精确匹配
|
||||||
if season_year and season_number:
|
if season_year and season_number is not None:
|
||||||
self._log_match_debug(mtype, name, season_year, season_number, season_year)
|
self._log_match_debug(mtype, name, season_year, season_number, season_year)
|
||||||
info = self.__search_tv_by_season(name,
|
info = self.__search_tv_by_season(name,
|
||||||
season_year,
|
season_year,
|
||||||
@@ -697,7 +697,7 @@ class TmdbApi:
|
|||||||
return {}
|
return {}
|
||||||
ret_seasons = {}
|
ret_seasons = {}
|
||||||
for season_info in tv_info.get("seasons") or []:
|
for season_info in tv_info.get("seasons") or []:
|
||||||
if not season_info.get("season_number"):
|
if season_info.get("season_number") is None:
|
||||||
continue
|
continue
|
||||||
ret_seasons[season_info.get("season_number")] = season_info
|
ret_seasons[season_info.get("season_number")] = season_info
|
||||||
return ret_seasons
|
return ret_seasons
|
||||||
@@ -2028,7 +2028,7 @@ class TmdbApi:
|
|||||||
info = self._set_media_type(info, MediaType.MOVIE)
|
info = self._set_media_type(info, MediaType.MOVIE)
|
||||||
else:
|
else:
|
||||||
# 有当前季和当前季集年份,使用精确匹配
|
# 有当前季和当前季集年份,使用精确匹配
|
||||||
if season_year and season_number:
|
if season_year and season_number is not None:
|
||||||
self._log_match_debug(mtype, name, season_year, season_number, season_year)
|
self._log_match_debug(mtype, name, season_year, season_number, season_year)
|
||||||
info = await self.__async_search_tv_by_season(name,
|
info = await self.__async_search_tv_by_season(name,
|
||||||
season_year,
|
season_year,
|
||||||
|
|||||||
Reference in New Issue
Block a user