fix #1858
This commit is contained in:
parent
4e22293cda
commit
9a7cdc1e74
@ -278,8 +278,10 @@ class TransferChain(ChainBase):
|
||||
|
||||
# 获取集数据
|
||||
if file_mediainfo.type == MediaType.TV:
|
||||
episodes_info = self.tmdbchain.tmdb_episodes(tmdbid=file_mediainfo.tmdb_id,
|
||||
season=file_meta.begin_season or 1)
|
||||
episodes_info = self.tmdbchain.tmdb_episodes(
|
||||
tmdbid=file_mediainfo.tmdb_id,
|
||||
season=1 if file_meta.begin_season is None else file_meta.begin_season
|
||||
)
|
||||
else:
|
||||
episodes_info = None
|
||||
|
||||
|
@ -425,15 +425,15 @@ class TheMovieDbModule(_ModuleBase):
|
||||
# 图片相对路径
|
||||
image_path = None
|
||||
image_prefix = image_prefix or "w500"
|
||||
if not season and not episode:
|
||||
if season is None and not episode:
|
||||
tmdbinfo = self.tmdb.get_info(mtype=mtype, tmdbid=int(mediaid))
|
||||
if tmdbinfo:
|
||||
image_path = tmdbinfo.get(image_type.value)
|
||||
elif season and episode:
|
||||
elif season is not None and episode:
|
||||
episodeinfo = self.tmdb.get_tv_episode_detail(tmdbid=int(mediaid), season=season, episode=episode)
|
||||
if episodeinfo:
|
||||
image_path = episodeinfo.get("still_path")
|
||||
elif season:
|
||||
elif season is not None:
|
||||
seasoninfo = self.tmdb.get_tv_season_detail(tmdbid=int(mediaid), season=season)
|
||||
if seasoninfo:
|
||||
image_path = seasoninfo.get(image_type.value)
|
||||
|
@ -1027,7 +1027,7 @@ class TmdbApi:
|
||||
if not self.episode:
|
||||
return {}
|
||||
try:
|
||||
logger.info("正在查询TMDB集图片:%s,季:%s,集:%s ..." % (tmdbid, season, episode))
|
||||
logger.info("正在查询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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user