fix transfer
This commit is contained in:
@ -26,7 +26,7 @@ class TransferChain(ChainBase):
|
|||||||
"""
|
"""
|
||||||
从字符串中提取种子hash和编号
|
从字符串中提取种子hash和编号
|
||||||
"""
|
"""
|
||||||
pattern = r'([a-fA-F0-9]{32}) (\d+)'
|
pattern = r'([a-fA-F0-9]+) (\d+)'
|
||||||
match = re.search(pattern, string)
|
match = re.search(pattern, string)
|
||||||
if match:
|
if match:
|
||||||
hash_value = match.group(1)
|
hash_value = match.group(1)
|
||||||
@ -72,7 +72,7 @@ class TransferChain(ChainBase):
|
|||||||
if not mediainfo:
|
if not mediainfo:
|
||||||
logger.warn(f'未识别到媒体信息,标题:{torrent.get("title")}')
|
logger.warn(f'未识别到媒体信息,标题:{torrent.get("title")}')
|
||||||
self.post_message(title=f"{torrent.get('title')} 未识别到媒体信息,无法入库!\n"
|
self.post_message(title=f"{torrent.get('title')} 未识别到媒体信息,无法入库!\n"
|
||||||
f"回复:/transfer {torrent.get('hash')} [tmdbid] 手动识别转移。")
|
f"回复:```/transfer {torrent.get('hash')} [tmdbid]``` 手动识别转移。")
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
mediainfo = arg_mediainfo
|
mediainfo = arg_mediainfo
|
||||||
|
@ -101,7 +101,7 @@ class QbittorrentModule(_ModuleBase):
|
|||||||
ret_torrents = []
|
ret_torrents = []
|
||||||
if hashs:
|
if hashs:
|
||||||
# 按Hash获取
|
# 按Hash获取
|
||||||
torrents, _ = self.qbittorrent.get_torrents(ids=hashs)
|
torrents, _ = self.qbittorrent.get_torrents(ids=hashs, tags=settings.TORRENT_TAG)
|
||||||
for torrent in torrents:
|
for torrent in torrents:
|
||||||
content_path = torrent.get("content_path")
|
content_path = torrent.get("content_path")
|
||||||
if content_path:
|
if content_path:
|
||||||
|
@ -89,7 +89,7 @@ class TransmissionModule(_ModuleBase):
|
|||||||
ret_torrents = []
|
ret_torrents = []
|
||||||
if hashs:
|
if hashs:
|
||||||
# 按Hash获取
|
# 按Hash获取
|
||||||
torrents, _ = self.transmission.get_torrents(ids=hashs)
|
torrents, _ = self.transmission.get_torrents(ids=hashs, tags=settings.TORRENT_TAG)
|
||||||
for torrent in torrents:
|
for torrent in torrents:
|
||||||
ret_torrents.append({
|
ret_torrents.append({
|
||||||
'title': torrent.name,
|
'title': torrent.name,
|
||||||
|
Reference in New Issue
Block a user