fix:订阅重复下载问题

This commit is contained in:
jxxghp
2024-01-09 13:16:39 +08:00
parent d9b349873e
commit c3ba83c7ca

View File

@ -357,12 +357,13 @@ class DownloadChain(ChainBase):
need = list(set(_need).difference(set(_current))) need = list(set(_need).difference(set(_current)))
# 清除已下载的季信息 # 清除已下载的季信息
seas = copy.deepcopy(no_exists.get(_mid)) seas = copy.deepcopy(no_exists.get(_mid))
for _sea in list(seas): if seas:
if _sea not in need: for _sea in list(seas):
no_exists[_mid].pop(_sea) if _sea not in need:
if not no_exists.get(_mid) and no_exists.get(_mid) is not None: no_exists[_mid].pop(_sea)
no_exists.pop(_mid) if not no_exists.get(_mid) and no_exists.get(_mid) is not None:
break no_exists.pop(_mid)
break
return need return need
def __update_episodes(_mid: Union[int, str], _sea: int, _need: list, _current: set) -> list: def __update_episodes(_mid: Union[int, str], _sea: int, _need: list, _current: set) -> list:
@ -490,6 +491,9 @@ class DownloadChain(ChainBase):
need_season = __update_seasons(_mid=need_mid, need_season = __update_seasons(_mid=need_mid,
_need=need_season, _need=need_season,
_current=torrent_season) _current=torrent_season)
if not need_season:
# 全部下载完成
break
# 电视剧季内的集匹配 # 电视剧季内的集匹配
if no_exists: if no_exists:
# TMDBID列表 # TMDBID列表