fix torrent_files
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
from msilib.schema import File
|
||||
from pathlib import Path
|
||||
from typing import Set, Tuple, Optional, Union, List
|
||||
|
||||
@ -187,6 +188,12 @@ class QbittorrentModule(_ModuleBase):
|
||||
"""
|
||||
return self.qbittorrent.start_torrents(ids=hashs)
|
||||
|
||||
def torrent_files(self, tid: str) -> Optional[List[File]]:
|
||||
"""
|
||||
获取种子文件列表
|
||||
"""
|
||||
return self.qbittorrent.get_files(tid=tid)
|
||||
|
||||
def downloader_info(self) -> schemas.DownloaderInfo:
|
||||
"""
|
||||
下载器信息
|
||||
|
@ -1,8 +1,9 @@
|
||||
import time
|
||||
from msilib.schema import File
|
||||
from typing import Optional, Union, Tuple, List
|
||||
|
||||
import qbittorrentapi
|
||||
from qbittorrentapi import TorrentFilesList, TorrentDictionary
|
||||
from qbittorrentapi import TorrentDictionary
|
||||
from qbittorrentapi.client import Client
|
||||
from qbittorrentapi.transfer import TransferInfoDictionary
|
||||
|
||||
@ -265,7 +266,7 @@ class Qbittorrent(metaclass=Singleton):
|
||||
logger.error(f"删除种子出错:{err}")
|
||||
return False
|
||||
|
||||
def torrent_files(self, tid: str) -> Optional[TorrentFilesList]:
|
||||
def get_files(self, tid: str) -> Optional[List[File]]:
|
||||
"""
|
||||
获取种子文件清单
|
||||
"""
|
||||
|
Reference in New Issue
Block a user