|
|
@ -22,78 +22,78 @@ namespace DownKyi.ViewModels.Settings
|
|
|
|
private List<string> videoCodecs;
|
|
|
|
private List<string> videoCodecs;
|
|
|
|
public List<string> VideoCodecs
|
|
|
|
public List<string> VideoCodecs
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return videoCodecs; }
|
|
|
|
get => videoCodecs;
|
|
|
|
set { SetProperty(ref videoCodecs, value); }
|
|
|
|
set => SetProperty(ref videoCodecs, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private string selectedVideoCodec;
|
|
|
|
private string selectedVideoCodec;
|
|
|
|
public string SelectedVideoCodec
|
|
|
|
public string SelectedVideoCodec
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return selectedVideoCodec; }
|
|
|
|
get => selectedVideoCodec;
|
|
|
|
set { SetProperty(ref selectedVideoCodec, value); }
|
|
|
|
set => SetProperty(ref selectedVideoCodec, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<Resolution> videoQualityList;
|
|
|
|
private List<Resolution> videoQualityList;
|
|
|
|
public List<Resolution> VideoQualityList
|
|
|
|
public List<Resolution> VideoQualityList
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return videoQualityList; }
|
|
|
|
get => videoQualityList;
|
|
|
|
set { SetProperty(ref videoQualityList, value); }
|
|
|
|
set => SetProperty(ref videoQualityList, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private Resolution selectedVideoQuality;
|
|
|
|
private Resolution selectedVideoQuality;
|
|
|
|
public Resolution SelectedVideoQuality
|
|
|
|
public Resolution SelectedVideoQuality
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return selectedVideoQuality; }
|
|
|
|
get => selectedVideoQuality;
|
|
|
|
set { SetProperty(ref selectedVideoQuality, value); }
|
|
|
|
set => SetProperty(ref selectedVideoQuality, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool isAddVideoOrder;
|
|
|
|
private bool isAddVideoOrder;
|
|
|
|
public bool IsAddVideoOrder
|
|
|
|
public bool IsAddVideoOrder
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return isAddVideoOrder; }
|
|
|
|
get => isAddVideoOrder;
|
|
|
|
set { SetProperty(ref isAddVideoOrder, value); }
|
|
|
|
set => SetProperty(ref isAddVideoOrder, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool isTranscodingFlvToMp4;
|
|
|
|
private bool isTranscodingFlvToMp4;
|
|
|
|
public bool IsTranscodingFlvToMp4
|
|
|
|
public bool IsTranscodingFlvToMp4
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return isTranscodingFlvToMp4; }
|
|
|
|
get => isTranscodingFlvToMp4;
|
|
|
|
set { SetProperty(ref isTranscodingFlvToMp4, value); }
|
|
|
|
set => SetProperty(ref isTranscodingFlvToMp4, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool isUseDefaultDirectory;
|
|
|
|
private bool isUseDefaultDirectory;
|
|
|
|
public bool IsUseDefaultDirectory
|
|
|
|
public bool IsUseDefaultDirectory
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return isUseDefaultDirectory; }
|
|
|
|
get => isUseDefaultDirectory;
|
|
|
|
set { SetProperty(ref isUseDefaultDirectory, value); }
|
|
|
|
set => SetProperty(ref isUseDefaultDirectory, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private string saveVideoDirectory;
|
|
|
|
private string saveVideoDirectory;
|
|
|
|
public string SaveVideoDirectory
|
|
|
|
public string SaveVideoDirectory
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return saveVideoDirectory; }
|
|
|
|
get => saveVideoDirectory;
|
|
|
|
set { SetProperty(ref saveVideoDirectory, value); }
|
|
|
|
set => SetProperty(ref saveVideoDirectory, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool isCreateFolderForMedia;
|
|
|
|
private bool isCreateFolderForMedia;
|
|
|
|
public bool IsCreateFolderForMedia
|
|
|
|
public bool IsCreateFolderForMedia
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return isCreateFolderForMedia; }
|
|
|
|
get => isCreateFolderForMedia;
|
|
|
|
set { SetProperty(ref isCreateFolderForMedia, value); }
|
|
|
|
set => SetProperty(ref isCreateFolderForMedia, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool isDownloadDanmaku;
|
|
|
|
private bool isDownloadDanmaku;
|
|
|
|
public bool IsDownloadDanmaku
|
|
|
|
public bool IsDownloadDanmaku
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return isDownloadDanmaku; }
|
|
|
|
get => isDownloadDanmaku;
|
|
|
|
set { SetProperty(ref isDownloadDanmaku, value); }
|
|
|
|
set => SetProperty(ref isDownloadDanmaku, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool isDownloadCover;
|
|
|
|
private bool isDownloadCover;
|
|
|
|
public bool IsDownloadCover
|
|
|
|
public bool IsDownloadCover
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return isDownloadCover; }
|
|
|
|
get => isDownloadCover;
|
|
|
|
set { SetProperty(ref isDownloadCover, value); }
|
|
|
|
set => SetProperty(ref isDownloadCover, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
@ -135,9 +135,9 @@ namespace DownKyi.ViewModels.Settings
|
|
|
|
int quality = SettingsManager.GetInstance().GetQuality();
|
|
|
|
int quality = SettingsManager.GetInstance().GetQuality();
|
|
|
|
SelectedVideoQuality = VideoQualityList.FirstOrDefault(t => { return t.Id == quality; });
|
|
|
|
SelectedVideoQuality = VideoQualityList.FirstOrDefault(t => { return t.Id == quality; });
|
|
|
|
|
|
|
|
|
|
|
|
// 是否在下载的视频前增加序号
|
|
|
|
//// 是否在下载的视频前增加序号
|
|
|
|
AllowStatus isAddOrder = SettingsManager.GetInstance().IsAddOrder();
|
|
|
|
//AllowStatus isAddOrder = SettingsManager.GetInstance().IsAddOrder();
|
|
|
|
IsAddVideoOrder = isAddOrder == AllowStatus.YES;
|
|
|
|
//IsAddVideoOrder = isAddOrder == AllowStatus.YES;
|
|
|
|
|
|
|
|
|
|
|
|
// 是否下载flv视频后转码为mp4
|
|
|
|
// 是否下载flv视频后转码为mp4
|
|
|
|
AllowStatus isTranscodingFlvToMp4 = SettingsManager.GetInstance().IsTranscodingFlvToMp4();
|
|
|
|
AllowStatus isTranscodingFlvToMp4 = SettingsManager.GetInstance().IsTranscodingFlvToMp4();
|
|
|
@ -150,17 +150,17 @@ namespace DownKyi.ViewModels.Settings
|
|
|
|
// 默认下载目录
|
|
|
|
// 默认下载目录
|
|
|
|
SaveVideoDirectory = SettingsManager.GetInstance().GetSaveVideoRootPath();
|
|
|
|
SaveVideoDirectory = SettingsManager.GetInstance().GetSaveVideoRootPath();
|
|
|
|
|
|
|
|
|
|
|
|
// 是否为不同视频分别创建文件夹
|
|
|
|
//// 是否为不同视频分别创建文件夹
|
|
|
|
AllowStatus isCreateFolderForMedia = SettingsManager.GetInstance().IsCreateFolderForMedia();
|
|
|
|
//AllowStatus isCreateFolderForMedia = SettingsManager.GetInstance().IsCreateFolderForMedia();
|
|
|
|
IsCreateFolderForMedia = isCreateFolderForMedia == AllowStatus.YES;
|
|
|
|
//IsCreateFolderForMedia = isCreateFolderForMedia == AllowStatus.YES;
|
|
|
|
|
|
|
|
|
|
|
|
// 是否在下载视频的同时下载弹幕
|
|
|
|
//// 是否在下载视频的同时下载弹幕
|
|
|
|
AllowStatus isDownloadDanmaku = SettingsManager.GetInstance().IsDownloadDanmaku();
|
|
|
|
//AllowStatus isDownloadDanmaku = SettingsManager.GetInstance().IsDownloadDanmaku();
|
|
|
|
IsDownloadDanmaku = isDownloadDanmaku == AllowStatus.YES;
|
|
|
|
//IsDownloadDanmaku = isDownloadDanmaku == AllowStatus.YES;
|
|
|
|
|
|
|
|
|
|
|
|
// 是否在下载视频的同时下载封面
|
|
|
|
//// 是否在下载视频的同时下载封面
|
|
|
|
AllowStatus isDownloadCover = SettingsManager.GetInstance().IsDownloadCover();
|
|
|
|
//AllowStatus isDownloadCover = SettingsManager.GetInstance().IsDownloadCover();
|
|
|
|
IsDownloadCover = isDownloadCover == AllowStatus.YES;
|
|
|
|
//IsDownloadCover = isDownloadCover == AllowStatus.YES;
|
|
|
|
|
|
|
|
|
|
|
|
isOnNavigatedTo = false;
|
|
|
|
isOnNavigatedTo = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -199,20 +199,20 @@ namespace DownKyi.ViewModels.Settings
|
|
|
|
PublishTip(isSucceed);
|
|
|
|
PublishTip(isSucceed);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 是否在下载的视频前增加序号事件
|
|
|
|
//// 是否在下载的视频前增加序号事件
|
|
|
|
private DelegateCommand IisAddVideoOrderCommand;
|
|
|
|
//private DelegateCommand IisAddVideoOrderCommand;
|
|
|
|
public DelegateCommand IsAddVideoOrderCommand => IisAddVideoOrderCommand ?? (IisAddVideoOrderCommand = new DelegateCommand(ExecuteIsAddVideoOrderCommand));
|
|
|
|
//public DelegateCommand IsAddVideoOrderCommand => IisAddVideoOrderCommand ?? (IisAddVideoOrderCommand = new DelegateCommand(ExecuteIsAddVideoOrderCommand));
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///// <summary>
|
|
|
|
/// 是否在下载的视频前增加序号事件
|
|
|
|
///// 是否在下载的视频前增加序号事件
|
|
|
|
/// </summary>
|
|
|
|
///// </summary>
|
|
|
|
private void ExecuteIsAddVideoOrderCommand()
|
|
|
|
//private void ExecuteIsAddVideoOrderCommand()
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
AllowStatus isAddOrder = IsAddVideoOrder ? AllowStatus.YES : AllowStatus.NO;
|
|
|
|
// AllowStatus isAddOrder = IsAddVideoOrder ? AllowStatus.YES : AllowStatus.NO;
|
|
|
|
|
|
|
|
|
|
|
|
bool isSucceed = SettingsManager.GetInstance().IsAddOrder(isAddOrder);
|
|
|
|
// bool isSucceed = SettingsManager.GetInstance().IsAddOrder(isAddOrder);
|
|
|
|
PublishTip(isSucceed);
|
|
|
|
// PublishTip(isSucceed);
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
// 是否下载flv视频后转码为mp4事件
|
|
|
|
// 是否下载flv视频后转码为mp4事件
|
|
|
|
private DelegateCommand isTranscodingFlvToMp4Command;
|
|
|
|
private DelegateCommand isTranscodingFlvToMp4Command;
|
|
|
@ -265,50 +265,50 @@ namespace DownKyi.ViewModels.Settings
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 是否为不同视频分别创建文件夹事件
|
|
|
|
//// 是否为不同视频分别创建文件夹事件
|
|
|
|
private DelegateCommand isCreateFolderForMediaCommand;
|
|
|
|
//private DelegateCommand isCreateFolderForMediaCommand;
|
|
|
|
public DelegateCommand IsCreateFolderForMediaCommand => isCreateFolderForMediaCommand ?? (isCreateFolderForMediaCommand = new DelegateCommand(ExecuteIsCreateFolderForMediaCommand));
|
|
|
|
//public DelegateCommand IsCreateFolderForMediaCommand => isCreateFolderForMediaCommand ?? (isCreateFolderForMediaCommand = new DelegateCommand(ExecuteIsCreateFolderForMediaCommand));
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///// <summary>
|
|
|
|
/// 是否为不同视频分别创建文件夹事件
|
|
|
|
///// 是否为不同视频分别创建文件夹事件
|
|
|
|
/// </summary>
|
|
|
|
///// </summary>
|
|
|
|
private void ExecuteIsCreateFolderForMediaCommand()
|
|
|
|
//private void ExecuteIsCreateFolderForMediaCommand()
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
AllowStatus isCreateFolderForMedia = IsCreateFolderForMedia ? AllowStatus.YES : AllowStatus.NO;
|
|
|
|
// AllowStatus isCreateFolderForMedia = IsCreateFolderForMedia ? AllowStatus.YES : AllowStatus.NO;
|
|
|
|
|
|
|
|
|
|
|
|
bool isSucceed = SettingsManager.GetInstance().IsCreateFolderForMedia(isCreateFolderForMedia);
|
|
|
|
// bool isSucceed = SettingsManager.GetInstance().IsCreateFolderForMedia(isCreateFolderForMedia);
|
|
|
|
PublishTip(isSucceed);
|
|
|
|
// PublishTip(isSucceed);
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
// 是否在下载视频的同时下载弹幕事件
|
|
|
|
//// 是否在下载视频的同时下载弹幕事件
|
|
|
|
private DelegateCommand isDownloadDanmakuCommand;
|
|
|
|
//private DelegateCommand isDownloadDanmakuCommand;
|
|
|
|
public DelegateCommand IsDownloadDanmakuCommand => isDownloadDanmakuCommand ?? (isDownloadDanmakuCommand = new DelegateCommand(ExecuteIsDownloadDanmakuCommand));
|
|
|
|
//public DelegateCommand IsDownloadDanmakuCommand => isDownloadDanmakuCommand ?? (isDownloadDanmakuCommand = new DelegateCommand(ExecuteIsDownloadDanmakuCommand));
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///// <summary>
|
|
|
|
/// 是否在下载视频的同时下载弹幕事件
|
|
|
|
///// 是否在下载视频的同时下载弹幕事件
|
|
|
|
/// </summary>
|
|
|
|
///// </summary>
|
|
|
|
private void ExecuteIsDownloadDanmakuCommand()
|
|
|
|
//private void ExecuteIsDownloadDanmakuCommand()
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
AllowStatus isDownloadDanmaku = IsDownloadDanmaku ? AllowStatus.YES : AllowStatus.NO;
|
|
|
|
// AllowStatus isDownloadDanmaku = IsDownloadDanmaku ? AllowStatus.YES : AllowStatus.NO;
|
|
|
|
|
|
|
|
|
|
|
|
bool isSucceed = SettingsManager.GetInstance().IsDownloadDanmaku(isDownloadDanmaku);
|
|
|
|
// bool isSucceed = SettingsManager.GetInstance().IsDownloadDanmaku(isDownloadDanmaku);
|
|
|
|
PublishTip(isSucceed);
|
|
|
|
// PublishTip(isSucceed);
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
// 是否在下载视频的同时下载封面事件
|
|
|
|
//// 是否在下载视频的同时下载封面事件
|
|
|
|
private DelegateCommand isDownloadCoverCommand;
|
|
|
|
//private DelegateCommand isDownloadCoverCommand;
|
|
|
|
public DelegateCommand IsDownloadCoverCommand => isDownloadCoverCommand ?? (isDownloadCoverCommand = new DelegateCommand(ExecuteIsDownloadCoverCommand));
|
|
|
|
//public DelegateCommand IsDownloadCoverCommand => isDownloadCoverCommand ?? (isDownloadCoverCommand = new DelegateCommand(ExecuteIsDownloadCoverCommand));
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///// <summary>
|
|
|
|
/// 是否在下载视频的同时下载封面事件
|
|
|
|
///// 是否在下载视频的同时下载封面事件
|
|
|
|
/// </summary>
|
|
|
|
///// </summary>
|
|
|
|
private void ExecuteIsDownloadCoverCommand()
|
|
|
|
//private void ExecuteIsDownloadCoverCommand()
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
AllowStatus isDownloadCover = IsDownloadCover ? AllowStatus.YES : AllowStatus.NO;
|
|
|
|
// AllowStatus isDownloadCover = IsDownloadCover ? AllowStatus.YES : AllowStatus.NO;
|
|
|
|
|
|
|
|
|
|
|
|
bool isSucceed = SettingsManager.GetInstance().IsDownloadCover(isDownloadCover);
|
|
|
|
// bool isSucceed = SettingsManager.GetInstance().IsDownloadCover(isDownloadCover);
|
|
|
|
PublishTip(isSucceed);
|
|
|
|
// PublishTip(isSucceed);
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|