mirror of
https://github.com/leiurayer/downkyi.git
synced 2024-04-21 12:41:55 +00:00
修复下载内容设置偶尔不生效的问题
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加到下载列表
|
||||
/// </summary>
|
||||
/// <param name="eventAggregator">传递事件的对象</param>
|
||||
/// <param name="directory">下载路径</param>
|
||||
/// <param name="isAll">是否下载所有,包括未选中项</param>
|
||||
/// <returns>添加的数量</returns>
|
||||
public int AddToDownload(IEventAggregator eventAggregator, string directory, bool isAll = false)
|
||||
{
|
||||
if (directory == null || directory == string.Empty) { return -1; }
|
||||
|
||||
@@ -671,10 +671,10 @@ namespace DownKyi.ViewModels
|
||||
videoInfoService.GetVideoStream(videoPage);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加到下载列表事件
|
||||
/// </summary>
|
||||
/// <param name="isAll">是否下载所有,包括未选中项</param>
|
||||
private async void AddToDownload(bool isAll)
|
||||
{
|
||||
AddToDownloadService addToDownloadService = null;
|
||||
|
||||
Reference in New Issue
Block a user