fix 补充下载历史
This commit is contained in:
parent
3676ea3f61
commit
300d6c2da0
@ -296,6 +296,7 @@ class NAStoolSync(_PluginBase):
|
|||||||
if str(torrent.get("name")) == str(torrent_name) \
|
if str(torrent.get("name")) == str(torrent_name) \
|
||||||
or str(torrent.get("name")) == str(torrent_name2):
|
or str(torrent.get("name")) == str(torrent_name2):
|
||||||
mdownload_hash = torrent.get("hash")
|
mdownload_hash = torrent.get("hash")
|
||||||
|
torrent_name = str(torrent.get("name"))
|
||||||
break
|
break
|
||||||
|
|
||||||
# 处理辅种器
|
# 处理辅种器
|
||||||
@ -304,6 +305,7 @@ class NAStoolSync(_PluginBase):
|
|||||||
if str(torrent.get("name")) == str(torrent_name) \
|
if str(torrent.get("name")) == str(torrent_name) \
|
||||||
or str(torrent.get("name")) == str(torrent_name2):
|
or str(torrent.get("name")) == str(torrent_name2):
|
||||||
mdownload_hash = torrent.get("hashString")
|
mdownload_hash = torrent.get("hashString")
|
||||||
|
torrent_name = str(torrent.get("name"))
|
||||||
break
|
break
|
||||||
|
|
||||||
# 继续补充 遍历所有种子,按照添加升序升序,第一个种子是初始种子
|
# 继续补充 遍历所有种子,按照添加升序升序,第一个种子是初始种子
|
||||||
@ -320,6 +322,7 @@ class NAStoolSync(_PluginBase):
|
|||||||
mate_torrents = sorted(mate_torrents, key=lambda x: x.added_date)
|
mate_torrents = sorted(mate_torrents, key=lambda x: x.added_date)
|
||||||
# 最早添加的hash是下载的hash
|
# 最早添加的hash是下载的hash
|
||||||
mdownload_hash = mate_torrents[0].get("hashString")
|
mdownload_hash = mate_torrents[0].get("hashString")
|
||||||
|
torrent_name = str(mate_torrents[0].get("name"))
|
||||||
# 补充转种记录
|
# 补充转种记录
|
||||||
self._plugindata.save(plugin_id="TorrentTransfer",
|
self._plugindata.save(plugin_id="TorrentTransfer",
|
||||||
key=f"qbittorrent-{mdownload_hash}",
|
key=f"qbittorrent-{mdownload_hash}",
|
||||||
@ -337,6 +340,22 @@ class NAStoolSync(_PluginBase):
|
|||||||
mate_torrents[1:]]}]
|
mate_torrents[1:]]}]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# 补充下载历史
|
||||||
|
self._downloadhistory.add(
|
||||||
|
path=msrc_filename,
|
||||||
|
type=mtype,
|
||||||
|
title=mtitle,
|
||||||
|
year=myear,
|
||||||
|
tmdbid=mtmdbid,
|
||||||
|
seasons=mseasons,
|
||||||
|
episodes=mepisodes,
|
||||||
|
image=mimage,
|
||||||
|
download_hash=mdownload_hash,
|
||||||
|
torrent_name=torrent_name,
|
||||||
|
torrent_description="",
|
||||||
|
torrent_site=""
|
||||||
|
)
|
||||||
|
|
||||||
# 处理路径映射
|
# 处理路径映射
|
||||||
if self._path:
|
if self._path:
|
||||||
paths = self._path.split("\n")
|
paths = self._path.split("\n")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user