fix bug
This commit is contained in:
parent
ec9d07d343
commit
b18d6cabd9
@ -308,18 +308,16 @@ class SubscribeChain(ChainBase):
|
||||
if no_exists \
|
||||
and no_exists.get(tmdb_id) \
|
||||
and (total_episode or start_episode):
|
||||
index = 0
|
||||
for no_exist in no_exists.get(tmdb_id):
|
||||
# 替换原季值
|
||||
if no_exist.season == begin_season:
|
||||
no_exist_season = no_exists.get(tmdb_id).get(begin_season)
|
||||
if no_exist_season:
|
||||
# 原季集列表
|
||||
episode_list = no_exist.episodes
|
||||
episode_list = no_exist_season.episodes
|
||||
# 原总集数
|
||||
total = no_exist.total_episodes
|
||||
total = no_exist_season.total_episodes
|
||||
if total_episode and start_episode:
|
||||
# 有开始集和总集数
|
||||
episodes = list(range(start_episode, total_episode + 1))
|
||||
no_exists[tmdb_id][index] = NotExistMediaInfo(
|
||||
no_exists[tmdb_id][begin_season] = NotExistMediaInfo(
|
||||
season=begin_season,
|
||||
episodes=episodes,
|
||||
total_episodes=total_episode,
|
||||
@ -328,7 +326,7 @@ class SubscribeChain(ChainBase):
|
||||
elif not start_episode:
|
||||
# 有总集数没有开始集
|
||||
episodes = list(range(min(episode_list or [1]), total_episode + 1))
|
||||
no_exists[tmdb_id][index] = NotExistMediaInfo(
|
||||
no_exists[tmdb_id][begin_season] = NotExistMediaInfo(
|
||||
season=begin_season,
|
||||
episodes=episodes,
|
||||
total_episodes=total_episode,
|
||||
@ -337,11 +335,10 @@ class SubscribeChain(ChainBase):
|
||||
elif not total_episode:
|
||||
# 有开始集没有总集数
|
||||
episodes = list(range(start_episode, max(episode_list or [total]) + 1))
|
||||
no_exists[tmdb_id][index] = NotExistMediaInfo(
|
||||
no_exists[tmdb_id][begin_season] = NotExistMediaInfo(
|
||||
season=begin_season,
|
||||
episodes=episodes,
|
||||
total_episodes=max(episode_list or [total]),
|
||||
start_episode=start_episode
|
||||
)
|
||||
index += 1
|
||||
return no_exists
|
||||
|
Loading…
x
Reference in New Issue
Block a user