Rename Sonarr References in Backend

This commit is contained in:
Qstick 2017-10-30 22:25:19 -04:00
parent c333ca4161
commit 1451a63c06
12 changed files with 20 additions and 20 deletions

View file

@ -1,8 +1,8 @@
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
namespace Lidarr.Api.V1.Config namespace Lidarr.Api.V1.Config
{ {
public class DownloadClientConfigModule : SonarrConfigModule<DownloadClientConfigResource> public class DownloadClientConfigModule : LidarrConfigModule<DownloadClientConfigResource>
{ {
public DownloadClientConfigModule(IConfigService configService) public DownloadClientConfigModule(IConfigService configService)
: base(configService) : base(configService)
@ -14,4 +14,4 @@ namespace Lidarr.Api.V1.Config
return DownloadClientConfigResourceMapper.ToResource(model); return DownloadClientConfigResourceMapper.ToResource(model);
} }
} }
} }

View file

@ -4,7 +4,7 @@ using Lidarr.Http.Validation;
namespace Lidarr.Api.V1.Config namespace Lidarr.Api.V1.Config
{ {
public class IndexerConfigModule : SonarrConfigModule<IndexerConfigResource> public class IndexerConfigModule : LidarrConfigModule<IndexerConfigResource>
{ {
public IndexerConfigModule(IConfigService configService) public IndexerConfigModule(IConfigService configService)

View file

@ -1,4 +1,4 @@
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
using Lidarr.Http; using Lidarr.Http;
@ -6,16 +6,16 @@ using Lidarr.Http.REST;
namespace Lidarr.Api.V1.Config namespace Lidarr.Api.V1.Config
{ {
public abstract class SonarrConfigModule<TResource> : LidarrRestModule<TResource> where TResource : RestResource, new() public abstract class LidarrConfigModule<TResource> : LidarrRestModule<TResource> where TResource : RestResource, new()
{ {
private readonly IConfigService _configService; private readonly IConfigService _configService;
protected SonarrConfigModule(IConfigService configService) protected LidarrConfigModule(IConfigService configService)
: this(new TResource().ResourceName.Replace("config", ""), configService) : this(new TResource().ResourceName.Replace("config", ""), configService)
{ {
} }
protected SonarrConfigModule(string resource, IConfigService configService) : protected LidarrConfigModule(string resource, IConfigService configService) :
base("config/" + resource.Trim('/')) base("config/" + resource.Trim('/'))
{ {
_configService = configService; _configService = configService;

View file

@ -4,7 +4,7 @@ using NzbDrone.Core.Validation.Paths;
namespace Lidarr.Api.V1.Config namespace Lidarr.Api.V1.Config
{ {
public class MediaManagementConfigModule : SonarrConfigModule<MediaManagementConfigResource> public class MediaManagementConfigModule : LidarrConfigModule<MediaManagementConfigResource>
{ {
public MediaManagementConfigModule(IConfigService configService, PathExistsValidator pathExistsValidator) public MediaManagementConfigModule(IConfigService configService, PathExistsValidator pathExistsValidator)
: base(configService) : base(configService)

View file

@ -6,7 +6,7 @@ using NzbDrone.Core.Validation;
namespace Lidarr.Api.V1.Config namespace Lidarr.Api.V1.Config
{ {
public class MetadataProviderConfigModule : SonarrConfigModule<MetadataProviderConfigResource> public class MetadataProviderConfigModule : LidarrConfigModule<MetadataProviderConfigResource>
{ {
public MetadataProviderConfigModule(IConfigService configService) public MetadataProviderConfigModule(IConfigService configService)
: base(configService) : base(configService)

View file

@ -5,7 +5,7 @@ using Lidarr.Http;
namespace Lidarr.Api.V1.Config namespace Lidarr.Api.V1.Config
{ {
public class UiConfigModule : SonarrConfigModule<UiConfigResource> public class UiConfigModule : LidarrConfigModule<UiConfigResource>
{ {
public UiConfigModule(IConfigService configService) public UiConfigModule(IConfigService configService)
: base(configService) : base(configService)

View file

@ -131,7 +131,7 @@
<Compile Include="Config\NamingConfigModule.cs" /> <Compile Include="Config\NamingConfigModule.cs" />
<Compile Include="Config\NamingConfigResource.cs" /> <Compile Include="Config\NamingConfigResource.cs" />
<Compile Include="Config\NamingExampleResource.cs" /> <Compile Include="Config\NamingExampleResource.cs" />
<Compile Include="Config\SonarrConfigModule.cs" /> <Compile Include="Config\LidarrConfigModule.cs" />
<Compile Include="FileSystem\FileSystemModule.cs" /> <Compile Include="FileSystem\FileSystemModule.cs" />
<Compile Include="DiskSpace\DiskSpaceModule.cs" /> <Compile Include="DiskSpace\DiskSpaceModule.cs" />
<Compile Include="DiskSpace\DiskSpaceResource.cs" /> <Compile Include="DiskSpace\DiskSpaceResource.cs" />

View file

@ -39,7 +39,7 @@ namespace Lidarr.Api.V1
Tags = definition.Tags, Tags = definition.Tags,
Fields = SchemaBuilder.ToSchema(definition.Settings), Fields = SchemaBuilder.ToSchema(definition.Settings),
InfoLink = string.Format("https://github.com/Sonarr/Sonarr/wiki/Supported-{0}#{1}", InfoLink = string.Format("https://github.com/Lidarr/Lidarr/wiki/Supported-{0}#{1}",
typeof(TProviderResource).Name.Replace("Resource", "s"), typeof(TProviderResource).Name.Replace("Resource", "s"),
definition.Implementation.ToLower()) definition.Implementation.ToLower())
}; };
@ -67,4 +67,4 @@ namespace Lidarr.Api.V1
return definition; return definition;
} }
} }
} }

View file

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
@ -168,14 +168,14 @@ namespace NzbDrone.Common.Test.Http
} }
var request = new HttpRequestBuilder($"http://{_httpBinHost}/redirect-to") var request = new HttpRequestBuilder($"http://{_httpBinHost}/redirect-to")
.AddQueryParam("url", $"https://sonarr.tv/") .AddQueryParam("url", $"https://lidarr.audio/")
.Build(); .Build();
request.AllowAutoRedirect = true; request.AllowAutoRedirect = true;
var response = Subject.Get(request); var response = Subject.Get(request);
response.StatusCode.Should().Be(HttpStatusCode.OK); response.StatusCode.Should().Be(HttpStatusCode.OK);
response.Content.Should().Contain("Sonarr"); response.Content.Should().Contain("Lidarr");
ExceptionVerification.ExpectedErrors(0); ExceptionVerification.ExpectedErrors(0);
} }

View file

@ -39,7 +39,7 @@ namespace NzbDrone.Console
{ {
System.Console.WriteLine(""); System.Console.WriteLine("");
System.Console.WriteLine(""); System.Console.WriteLine("");
Logger.Fatal(ex.Message + ". This can happen if another instance of Sonarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions"); Logger.Fatal(ex.Message + ". This can happen if another instance of Lidarr is already running another application is using the same port (default: 8989) or the user has insufficient permissions");
Exit(ExitCodes.RecoverableFailure); Exit(ExitCodes.RecoverableFailure);
} }
catch (Exception ex) catch (Exception ex)

View file

@ -30,7 +30,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
{ {
// Mono 5.0 still has issues in combination with libmediainfo, so disabling this check for now. // Mono 5.0 still has issues in combination with libmediainfo, so disabling this check for now.
//_logger.Debug("Mono version 5.0.0 or higher and legacy TLS provider is selected, recommending user to switch to btls."); //_logger.Debug("Mono version 5.0.0 or higher and legacy TLS provider is selected, recommending user to switch to btls.");
//return new HealthCheck(GetType(), HealthCheckResult.Warning, "Sonarr now supports Mono 5.x with btls enabled, consider removing MONO_TLS_PROVIDER=legacy option"); //return new HealthCheck(GetType(), HealthCheckResult.Warning, "Lidarr now supports Mono 5.x with btls enabled, consider removing MONO_TLS_PROVIDER=legacy option");
} }
return new HealthCheck(GetType()); return new HealthCheck(GetType());

View file

@ -64,7 +64,7 @@ namespace NzbDrone.Host
_serviceProvider.SetPermissions(ServiceProvider.SERVICE_NAME); _serviceProvider.SetPermissions(ServiceProvider.SERVICE_NAME);
// Start the service and exit. // Start the service and exit.
// Ensures that there isn't an instance of Sonarr already running that the service account cannot stop. // Ensures that there isn't an instance of Lidarr already running that the service account cannot stop.
_processProvider.SpawnNewProcess("sc.exe", $"start {ServiceProvider.SERVICE_NAME}", null, true); _processProvider.SpawnNewProcess("sc.exe", $"start {ServiceProvider.SERVICE_NAME}", null, true);
} }
break; break;