fixup! fixup! fixup! fixup! Add initial Blazor Server project

recyclarr
Robert Dailey 3 years ago
parent 50f0395e7a
commit 7dbf86eb31

@ -3,7 +3,7 @@ namespace Recyclarr.Code.Settings
public interface ISettingsPersister
{
T LoadSettings<T>(string jsonFile)
where T: new();
where T : new();
void SaveSettings<T>(string jsonFile, T settingsObject);
}

@ -2,6 +2,7 @@ namespace Recyclarr.Code.Settings.Persisters
{
public class AppSettingsPersister : IAppSettingsPersister
{
private const string Filename = "app-settings.json";
private readonly ISettingsPersister _persister;
public AppSettingsPersister(ISettingsPersister persister)
@ -9,8 +10,6 @@ namespace Recyclarr.Code.Settings.Persisters
_persister = persister;
}
private const string Filename = "app-settings.json";
public AppSettings Load()
{
return _persister.LoadSettings<AppSettings>(Filename);

@ -39,5 +39,3 @@ namespace Recyclarr.Pages.Main
}
}
}

@ -190,7 +190,7 @@ namespace Recyclarr.Pages.Radarr.CustomFormats
private static CustomFormatConfig CreateCustomFormatConfig(CustomFormatIdentifier cf)
{
return new()
return new CustomFormatConfig
{
TrashIds = new List<string> {cf.TrashId},
Names = new List<string> {cf.Name}

@ -1,28 +1,20 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:30279",
"sslPort": 44344
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Recyclarr": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:7889"
}
},
"profiles": {
"Recyclarr": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"applicationUrl": "http://localhost:7889",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

File diff suppressed because it is too large Load Diff

@ -32,7 +32,7 @@ namespace TrashLib.Tests.Radarr.CustomFormat
private ProcessedCustomFormatData QuickMakeCf(string cfName, string trashId, int cfId)
{
return new(cfName, trashId, new JObject())
return new ProcessedCustomFormatData(cfName, trashId, new JObject())
{
CacheEntry = new TrashIdMapping(trashId, cfName) {CustomFormatId = cfId}
};

@ -16,7 +16,7 @@ namespace TrashLib.Tests.Radarr.CustomFormat.Processors.PersistenceSteps
{
private ProcessedCustomFormatData QuickMakeCf(string cfName, string trashId, int cfId)
{
return new(cfName, trashId, new JObject())
return new ProcessedCustomFormatData(cfName, trashId, new JObject())
{
CacheEntry = new TrashIdMapping(trashId, cfName) {CustomFormatId = cfId}
};

@ -87,7 +87,7 @@ namespace TrashLib.Tests.Radarr
{
new()
{
Names = new List<string>{"required value"},
Names = new List<string> {"required value"},
QualityProfiles = new List<QualityProfileConfig>
{
new() {Name = "required value"}

@ -5,14 +5,15 @@ namespace TrashLib.Config
internal class ServerInfo : IServerInfo
{
private readonly IConfigProvider _configProvider;
public string ApiKey => _configProvider.Active.ApiKey;
public string BaseUrl => _configProvider.Active.BaseUrl;
public ServerInfo(IConfigProvider configProvider)
{
_configProvider = configProvider;
}
public string ApiKey => _configProvider.Active.ApiKey;
public string BaseUrl => _configProvider.Active.BaseUrl;
public string BuildUrl()
{
return BaseUrl

@ -113,7 +113,7 @@ namespace TrashLib.Sonarr.ReleaseProfile
private static Regex BuildRegex(string regex)
{
return new(regex, RegexOptions.Compiled | RegexOptions.IgnoreCase);
return new Regex(regex, RegexOptions.Compiled | RegexOptions.IgnoreCase);
}
private Url BuildUrl(ReleaseProfileType profileName)

Loading…
Cancel
Save