设置增加初始值

croire 3 years ago
parent 0126c1b21f
commit 6f67462ee9

@ -5,6 +5,7 @@
/// </summary>
public enum AriaConfigFileAllocation
{
NOT_SET = 0,
NONE = 1, // 没有预分配
PREALLOC, // 预分配,默认
FALLOC // NTFS建议使用

@ -5,6 +5,7 @@
/// </summary>
public enum AriaConfigLogLevel
{
NOT_SET = 0,
DEBUG = 1,
INFO,
NOTICE,

@ -2,6 +2,7 @@
{
public enum AfterDownloadOperation
{
NOT_SET = 0,
NONE = 1,
OPEN_FOLDER,
CLOSE_APP,

@ -2,7 +2,8 @@
{
public enum DownloadFinishedSort
{
DOWNLOAD = 0,
NOT_SET = 0,
DOWNLOAD,
NUMBER
}
}

@ -5,7 +5,7 @@
/// </summary>
public class AboutSettings
{
public AllowStatus IsReceiveBetaVersion { get; set; }
public AllowStatus AutoUpdateWhenLaunch { get; set; }
public AllowStatus IsReceiveBetaVersion { get; set; } = AllowStatus.NONE;
public AllowStatus AutoUpdateWhenLaunch { get; set; } = AllowStatus.NONE;
}
}

@ -5,10 +5,10 @@
/// </summary>
public class BasicSettings
{
public AfterDownloadOperation AfterDownload { get; set; }
public AllowStatus IsListenClipboard { get; set; }
public AllowStatus IsAutoParseVideo { get; set; }
public ParseScope ParseScope { get; set; }
public DownloadFinishedSort DownloadFinishedSort { get; set; }
public AfterDownloadOperation AfterDownload { get; set; } = AfterDownloadOperation.NOT_SET;
public AllowStatus IsListenClipboard { get; set; } = AllowStatus.NONE;
public AllowStatus IsAutoParseVideo { get; set; } = AllowStatus.NONE;
public ParseScope ParseScope { get; set; } = ParseScope.NOT_SET;
public DownloadFinishedSort DownloadFinishedSort { get; set; } = DownloadFinishedSort.NOT_SET;
}
}

@ -5,15 +5,15 @@
/// </summary>
public class DanmakuSettings
{
public AllowStatus DanmakuTopFilter { get; set; }
public AllowStatus DanmakuBottomFilter { get; set; }
public AllowStatus DanmakuScrollFilter { get; set; }
public AllowStatus IsCustomDanmakuResolution { get; set; }
public int DanmakuScreenWidth { get; set; }
public int DanmakuScreenHeight { get; set; }
public string DanmakuFontName { get; set; }
public int DanmakuFontSize { get; set; }
public int DanmakuLineCount { get; set; }
public DanmakuLayoutAlgorithm DanmakuLayoutAlgorithm { get; set; }
public AllowStatus DanmakuTopFilter { get; set; } = AllowStatus.NONE;
public AllowStatus DanmakuBottomFilter { get; set; } = AllowStatus.NONE;
public AllowStatus DanmakuScrollFilter { get; set; } = AllowStatus.NONE;
public AllowStatus IsCustomDanmakuResolution { get; set; } = AllowStatus.NONE;
public int DanmakuScreenWidth { get; set; } = -1;
public int DanmakuScreenHeight { get; set; } = -1;
public string DanmakuFontName { get; set; } = null;
public int DanmakuFontSize { get; set; } = -1;
public int DanmakuLineCount { get; set; } = -1;
public DanmakuLayoutAlgorithm DanmakuLayoutAlgorithm { get; set; } = DanmakuLayoutAlgorithm.NONE;
}
}

@ -7,17 +7,17 @@ namespace DownKyi.Core.Settings.Models
/// </summary>
public class NetworkSettings
{
public AllowStatus IsLiftingOfRegion { get; set; }
public int AriaListenPort { get; set; }
public AriaConfigLogLevel AriaLogLevel { get; set; }
public int AriaMaxConcurrentDownloads { get; set; }
public int AriaSplit { get; set; }
public int AriaMaxOverallDownloadLimit { get; set; }
public int AriaMaxDownloadLimit { get; set; }
public AriaConfigFileAllocation AriaFileAllocation { get; set; }
public AllowStatus IsLiftingOfRegion { get; set; } = AllowStatus.NONE;
public int AriaListenPort { get; set; } = -1;
public AriaConfigLogLevel AriaLogLevel { get; set; } = AriaConfigLogLevel.NOT_SET;
public int AriaMaxConcurrentDownloads { get; set; } = -1;
public int AriaSplit { get; set; } = -1;
public int AriaMaxOverallDownloadLimit { get; set; } = -1;
public int AriaMaxDownloadLimit { get; set; } = -1;
public AriaConfigFileAllocation AriaFileAllocation { get; set; } = AriaConfigFileAllocation.NOT_SET;
public AllowStatus IsAriaHttpProxy { get; set; }
public string AriaHttpProxy { get; set; }
public int AriaHttpProxyListenPort { get; set; }
public AllowStatus IsAriaHttpProxy { get; set; } = AllowStatus.NONE;
public string AriaHttpProxy { get; set; } = null;
public int AriaHttpProxyListenPort { get; set; } = -1;
}
}

