From ec8b03166f95f9f490ebed43059ce57775096ca1 Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Sun, 3 Apr 2022 21:13:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8B=E8=BD=BD=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E8=AE=BE=E7=BD=AE=E5=81=B6=E5=B0=94=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Download/AddToDownloadService.cs | 16 ++++++++++++++++ DownKyi/ViewModels/ViewVideoDetailViewModel.cs | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/DownKyi/Services/Download/AddToDownloadService.cs b/DownKyi/Services/Download/AddToDownloadService.cs index 242bcea..605ec55 100644 --- a/DownKyi/Services/Download/AddToDownloadService.cs +++ b/DownKyi/Services/Download/AddToDownloadService.cs @@ -4,6 +4,7 @@ using DownKyi.Core.BiliApi.Zone; using DownKyi.Core.FileName; using DownKyi.Core.Logging; using DownKyi.Core.Settings; +using DownKyi.Core.Settings.Models; using DownKyi.Core.Utils; using DownKyi.Events; using DownKyi.Models; @@ -160,6 +161,14 @@ namespace DownKyi.Services.Download // 是否使用默认下载目录 if (SettingsManager.GetInstance().IsUseSaveVideoRootPath() == AllowStatus.YES) { + // 下载内容 + VideoContentSettings videoContent = SettingsManager.GetInstance().GetVideoContent(); + downloadAudio = videoContent.DownloadAudio; + downloadVideo = videoContent.DownloadVideo; + downloadDanmaku = videoContent.DownloadDanmaku; + downloadSubtitle = videoContent.DownloadSubtitle; + downloadCover = videoContent.DownloadCover; + directory = SettingsManager.GetInstance().GetSaveVideoRootPath(); } else @@ -196,6 +205,13 @@ namespace DownKyi.Services.Download return directory; } + /// + /// 添加到下载列表 + /// + /// 传递事件的对象 + /// 下载路径 + /// 是否下载所有,包括未选中项 + /// 添加的数量 public int AddToDownload(IEventAggregator eventAggregator, string directory, bool isAll = false) { if (directory == null || directory == string.Empty) { return -1; } diff --git a/DownKyi/ViewModels/ViewVideoDetailViewModel.cs b/DownKyi/ViewModels/ViewVideoDetailViewModel.cs index f544be0..d85dd91 100644 --- a/DownKyi/ViewModels/ViewVideoDetailViewModel.cs +++ b/DownKyi/ViewModels/ViewVideoDetailViewModel.cs @@ -671,10 +671,10 @@ namespace DownKyi.ViewModels videoInfoService.GetVideoStream(videoPage); } - /// /// 添加到下载列表事件 /// + /// 是否下载所有,包括未选中项 private async void AddToDownload(bool isAll) { AddToDownloadService addToDownloadService = null;