fix transfer

This commit is contained in:
jxxghp 2023-06-11 15:31:36 +08:00
parent 90fe9f6c82
commit 3ea455d6e0
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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:

View File

@ -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,