fix: support non-local filesystem operations for default dir and subtitles

This commit is contained in:
stkevintan
2025-11-28 14:55:01 +08:00
parent 10c26de7cb
commit e51b679380
4 changed files with 58 additions and 23 deletions
+4 -2
View File
@@ -707,17 +707,19 @@ class ChainBase(metaclass=ABCMeta):
cookie=cookie, episodes=episodes, category=category, label=label,
downloader=downloader)
def download_added(self, context: Context, download_dir: Path, torrent_content: Union[str, bytes] = None) -> None:
def download_added(self, context: Context, download_dir: Path, storage: str, torrent_content: Union[str, bytes] = None) -> None:
"""
添加下载任务成功后,从站点下载字幕,保存到下载目录
:param context: 上下文,包括识别信息、媒体信息、种子信息
:param download_dir: 下载目录
:param storage: 存储类型
:param torrent_content: 种子内容,如果有则直接使用该内容,否则从context中获取种子文件路径
:return: None,该方法可被多个模块同时处理
"""
return self.run_module("download_added", context=context,
torrent_content=torrent_content,
download_dir=download_dir)
download_dir=download_dir,
storage=storage)
def list_torrents(self, status: TorrentStatus = None,
hashs: Union[list, str] = None,