This commit is contained in:
jxxghp
2023-08-13 08:42:36 +08:00
parent 51b30e8e63
commit 9c0c7e8497
7 changed files with 149 additions and 153 deletions

View File

@ -2,11 +2,12 @@ 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
from qbittorrentapi import TorrentFilesList
from ruamel.yaml import CommentedMap
from transmission_rpc import File
from app.core.config import settings
from app.core.context import Context
@ -308,7 +309,7 @@ class ChainBase(metaclass=ABCMeta):
"""
return self.run_module("stop_torrents", hashs=hashs)
def torrent_files(self, tid: str) -> Optional[List[File]]:
def torrent_files(self, tid: str) -> Optional[Union[TorrentFilesList, List[File]]]:
"""
根据种子文件,选择并添加下载任务
:param tid: 种子Hash