[CHANGE] Updated settings and added warning messages
This commit is contained in:
@@ -5,6 +5,6 @@ namespace Manager.App.Models.Settings;
|
|||||||
public class DownloadSettings
|
public class DownloadSettings
|
||||||
{
|
{
|
||||||
[ConfigurationKeyName("MaxConcurrentDownloads")]
|
[ConfigurationKeyName("MaxConcurrentDownloads")]
|
||||||
[Range(-1, 20)]
|
[Range(-1, 20, ErrorMessage = "Max concurrent downloads must be between 0 and 20. (0 for unlimited concurrent downloads)")]
|
||||||
public int MaxConcurrentDownloads { get; set; }
|
public int MaxConcurrentDownloads { get; set; } = 5;
|
||||||
}
|
}
|
@@ -5,6 +5,10 @@ namespace Manager.App.Models.Settings;
|
|||||||
public class LibrarySettings
|
public class LibrarySettings
|
||||||
{
|
{
|
||||||
[ConfigurationKeyName("Path")]
|
[ConfigurationKeyName("Path")]
|
||||||
[Required]
|
[Required(AllowEmptyStrings = false, ErrorMessage = "Library path is required!")]
|
||||||
public required string Path { get; set; }
|
public required string Path { get; set; }
|
||||||
|
|
||||||
|
[ConfigurationKeyName("DefaultUserAgent")]
|
||||||
|
[Required(AllowEmptyStrings = false, ErrorMessage = "An default user agent is required.")]
|
||||||
|
public required string DefaultUserAgent { get; set; }
|
||||||
}
|
}
|
@@ -18,7 +18,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Library": {
|
"Library": {
|
||||||
"Path": "{workdir}/"
|
"Path": "{workdir}/Library",
|
||||||
|
"DefaultUserAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0"
|
||||||
},
|
},
|
||||||
"Downloads": {
|
"Downloads": {
|
||||||
"MaxConcurrentDownloads": 5
|
"MaxConcurrentDownloads": 5
|
||||||
|
@@ -19,7 +19,8 @@
|
|||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"Library": {
|
"Library": {
|
||||||
"Path": "{workdir}/Library"
|
"Path": "{workdir}/Library",
|
||||||
|
"DefaultUserAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0"
|
||||||
},
|
},
|
||||||
"Downloads": {
|
"Downloads": {
|
||||||
"MaxConcurrentDownloads": 5
|
"MaxConcurrentDownloads": 5
|
||||||
|
Reference in New Issue
Block a user