@ -8,14 +8,14 @@ namespace DownKyi.Core.Settings.Models
/// </summary>
public class VideoSettings
{
public VideoCodecs VideoCodecs { get; set; } // AVC or HEVC
public int Quality { get; set; } // 画质
public int AudioQuality { get; set; } // 音质
public AllowStatus IsTranscodingFlvToMp4 { get; set; } // 是否将flv转为mp4
public string SaveVideoRootPath { get; set; } // 视频保存路径
public List<string> HistoryVideoRootPaths { get; set; } // 历史视频保存路径
public AllowStatus IsUseSaveVideoRootPath { get; set; } // 是否使用默认视频保存路径
public List<FileNamePart> FileNameParts { get; set; } // 文件命名格式
public string FileNamePartTimeFormat { get; set; } // 文件命名中的时间格式
public VideoCodecs VideoCodecs { get; set; } = VideoCodecs.NONE; // AVC or HEVC
public int Quality { get; set; } = -1; // 画质
public int AudioQuality { get; set; } = -1; // 音质
public AllowStatus IsTranscodingFlvToMp4 { get; set; } = AllowStatus.NONE; // 是否将flv转为mp4
public string SaveVideoRootPath { get; set; } = null; // 视频保存路径
public List<string> HistoryVideoRootPaths { get; set; } = null; // 历史视频保存路径
public AllowStatus IsUseSaveVideoRootPath { get; set; } = AllowStatus.NONE; // 是否使用默认视频保存路径
public List<FileNamePart> FileNameParts { get; set; } = null; // 文件命名格式
public string FileNamePartTimeFormat { get; set; } = null; // 文件命名中的时间格式
}
}

