mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
Support remote file uri when adding downloads
This commit is contained in:
@@ -162,7 +162,7 @@ class DownloadChain(ChainBase):
|
||||
:param channel: 通知渠道
|
||||
:param source: 来源(消息通知、Subscribe、Manual等)
|
||||
:param downloader: 下载器
|
||||
:param save_path: 保存路径
|
||||
:param save_path: 保存路径, 支持<storage>:<path>, 如rclone:/MP, smb:/server/share/Movies等
|
||||
:param userid: 用户ID
|
||||
:param username: 调用下载的用户名/插件名
|
||||
:param label: 自定义标签
|
||||
@@ -235,11 +235,10 @@ class DownloadChain(ChainBase):
|
||||
storage = 'local'
|
||||
# 下载目录
|
||||
if save_path:
|
||||
uri = schemas.FileURI.from_uri(save_path)
|
||||
# 下载目录使用自定义的
|
||||
download_dir = Path(save_path)
|
||||
# Check if the download_dir matches any configured dirs
|
||||
dir_info = DirectoryHelper().get_dir(dest_path=download_dir)
|
||||
storage = dir_info.storage if dir_info else storage
|
||||
download_dir = Path(uri.path)
|
||||
storage = uri.storage
|
||||
else:
|
||||
# 根据媒体信息查询下载目录配置
|
||||
dir_info = DirectoryHelper().get_dir(_media, include_unsorted=True)
|
||||
@@ -405,7 +404,7 @@ class DownloadChain(ChainBase):
|
||||
根据缺失数据,自动种子列表中组合择优下载
|
||||
:param contexts: 资源上下文列表
|
||||
:param no_exists: 缺失的剧集信息
|
||||
:param save_path: 保存路径
|
||||
:param save_path: 保存路径, 支持<storage>:<path>, 如rclone:/MP, smb:/server/share/Movies等
|
||||
:param channel: 通知渠道
|
||||
:param source: 来源(消息通知、订阅、手工下载等)
|
||||
:param userid: 用户ID
|
||||
|
||||
Reference in New Issue
Block a user