fix torrent_files
This commit is contained in:
@ -2,6 +2,7 @@ import gc
|
||||
import pickle
|
||||
import traceback
|
||||
from abc import ABCMeta
|
||||
from msilib.schema import File
|
||||
from pathlib import Path
|
||||
from typing import Optional, Any, Tuple, List, Set, Union, Dict
|
||||
|
||||
@ -307,7 +308,7 @@ class ChainBase(metaclass=ABCMeta):
|
||||
"""
|
||||
return self.run_module("stop_torrents", hashs=hashs)
|
||||
|
||||
def torrent_files(self, tid: str) -> Optional[Tuple[Optional[str], str]]:
|
||||
def torrent_files(self, tid: str) -> Optional[List[File]]:
|
||||
"""
|
||||
根据种子文件,选择并添加下载任务
|
||||
:param tid: 种子Hash
|
||||
|
@ -1,9 +1,8 @@
|
||||
import re
|
||||
from msilib.schema import File
|
||||
from pathlib import Path
|
||||
from typing import List, Optional, Tuple, Set, Dict, Union
|
||||
|
||||
from qbittorrentapi import TorrentFilesList
|
||||
|
||||
from app.chain import ChainBase
|
||||
from app.core.config import settings
|
||||
from app.core.context import MediaInfo, TorrentInfo, Context
|
||||
@ -626,7 +625,7 @@ class DownloadChain(ChainBase):
|
||||
"""
|
||||
return self.remove_torrents(hashs=[hash_str])
|
||||
|
||||
def get_files(self, tid: str) -> Optional[TorrentFilesList]:
|
||||
def get_files(self, tid: str) -> Optional[List[File]]:
|
||||
"""
|
||||
获取种子文件清单
|
||||
"""
|
||||
|
Reference in New Issue
Block a user