@ -2,6 +2,7 @@
{
public enum ParseScope
{
NOT_SET = 0,
NONE = 1,
SELECTED_ITEM,
CURRENT_SECTION,

@ -15,7 +15,7 @@
public AllowStatus IsReceiveBetaVersion()
{
appSettings = GetSettings();
if (appSettings.About.IsReceiveBetaVersion == 0)
if (appSettings.About.IsReceiveBetaVersion == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
IsReceiveBetaVersion(isReceiveBetaVersion);
@ -42,7 +42,7 @@
public AllowStatus GetAutoUpdateWhenLaunch()
{
appSettings = GetSettings();
if (appSettings.About.AutoUpdateWhenLaunch == 0)
if (appSettings.About.AutoUpdateWhenLaunch == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
SetAutoUpdateWhenLaunch(autoUpdateWhenLaunch);

@ -24,7 +24,7 @@
public AfterDownloadOperation GetAfterDownloadOperation()
{
appSettings = GetSettings();
if (appSettings.Basic.AfterDownload == 0)
if (appSettings.Basic.AfterDownload == AfterDownloadOperation.NOT_SET)
{
// 第一次获取,先设置默认值
SetAfterDownloadOperation(afterDownload);
@ -51,7 +51,7 @@
public AllowStatus IsListenClipboard()
{
appSettings = GetSettings();
if (appSettings.Basic.IsListenClipboard == 0)
if (appSettings.Basic.IsListenClipboard == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
IsListenClipboard(isListenClipboard);
@ -78,7 +78,7 @@
public AllowStatus IsAutoParseVideo()
{
appSettings = GetSettings();
if (appSettings.Basic.IsAutoParseVideo == 0)
if (appSettings.Basic.IsAutoParseVideo == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
IsAutoParseVideo(isAutoParseVideo);
@ -105,7 +105,7 @@
public ParseScope GetParseScope()
{
appSettings = GetSettings();
if (appSettings.Basic.ParseScope == 0)
if (appSettings.Basic.ParseScope == ParseScope.NOT_SET)
{
// 第一次获取,先设置默认值
SetParseScope(parseScope);
@ -132,7 +132,7 @@
public DownloadFinishedSort GetDownloadFinishedSort()
{
appSettings = GetSettings();
if (appSettings.Basic.DownloadFinishedSort == 0)
if (appSettings.Basic.DownloadFinishedSort == DownloadFinishedSort.NOT_SET)
{
// 第一次获取,先设置默认值
SetDownloadFinishedSort(finishedSort);

@ -40,7 +40,7 @@
public AllowStatus GetDanmakuTopFilter()
{
appSettings = GetSettings();
if (appSettings.Danmaku.DanmakuTopFilter == 0)
if (appSettings.Danmaku.DanmakuTopFilter == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
SetDanmakuTopFilter(danmakuTopFilter);
@ -67,7 +67,7 @@
public AllowStatus GetDanmakuBottomFilter()
{
appSettings = GetSettings();
if (appSettings.Danmaku.DanmakuBottomFilter == 0)
if (appSettings.Danmaku.DanmakuBottomFilter == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
SetDanmakuBottomFilter(danmakuBottomFilter);
@ -94,7 +94,7 @@
public AllowStatus GetDanmakuScrollFilter()
{
appSettings = GetSettings();
if (appSettings.Danmaku.DanmakuScrollFilter == 0)
if (appSettings.Danmaku.DanmakuScrollFilter == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
SetDanmakuScrollFilter(danmakuScrollFilter);
@ -121,7 +121,7 @@
public AllowStatus IsCustomDanmakuResolution()
{
appSettings = GetSettings();
if (appSettings.Danmaku.IsCustomDanmakuResolution == 0)
if (appSettings.Danmaku.IsCustomDanmakuResolution == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
IsCustomDanmakuResolution(isCustomDanmakuResolution);
@ -148,7 +148,7 @@
public int GetDanmakuScreenWidth()
{
appSettings = GetSettings();
if (appSettings.Danmaku.DanmakuScreenWidth == 0)
if (appSettings.Danmaku.DanmakuScreenWidth == -1)
{
// 第一次获取,先设置默认值
SetDanmakuScreenWidth(danmakuScreenWidth);
@ -175,7 +175,7 @@
public int GetDanmakuScreenHeight()
{
appSettings = GetSettings();
if (appSettings.Danmaku.DanmakuScreenHeight == 0)
if (appSettings.Danmaku.DanmakuScreenHeight == -1)
{
// 第一次获取,先设置默认值
SetDanmakuScreenHeight(danmakuScreenHeight);
@ -229,7 +229,7 @@
public int GetDanmakuFontSize()
{
appSettings = GetSettings();
if (appSettings.Danmaku.DanmakuFontSize == 0)
if (appSettings.Danmaku.DanmakuFontSize == -1)
{
// 第一次获取,先设置默认值
SetDanmakuFontSize(danmakuFontSize);
@ -256,7 +256,7 @@
public int GetDanmakuLineCount()
{
appSettings = GetSettings();
if (appSettings.Danmaku.DanmakuLineCount == 0)
if (appSettings.Danmaku.DanmakuLineCount == -1)
{
// 第一次获取,先设置默认值
SetDanmakuLineCount(danmakuLineCount);
@ -283,7 +283,7 @@
public DanmakuLayoutAlgorithm GetDanmakuLayoutAlgorithm()
{
appSettings = GetSettings();
if (appSettings.Danmaku.DanmakuLayoutAlgorithm == 0)
if (appSettings.Danmaku.DanmakuLayoutAlgorithm == DanmakuLayoutAlgorithm.NONE)
{
// 第一次获取,先设置默认值
SetDanmakuLayoutAlgorithm(danmakuLayoutAlgorithm);

@ -40,7 +40,7 @@ namespace DownKyi.Core.Settings
public AllowStatus IsLiftingOfRegion()
{
appSettings = GetSettings();
if (appSettings.Network.IsLiftingOfRegion == 0)
if (appSettings.Network.IsLiftingOfRegion == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
IsLiftingOfRegion(isLiftingOfRegion);
@ -67,7 +67,7 @@ namespace DownKyi.Core.Settings
public int GetAriaListenPort()
{
appSettings = GetSettings();
if (appSettings.Network.AriaListenPort == 0)
if (appSettings.Network.AriaListenPort == -1)
{
// 第一次获取,先设置默认值
SetAriaListenPort(ariaListenPort);
@ -94,7 +94,7 @@ namespace DownKyi.Core.Settings
public AriaConfigLogLevel GetAriaLogLevel()
{
appSettings = GetSettings();
if (appSettings.Network.AriaLogLevel == 0)
if (appSettings.Network.AriaLogLevel == AriaConfigLogLevel.NOT_SET)
{
// 第一次获取,先设置默认值
SetAriaLogLevel(ariaLogLevel);
@ -121,7 +121,7 @@ namespace DownKyi.Core.Settings
public int GetAriaMaxConcurrentDownloads()
{
appSettings = GetSettings();
if (appSettings.Network.AriaMaxConcurrentDownloads == 0)
if (appSettings.Network.AriaMaxConcurrentDownloads == -1)
{
// 第一次获取,先设置默认值
SetAriaMaxConcurrentDownloads(ariaMaxConcurrentDownloads);
@ -148,7 +148,7 @@ namespace DownKyi.Core.Settings
public int GetAriaSplit()
{
appSettings = GetSettings();
if (appSettings.Network.AriaSplit == 0)
if (appSettings.Network.AriaSplit == -1)
{
// 第一次获取,先设置默认值
SetAriaSplit(ariaSplit);
@ -175,7 +175,7 @@ namespace DownKyi.Core.Settings
public int GetAriaMaxOverallDownloadLimit()
{
appSettings = GetSettings();
if (appSettings.Network.AriaMaxOverallDownloadLimit == 0)
if (appSettings.Network.AriaMaxOverallDownloadLimit == -1)
{
// 第一次获取,先设置默认值
SetAriaMaxOverallDownloadLimit(ariaMaxOverallDownloadLimit);
@ -202,7 +202,7 @@ namespace DownKyi.Core.Settings
public int GetAriaMaxDownloadLimit()
{
appSettings = GetSettings();
if (appSettings.Network.AriaMaxDownloadLimit == 0)
if (appSettings.Network.AriaMaxDownloadLimit == -1)
{
// 第一次获取,先设置默认值
SetAriaMaxDownloadLimit(ariaMaxDownloadLimit);
@ -229,7 +229,7 @@ namespace DownKyi.Core.Settings
public AriaConfigFileAllocation GetAriaFileAllocation()
{
appSettings = GetSettings();
if (appSettings.Network.AriaFileAllocation == 0)
if (appSettings.Network.AriaFileAllocation == AriaConfigFileAllocation.NOT_SET)
{
// 第一次获取,先设置默认值
SetAriaFileAllocation(ariaFileAllocation);
@ -256,7 +256,7 @@ namespace DownKyi.Core.Settings
public AllowStatus IsAriaHttpProxy()
{
appSettings = GetSettings();
if (appSettings.Network.IsAriaHttpProxy == 0)
if (appSettings.Network.IsAriaHttpProxy == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
IsAriaHttpProxy(isAriaHttpProxy);
@ -310,7 +310,7 @@ namespace DownKyi.Core.Settings
public int GetAriaHttpProxyListenPort()
{
appSettings = GetSettings();
if (appSettings.Network.AriaHttpProxyListenPort == 0)
if (appSettings.Network.AriaHttpProxyListenPort == -1)
{
// 第一次获取,先设置默认值
SetAriaHttpProxyListenPort(ariaHttpProxyListenPort);

@ -54,7 +54,7 @@ namespace DownKyi.Core.Settings
public VideoCodecs GetVideoCodecs()
{
appSettings = GetSettings();
if (appSettings.Video.VideoCodecs == 0)
if (appSettings.Video.VideoCodecs == VideoCodecs.NONE)
{
// 第一次获取,先设置默认值
SetVideoCodecs(videoCodecs);
@ -81,7 +81,7 @@ namespace DownKyi.Core.Settings
public int GetQuality()
{
appSettings = GetSettings();
if (appSettings.Video.Quality == 0)
if (appSettings.Video.Quality == -1)
{
// 第一次获取,先设置默认值
SetQuality(quality);
@ -108,7 +108,7 @@ namespace DownKyi.Core.Settings
public int GetAudioQuality()
{
appSettings = GetSettings();
if (appSettings.Video.AudioQuality == 0)
if (appSettings.Video.AudioQuality == -1)
{
// 第一次获取,先设置默认值
SetAudioQuality(audioQuality);
@ -135,7 +135,7 @@ namespace DownKyi.Core.Settings
public AllowStatus IsTranscodingFlvToMp4()
{
appSettings = GetSettings();
if (appSettings.Video.IsTranscodingFlvToMp4 == 0)
if (appSettings.Video.IsTranscodingFlvToMp4 == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
IsTranscodingFlvToMp4(isTranscodingFlvToMp4);
@ -216,7 +216,7 @@ namespace DownKyi.Core.Settings
public AllowStatus IsUseSaveVideoRootPath()
{
appSettings = GetSettings();
if (appSettings.Video.IsUseSaveVideoRootPath == 0)
if (appSettings.Video.IsUseSaveVideoRootPath == AllowStatus.NONE)
{
// 第一次获取,先设置默认值
IsUseSaveVideoRootPath(isUseSaveVideoRootPath);

Loading…
Cancel
Save