mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix cython type error
This commit is contained in:
@@ -78,8 +78,8 @@ class QbittorrentModule(_ModuleBase, _DownloaderBase[Qbittorrent]):
|
||||
server.reconnect()
|
||||
|
||||
def download(self, content: Union[Path, str], download_dir: Path, cookie: str,
|
||||
episodes: Set[int] = None, category: str = None, label: str = None,
|
||||
downloader: str = None) -> Optional[Tuple[Optional[str], Optional[str], Optional[str], str]]:
|
||||
episodes: Set[int] = None, category: Optional[str] = None, label: Optional[str] = None,
|
||||
downloader: Optional[str] = None) -> Optional[Tuple[Optional[str], Optional[str], Optional[str], str]]:
|
||||
"""
|
||||
根据种子文件,选择并添加下载任务
|
||||
:param content: 种子文件地址或者磁力链接
|
||||
@@ -208,7 +208,7 @@ class QbittorrentModule(_ModuleBase, _DownloaderBase[Qbittorrent]):
|
||||
|
||||
def list_torrents(self, status: TorrentStatus = None,
|
||||
hashs: Union[list, str] = None,
|
||||
downloader: str = None
|
||||
downloader: Optional[str] = None
|
||||
) -> Optional[List[Union[TransferTorrent, DownloadingTorrent]]]:
|
||||
"""
|
||||
获取下载器种子列表
|
||||
@@ -293,7 +293,7 @@ class QbittorrentModule(_ModuleBase, _DownloaderBase[Qbittorrent]):
|
||||
return None
|
||||
return ret_torrents
|
||||
|
||||
def transfer_completed(self, hashs: str, downloader: str = None) -> None:
|
||||
def transfer_completed(self, hashs: str, downloader: Optional[str] = None) -> None:
|
||||
"""
|
||||
转移完成后的处理
|
||||
:param hashs: 种子Hash
|
||||
@@ -304,8 +304,8 @@ class QbittorrentModule(_ModuleBase, _DownloaderBase[Qbittorrent]):
|
||||
return None
|
||||
server.set_torrents_tag(ids=hashs, tags=['已整理'])
|
||||
|
||||
def remove_torrents(self, hashs: Union[str, list], delete_file: bool = True,
|
||||
downloader: str = None) -> Optional[bool]:
|
||||
def remove_torrents(self, hashs: Union[str, list], delete_file: Optional[bool] = True,
|
||||
downloader: Optional[str] = None) -> Optional[bool]:
|
||||
"""
|
||||
删除下载器种子
|
||||
:param hashs: 种子Hash
|
||||
@@ -319,7 +319,7 @@ class QbittorrentModule(_ModuleBase, _DownloaderBase[Qbittorrent]):
|
||||
return server.delete_torrents(delete_file=delete_file, ids=hashs)
|
||||
|
||||
def start_torrents(self, hashs: Union[list, str],
|
||||
downloader: str = None) -> Optional[bool]:
|
||||
downloader: Optional[str] = None) -> Optional[bool]:
|
||||
"""
|
||||
开始下载
|
||||
:param hashs: 种子Hash
|
||||
@@ -331,7 +331,7 @@ class QbittorrentModule(_ModuleBase, _DownloaderBase[Qbittorrent]):
|
||||
return None
|
||||
return server.start_torrents(ids=hashs)
|
||||
|
||||
def stop_torrents(self, hashs: Union[list, str], downloader: str = None) -> Optional[bool]:
|
||||
def stop_torrents(self, hashs: Union[list, str], downloader: Optional[str] = None) -> Optional[bool]:
|
||||
"""
|
||||
停止下载
|
||||
:param hashs: 种子Hash
|
||||
@@ -343,7 +343,7 @@ class QbittorrentModule(_ModuleBase, _DownloaderBase[Qbittorrent]):
|
||||
return None
|
||||
return server.stop_torrents(ids=hashs)
|
||||
|
||||
def torrent_files(self, tid: str, downloader: str = None) -> Optional[TorrentFilesList]:
|
||||
def torrent_files(self, tid: str, downloader: Optional[str] = None) -> Optional[TorrentFilesList]:
|
||||
"""
|
||||
获取种子文件列表
|
||||
"""
|
||||
@@ -352,7 +352,7 @@ class QbittorrentModule(_ModuleBase, _DownloaderBase[Qbittorrent]):
|
||||
return None
|
||||
return server.get_files(tid=tid)
|
||||
|
||||
def downloader_info(self, downloader: str = None) -> Optional[List[schemas.DownloaderInfo]]:
|
||||
def downloader_info(self, downloader: Optional[str] = None) -> Optional[List[schemas.DownloaderInfo]]:
|
||||
"""
|
||||
下载器信息
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user