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