mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
First round of refactoring.
This commit is contained in:
parent
c98c679504
commit
20c8dec50a
117 changed files with 283 additions and 261 deletions
|
@ -38,7 +38,7 @@ namespace NzbDrone.Api.Authentication
|
|||
|
||||
else if (_configFileProvider.AuthenticationMethod == AuthenticationType.Basic)
|
||||
{
|
||||
pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration(_authenticationService, "Sonarr"));
|
||||
pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration(_authenticationService, "Lidarr"));
|
||||
}
|
||||
|
||||
pipelines.BeforeRequest.AddItemToEndOfPipeline((Func<NancyContext, Response>) RequiresAuthentication);
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace NzbDrone.Api.Calendar
|
|||
_tagService = tagService;
|
||||
|
||||
Get["/NzbDrone.ics"] = options => GetCalendarFeed();
|
||||
Get["/Sonarr.ics"] = options => GetCalendarFeed();
|
||||
Get["/Lidarr.ics"] = options => GetCalendarFeed();
|
||||
}
|
||||
|
||||
private Response GetCalendarFeed()
|
||||
|
@ -89,7 +89,7 @@ namespace NzbDrone.Api.Calendar
|
|||
var episodes = _episodeService.EpisodesBetweenDates(start, end, unmonitored);
|
||||
var calendar = new Ical.Net.Calendar
|
||||
{
|
||||
ProductId = "-//sonarr.tv//Sonarr//EN"
|
||||
ProductId = "-//Lidarr.tv//Lidarr//EN"
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace NzbDrone.Api
|
|||
|
||||
resource.Fields = SchemaBuilder.ToSchema(definition.Settings);
|
||||
|
||||
resource.InfoLink = string.Format("https://github.com/Sonarr/Sonarr/wiki/Supported-{0}#{1}",
|
||||
resource.InfoLink = string.Format("https://github.com/Lidarr/Lidarr/wiki/Supported-{0}#{1}",
|
||||
typeof(TProviderResource).Name.Replace("Resource", "s"),
|
||||
definition.Implementation.ToLower());
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace NzbDrone.Common.Test.Http
|
|||
|
||||
var userAgent = response.Resource.Headers["User-Agent"].ToString();
|
||||
|
||||
userAgent.Should().Contain("Sonarr");
|
||||
userAgent.Should().Contain("Lidarr");
|
||||
}
|
||||
|
||||
[TestCase("Accept", "text/xml, text/rss+xml, application/rss+xml")]
|
||||
|
@ -174,7 +174,7 @@ namespace NzbDrone.Common.Test.Http
|
|||
{
|
||||
var file = GetTempFilePath();
|
||||
|
||||
Assert.Throws<WebException>(() => Subject.DownloadFile("http://download.sonarr.tv/wrongpath", file));
|
||||
Assert.Throws<WebException>(() => Subject.DownloadFile("http://download.Lidarr.tv/wrongpath", file));
|
||||
|
||||
File.Exists(file).Should().BeFalse();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace NzbDrone.Common.Test.InstrumentationTests
|
|||
[TestCase(@"http://rss.torrentleech.org/mySecret")]
|
||||
[TestCase(@"http://rss.torrentleech.org/rss/download/12345/01233210/filename.torrent")]
|
||||
[TestCase(@"http://www.bitmetv.org/rss.php?uid=mySecret&passkey=mySecret")]
|
||||
[TestCase(@"https://rss.omgwtfnzbs.org/rss-search.php?catid=19,20&user=sonarr&api=mySecret&eng=1")]
|
||||
[TestCase(@"https://rss.omgwtfnzbs.org/rss-search.php?catid=19,20&user=Lidarr&api=mySecret&eng=1")]
|
||||
[TestCase(@"https://dognzb.cr/fetch/2b51db35e1912ffc138825a12b9933d2/2b51db35e1910123321025a12b9933d2")]
|
||||
[TestCase(@"https://baconbits.org/feeds.php?feed=torrents_tv&user=12345&auth=2b51db35e1910123321025a12b9933d2&passkey=mySecret&authkey=2b51db35e1910123321025a12b9933d2")]
|
||||
// NzbGet
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Common.Http;
|
||||
|
||||
namespace NzbDrone.Common.Cloud
|
||||
{
|
||||
public interface ISonarrCloudRequestBuilder
|
||||
public interface ILidarrCloudRequestBuilder
|
||||
{
|
||||
IHttpRequestBuilderFactory Services { get; }
|
||||
IHttpRequestBuilderFactory SkyHookTvdb { get; }
|
||||
}
|
||||
|
||||
public class SonarrCloudRequestBuilder : ISonarrCloudRequestBuilder
|
||||
public class LidarrCloudRequestBuilder : ILidarrCloudRequestBuilder
|
||||
{
|
||||
public SonarrCloudRequestBuilder()
|
||||
public LidarrCloudRequestBuilder()
|
||||
{
|
||||
Services = new HttpRequestBuilder("http://services.sonarr.tv/v1/")
|
||||
Services = new HttpRequestBuilder("http://services.Lidarr.tv/v1/")
|
||||
.CreateFactory();
|
||||
|
||||
SkyHookTvdb = new HttpRequestBuilder("http://skyhook.sonarr.tv/v1/tvdb/{route}/{language}/")
|
||||
SkyHookTvdb = new HttpRequestBuilder("http://skyhook.Lidarr.tv/v1/tvdb/{route}/{language}/")
|
||||
.SetSegment("language", "en")
|
||||
.CreateFactory();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace NzbDrone.Common
|
|||
Console.WriteLine(" Commands:");
|
||||
Console.WriteLine(" /{0} Install the application as a Windows Service ({1}).", StartupContext.INSTALL_SERVICE, ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
Console.WriteLine(" /{0} Uninstall already installed Windows Service ({1}).", StartupContext.UNINSTALL_SERVICE, ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
Console.WriteLine(" /{0} Don't open Sonarr in a browser", StartupContext.NO_BROWSER);
|
||||
Console.WriteLine(" /{0} Don't open Lidarr in a browser", StartupContext.NO_BROWSER);
|
||||
Console.WriteLine(" <No Arguments> Run application in console mode.");
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ namespace NzbDrone.Common.Disk
|
|||
|
||||
try
|
||||
{
|
||||
var testPath = Path.Combine(path, "sonarr_write_test.txt");
|
||||
var testPath = Path.Combine(path, "Lidarr_write_test.txt");
|
||||
var testContent = $"This file was created to verify if '{path}' is writable. It should've been automatically deleted. Feel free to delete it.";
|
||||
File.WriteAllText(testPath, testContent);
|
||||
File.Delete(testPath);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Net;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Common.Extensions;
|
||||
|
@ -138,7 +138,7 @@ namespace NzbDrone.Common.Http.Dispatchers
|
|||
webRequest.TransferEncoding = header.Value;
|
||||
break;
|
||||
case "User-Agent":
|
||||
throw new NotSupportedException("User-Agent other than Sonarr not allowed.");
|
||||
throw new NotSupportedException("User-Agent other than Lidarr not allowed.");
|
||||
case "Proxy-Connection":
|
||||
throw new NotImplementedException();
|
||||
default:
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace NzbDrone.Common.Http
|
|||
public HttpProvider(Logger logger)
|
||||
{
|
||||
_logger = logger;
|
||||
_userAgent = string.Format("Sonarr {0}", BuildInfo.Version);
|
||||
_userAgent = string.Format("Lidarr {0}", BuildInfo.Version);
|
||||
ServicePointManager.Expect100Continue = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
|
||||
namespace NzbDrone.Common.Http
|
||||
{
|
||||
|
@ -33,8 +33,8 @@ namespace NzbDrone.Common.Http
|
|||
|
||||
var osVersion = osInfo.Version?.ToLower();
|
||||
|
||||
_userAgent = $"Sonarr/{BuildInfo.Version} ({osName} {osVersion})";
|
||||
_userAgentSimplified = $"Sonarr/{BuildInfo.Version.ToString(2)}";
|
||||
_userAgent = $"Lidarr/{BuildInfo.Version} ({osName} {osVersion})";
|
||||
_userAgentSimplified = $"Lidarr/{BuildInfo.Version.ToString(2)}";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -92,15 +92,15 @@ namespace NzbDrone.Common.Instrumentation
|
|||
if (updateClient)
|
||||
{
|
||||
dsn = RuntimeInfo.IsProduction
|
||||
? "https://b85aa82c65b84b0e99e3b7c281438357:392b5bc007974147a922c5d841c47cf9@sentry.sonarr.tv/11"
|
||||
: "https://6168f0946aba4e60ac23e469ac08eac5:bd59e8454ccc454ea27a90cff1f814ca@sentry.sonarr.tv/9";
|
||||
? "https://b85aa82c65b84b0e99e3b7c281438357:392b5bc007974147a922c5d841c47cf9@sentry.Lidarr.tv/11"
|
||||
: "https://6168f0946aba4e60ac23e469ac08eac5:bd59e8454ccc454ea27a90cff1f814ca@sentry.Lidarr.tv/9";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
dsn = RuntimeInfo.IsProduction
|
||||
? "https://3e8a38b1a4df4de8b0453a724f5a1139:5a708dd75c724b32ae5128b6a895650f@sentry.sonarr.tv/8"
|
||||
: "https://4ee3580e01d8407c96a7430fbc953512:5f2d07227a0b4fde99dea07041a3ff93@sentry.sonarr.tv/10";
|
||||
? "https://3e8a38b1a4df4de8b0453a724f5a1139:5a708dd75c724b32ae5128b6a895650f@sentry.Lidarr.tv/8"
|
||||
: "https://4ee3580e01d8407c96a7430fbc953512:5f2d07227a0b4fde99dea07041a3ff93@sentry.Lidarr.tv/10";
|
||||
}
|
||||
|
||||
var target = new SentryTarget(dsn)
|
||||
|
@ -144,9 +144,9 @@ namespace NzbDrone.Common.Instrumentation
|
|||
|
||||
private static void RegisterAppFile(IAppFolderInfo appFolderInfo)
|
||||
{
|
||||
RegisterAppFile(appFolderInfo, "appFileInfo", "sonarr.txt", 5, LogLevel.Info);
|
||||
RegisterAppFile(appFolderInfo, "appFileDebug", "sonarr.debug.txt", 50, LogLevel.Off);
|
||||
RegisterAppFile(appFolderInfo, "appFileTrace", "sonarr.trace.txt", 50, LogLevel.Off);
|
||||
RegisterAppFile(appFolderInfo, "appFileInfo", "Lidarr.txt", 5, LogLevel.Info);
|
||||
RegisterAppFile(appFolderInfo, "appFileDebug", "Lidarr.debug.txt", 50, LogLevel.Off);
|
||||
RegisterAppFile(appFolderInfo, "appFileTrace", "Lidarr.trace.txt", 50, LogLevel.Off);
|
||||
}
|
||||
|
||||
private static void RegisterAppFile(IAppFolderInfo appFolderInfo, string name, string fileName, int maxArchiveFiles, LogLevel minLogLevel)
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace NzbDrone.Common.Instrumentation.Sentry
|
|||
|
||||
public SentryTarget(string dsn)
|
||||
{
|
||||
_client = new RavenClient(new Dsn(dsn), new SonarrJsonPacketFactory(), new SentryRequestFactory(), new MachineNameUserFactory())
|
||||
_client = new RavenClient(new Dsn(dsn), new LidarrJsonPacketFactory(), new SentryRequestFactory(), new MachineNameUserFactory())
|
||||
{
|
||||
Compression = true,
|
||||
Environment = RuntimeInfo.IsProduction ? "production" : "development",
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SharpRaven.Data;
|
||||
|
||||
namespace NzbDrone.Common.Instrumentation.Sentry
|
||||
{
|
||||
public class SonarrJsonPacketFactory : IJsonPacketFactory
|
||||
public class LidarrJsonPacketFactory : IJsonPacketFactory
|
||||
{
|
||||
private static string ShortenPath(string path)
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ namespace NzbDrone.Common.Instrumentation.Sentry
|
|||
|
||||
public JsonPacket Create(string project, SentryEvent @event)
|
||||
{
|
||||
var packet = new SonarrSentryPacket(project, @event);
|
||||
var packet = new LidarrSentryPacket(project, @event);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
using SharpRaven.Data;
|
||||
|
||||
namespace NzbDrone.Common.Instrumentation.Sentry
|
||||
{
|
||||
public class SonarrSentryPacket : JsonPacket
|
||||
public class LidarrSentryPacket : JsonPacket
|
||||
{
|
||||
private readonly JsonSerializerSettings _setting;
|
||||
|
||||
public SonarrSentryPacket(string project, SentryEvent @event) :
|
||||
public LidarrSentryPacket(string project, SentryEvent @event) :
|
||||
base(project, @event)
|
||||
{
|
||||
_setting = new JsonSerializerSettings
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
|||
// Gets updated at build time by TeamCity to branch name
|
||||
[assembly: AssemblyConfiguration("debug")]
|
||||
|
||||
[assembly: AssemblyCompany("sonarr.tv")]
|
||||
[assembly: AssemblyCompany("lidarr.tv")]
|
||||
[assembly: AssemblyProduct("NzbDrone")]
|
||||
[assembly: AssemblyCopyright("GNU General Public v3")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace NzbDrone.Console
|
|||
{
|
||||
System.Console.WriteLine("");
|
||||
System.Console.WriteLine("");
|
||||
Logger.Fatal(exception.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(exception.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");
|
||||
System.Console.WriteLine("Press enter to exit...");
|
||||
System.Console.ReadLine();
|
||||
Environment.Exit(1);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Console</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Console</AssemblyName>
|
||||
<AssemblyName>Lidarr.Console</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile>
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
|||
protected DownloadStationTask _multipleFilesCompleted;
|
||||
|
||||
protected string _serialNumber = "SERIALNUMBER";
|
||||
protected string _category = "sonarr";
|
||||
protected string _category ="lidarr";
|
||||
protected string _tvDirectory = @"video/Series";
|
||||
protected string _defaultDestination = "somepath";
|
||||
protected OsPath _physicalPath = new OsPath("/mnt/sdb1/mydata");
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
|||
protected DownloadStationTask _seeding;
|
||||
|
||||
protected string _serialNumber = "SERIALNUMBER";
|
||||
protected string _category = "sonarr";
|
||||
protected string _category = "lidarr";
|
||||
protected string _tvDirectory = @"video/Series";
|
||||
protected string _defaultDestination = "somepath";
|
||||
protected OsPath _physicalPath = new OsPath("/mnt/sdb1/mydata");
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.HadoukenTests
|
|||
DownloadedBytes = 0,
|
||||
Progress = 0.0,
|
||||
SavePath = "somepath",
|
||||
Label = "sonarr-tv"
|
||||
Label = "lidarr-music"
|
||||
};
|
||||
|
||||
_downloading = new HadoukenTorrent
|
||||
|
@ -50,7 +50,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.HadoukenTests
|
|||
DownloadedBytes = 100,
|
||||
Progress = 10.0,
|
||||
SavePath = "somepath",
|
||||
Label = "sonarr-tv"
|
||||
Label = "lidarr-music"
|
||||
};
|
||||
|
||||
_failed = new HadoukenTorrent
|
||||
|
@ -64,7 +64,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.HadoukenTests
|
|||
DownloadedBytes = 100,
|
||||
Progress = 10.0,
|
||||
SavePath = "somepath",
|
||||
Label = "sonarr-tv"
|
||||
Label = "lidarr-music"
|
||||
};
|
||||
|
||||
_completed = new HadoukenTorrent
|
||||
|
@ -77,7 +77,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.HadoukenTests
|
|||
DownloadedBytes = 1000,
|
||||
Progress = 100.0,
|
||||
SavePath = "somepath",
|
||||
Label = "sonarr-tv"
|
||||
Label = "lidarr-music"
|
||||
};
|
||||
|
||||
Mocker.GetMock<ITorrentFileInfoReader>()
|
||||
|
@ -235,7 +235,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.HadoukenTests
|
|||
DownloadedBytes = 1000,
|
||||
Progress = 100.0,
|
||||
SavePath = "somepath",
|
||||
Label = "sonarr-tv"
|
||||
Label = "lidarr-music"
|
||||
};
|
||||
|
||||
var torrents = new HadoukenTorrent[] { torrent };
|
||||
|
@ -262,7 +262,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.HadoukenTests
|
|||
DownloadedBytes = 1000,
|
||||
Progress = 100.0,
|
||||
SavePath = "somepath",
|
||||
Label = "sonarr-tv-other"
|
||||
Label = "lidarr-music-other"
|
||||
};
|
||||
|
||||
var torrents = new HadoukenTorrent[] { torrent };
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using FluentAssertions;
|
||||
|
@ -54,7 +54,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
|
|||
protected void GivenRedirectToTorrent()
|
||||
{
|
||||
var httpHeader = new HttpHeader();
|
||||
httpHeader["Location"] = "http://test.sonarr.tv/not-a-real-torrent.torrent";
|
||||
httpHeader["Location"] = "http://test.Lidarr.tv/not-a-real-torrent.torrent";
|
||||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(s => s.Get(It.Is<HttpRequest>(h => h.Url.FullUri == _downloadUrl)))
|
||||
|
@ -405,7 +405,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
|
|||
[Test]
|
||||
public void should_get_category_from_the_category_if_set()
|
||||
{
|
||||
const string category = "tv-sonarr";
|
||||
const string category = "music-lidarr";
|
||||
GivenMaxRatio(1.0f);
|
||||
|
||||
var torrent = new QBittorrentTorrent
|
||||
|
@ -430,7 +430,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
|
|||
[Test]
|
||||
public void should_get_category_from_the_label_if_the_category_is_not_available()
|
||||
{
|
||||
const string category = "tv-sonarr";
|
||||
const string category = "music-lidarr";
|
||||
GivenMaxRatio(1.0f);
|
||||
|
||||
var torrent = new QBittorrentTorrent
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
|
@ -75,7 +75,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
|||
id.Should().NotBeNullOrEmpty();
|
||||
|
||||
Mocker.GetMock<ITransmissionProxy>()
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/sonarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/Lidarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -91,7 +91,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
|||
id.Should().NotBeNullOrEmpty();
|
||||
|
||||
Mocker.GetMock<ITransmissionProxy>()
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/transmission/sonarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/transmission/Lidarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -109,7 +109,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
|||
id.Should().NotBeNullOrEmpty();
|
||||
|
||||
Mocker.GetMock<ITransmissionProxy>()
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/transmission/sonarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/transmission/Lidarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -205,7 +205,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
|||
{
|
||||
GivenTvCategory();
|
||||
|
||||
_downloading.DownloadDir = @"C:/Downloads/Finished/transmission/sonarr";
|
||||
_downloading.DownloadDir = @"C:/Downloads/Finished/transmission/Lidarr";
|
||||
|
||||
GivenTorrents(new List<TransmissionTorrent>
|
||||
{
|
||||
|
@ -224,7 +224,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
|||
{
|
||||
GivenTvDirectory();
|
||||
|
||||
_downloading.DownloadDir = @"C:/Downloads/Finished/sonarr/subdir";
|
||||
_downloading.DownloadDir = @"C:/Downloads/Finished/Lidarr/subdir";
|
||||
|
||||
GivenTorrents(new List<TransmissionTorrent>
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
|
@ -112,12 +112,12 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
|||
|
||||
protected void GivenTvCategory()
|
||||
{
|
||||
_settings.TvCategory = "sonarr";
|
||||
_settings.TvCategory = "Lidarr";
|
||||
}
|
||||
|
||||
protected void GivenTvDirectory()
|
||||
{
|
||||
_settings.TvDirectory = @"C:/Downloads/Finished/sonarr";
|
||||
_settings.TvDirectory = @"C:/Downloads/Finished/Lidarr";
|
||||
}
|
||||
|
||||
protected void GivenFailedDownload()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using FluentAssertions;
|
||||
|
@ -107,7 +107,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.UTorrentTests
|
|||
protected void GivenRedirectToTorrent()
|
||||
{
|
||||
var httpHeader = new HttpHeader();
|
||||
httpHeader["Location"] = "http://test.sonarr.tv/not-a-real-torrent.torrent";
|
||||
httpHeader["Location"] = "http://test.Lidarr.tv/not-a-real-torrent.torrent";
|
||||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(s => s.Get(It.Is<HttpRequest>(h => h.Url.ToString() == _downloadUrl)))
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
|||
id.Should().NotBeNullOrEmpty();
|
||||
|
||||
Mocker.GetMock<ITransmissionProxy>()
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/sonarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/Lidarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -93,7 +93,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
|||
id.Should().NotBeNullOrEmpty();
|
||||
|
||||
Mocker.GetMock<ITransmissionProxy>()
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/transmission/sonarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/transmission/Lidarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -111,7 +111,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
|||
id.Should().NotBeNullOrEmpty();
|
||||
|
||||
Mocker.GetMock<ITransmissionProxy>()
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/transmission/sonarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
.Verify(v => v.AddTorrentFromData(It.IsAny<byte[]>(), @"C:/Downloads/Finished/transmission/Lidarr", It.IsAny<TransmissionSettings>()), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -207,7 +207,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
|||
{
|
||||
GivenTvCategory();
|
||||
|
||||
_downloading.DownloadDir = @"C:/Downloads/Finished/transmission/sonarr";
|
||||
_downloading.DownloadDir = @"C:/Downloads/Finished/transmission/Lidarr";
|
||||
|
||||
GivenTorrents(new List<TransmissionTorrent>
|
||||
{
|
||||
|
@ -226,7 +226,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
|||
{
|
||||
GivenTvDirectory();
|
||||
|
||||
_downloading.DownloadDir = @"C:/Downloads/Finished/sonarr/subdir";
|
||||
_downloading.DownloadDir = @"C:/Downloads/Finished/Lidarr/subdir";
|
||||
|
||||
GivenTorrents(new List<TransmissionTorrent>
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace NzbDrone.Core.Test.Framework
|
|||
Mocker.SetConstant<CurlHttpDispatcher>(new CurlHttpDispatcher(Mocker.Resolve<IHttpProxySettingsProvider>(), Mocker.Resolve<UserAgentBuilder>(), Mocker.Resolve<NLog.Logger>()));
|
||||
Mocker.SetConstant<IHttpProvider>(new HttpProvider(TestLogger));
|
||||
Mocker.SetConstant<IHttpClient>(new HttpClient(new IHttpRequestInterceptor[0], Mocker.Resolve<CacheManager>(), Mocker.Resolve<RateLimitService>(), Mocker.Resolve<FallbackHttpDispatcher>(), Mocker.Resolve<UserAgentBuilder>(), TestLogger));
|
||||
Mocker.SetConstant<ISonarrCloudRequestBuilder>(new SonarrCloudRequestBuilder());
|
||||
Mocker.SetConstant<ILidarrCloudRequestBuilder>(new LidarrCloudRequestBuilder());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace NzbDrone.Core.Test.HealthCheck
|
|||
[TestFixture]
|
||||
public class HealthCheckFixture : CoreTest
|
||||
{
|
||||
private const string WikiRoot = "https://github.com/Sonarr/Sonarr/wiki/";
|
||||
private const string WikiRoot = "https://github.com/Lidarr/Lidarr/wiki/";
|
||||
|
||||
[TestCase("I blew up because of some weird user mistake", null, WikiRoot + "Health-checks#i-blew-up-because-of-some-weird-user-mistake")]
|
||||
[TestCase("I blew up because of some weird user mistake", "#my-health-check", WikiRoot + "Health-checks#my-health-check")]
|
||||
|
|
22
src/NzbDrone.Core.Test/License.txt
Normal file
22
src/NzbDrone.Core.Test/License.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
Copyright (c) 2010 Darren Cauthon
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -17,7 +17,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
|||
public void Setup()
|
||||
{
|
||||
_localEpisode = Builder<LocalEpisode>.CreateNew()
|
||||
.With(l => l.Path = @"C:\Test\Unsorted\Series.Title.S01E01.720p.HDTV-Sonarr\S01E05.mkv".AsOsAgnostic())
|
||||
.With(l => l.Path = @"C:\Test\Unsorted\Series.Title.S01E01.720p.HDTV-Lidarr\S01E05.mkv".AsOsAgnostic())
|
||||
.With(l => l.ParsedEpisodeInfo =
|
||||
Builder<ParsedEpisodeInfo>.CreateNew()
|
||||
.With(p => p.EpisodeNumbers = new[] {5})
|
||||
|
@ -54,7 +54,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
|||
public void should_be_accepted_if_file_and_folder_have_the_same_episode()
|
||||
{
|
||||
_localEpisode.ParsedEpisodeInfo.EpisodeNumbers = new[] { 1 };
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01.720p.HDTV-Sonarr\S01E01.mkv".AsOsAgnostic();
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01.720p.HDTV-Lidarr\S01E01.mkv".AsOsAgnostic();
|
||||
Subject.IsSatisfiedBy(_localEpisode).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
|
@ -62,14 +62,14 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
|||
public void should_be_accepted_if_file_is_one_episode_in_folder()
|
||||
{
|
||||
_localEpisode.ParsedEpisodeInfo.EpisodeNumbers = new[] { 1 };
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01E02.720p.HDTV-Sonarr\S01E01.mkv".AsOsAgnostic();
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01E02.720p.HDTV-Lidarr\S01E01.mkv".AsOsAgnostic();
|
||||
Subject.IsSatisfiedBy(_localEpisode).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_rejected_if_file_and_folder_do_not_have_same_episode()
|
||||
{
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01.720p.HDTV-Sonarr\S01E05.mkv".AsOsAgnostic();
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01.720p.HDTV-Lidarr\S01E05.mkv".AsOsAgnostic();
|
||||
Subject.IsSatisfiedBy(_localEpisode).Accepted.Should().BeFalse();
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
|||
public void should_be_rejected_if_file_and_folder_do_not_have_same_episodes()
|
||||
{
|
||||
_localEpisode.ParsedEpisodeInfo.EpisodeNumbers = new[] { 5, 6 };
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01E02.720p.HDTV-Sonarr\S01E05E06.mkv".AsOsAgnostic();
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01E02.720p.HDTV-Lidarr\S01E05E06.mkv".AsOsAgnostic();
|
||||
Subject.IsSatisfiedBy(_localEpisode).Accepted.Should().BeFalse();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
|||
.With(e => e.AbsoluteEpisodeNumber = 100)
|
||||
.Build();
|
||||
|
||||
_episodeFile = new EpisodeFile { Quality = new QualityModel(Quality.HDTV720p), ReleaseGroup = "SonarrTest" };
|
||||
_episodeFile = new EpisodeFile { Quality = new QualityModel(Quality.HDTV720p), ReleaseGroup = "LidarrTest" };
|
||||
|
||||
_namingConfig = NamingConfig.Default;
|
||||
_namingConfig.RenameEpisodes = true;
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
|||
.With(e => e.AbsoluteEpisodeNumber = 102)
|
||||
.Build();
|
||||
|
||||
_episodeFile = new EpisodeFile { Quality = new QualityModel(Quality.HDTV720p), ReleaseGroup = "SonarrTest" };
|
||||
_episodeFile = new EpisodeFile { Quality = new QualityModel(Quality.HDTV720p), ReleaseGroup = "LidarrTest" };
|
||||
|
||||
Mocker.GetMock<IQualityDefinitionService>()
|
||||
.Setup(v => v.Get(Moq.It.IsAny<Quality>()))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using FizzWare.NBuilder;
|
||||
|
@ -44,7 +44,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
|||
.With(e => e.AbsoluteEpisodeNumber = 100)
|
||||
.Build();
|
||||
|
||||
_episodeFile = new EpisodeFile { Quality = new QualityModel(Quality.HDTV720p), ReleaseGroup = "SonarrTest" };
|
||||
_episodeFile = new EpisodeFile { Quality = new QualityModel(Quality.HDTV720p), ReleaseGroup = "LidarrTest" };
|
||||
|
||||
Mocker.GetMock<IQualityDefinitionService>()
|
||||
.Setup(v => v.Get(Moq.It.IsAny<Quality>()))
|
||||
|
@ -672,7 +672,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
|||
_namingConfig.AnimeEpisodeFormat = "[{Release Group}]{Series.CleanTitle}.{absolute:000}";
|
||||
|
||||
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
||||
.Should().Be("[SonarrTest]South.Park.100");
|
||||
.Should().Be("[LidarrTest]South.Park.100");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -702,19 +702,19 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
|||
}
|
||||
|
||||
[Test]
|
||||
public void should_use_Sonarr_as_release_group_when_not_available()
|
||||
public void should_use_Lidarr_as_release_group_when_not_available()
|
||||
{
|
||||
_episodeFile.ReleaseGroup = null;
|
||||
_namingConfig.StandardEpisodeFormat = "{Release Group}";
|
||||
|
||||
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
||||
.Should().Be("Sonarr");
|
||||
.Should().Be("Lidarr");
|
||||
}
|
||||
|
||||
[TestCase("{Episode Title}{-Release Group}", "City Sushi")]
|
||||
[TestCase("{Episode Title}{ Release Group}", "City Sushi")]
|
||||
[TestCase("{Episode Title}{ [Release Group]}", "City Sushi")]
|
||||
public void should_not_use_Sonarr_as_release_group_if_pattern_has_separator(string pattern, string expectedFileName)
|
||||
public void should_not_use_Lidarr_as_release_group_if_pattern_has_separator(string pattern, string expectedFileName)
|
||||
{
|
||||
_episodeFile.ReleaseGroup = null;
|
||||
_namingConfig.StandardEpisodeFormat = pattern;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FizzWare.NBuilder;
|
||||
using FluentAssertions;
|
||||
|
@ -59,7 +59,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
|||
.With(e => e.AbsoluteEpisodeNumber = 102)
|
||||
.Build();
|
||||
|
||||
_episodeFile = new EpisodeFile { Quality = new QualityModel(Quality.HDTV720p), ReleaseGroup = "SonarrTest" };
|
||||
_episodeFile = new EpisodeFile { Quality = new QualityModel(Quality.HDTV720p), ReleaseGroup = "LidarrTest" };
|
||||
|
||||
Mocker.GetMock<IQualityDefinitionService>()
|
||||
.Setup(v => v.Get(Moq.It.IsAny<Quality>()))
|
||||
|
@ -149,7 +149,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
|||
_namingConfig.MultiEpisodeStyle = (int) MultiEpisodeStyle.Duplicate;
|
||||
|
||||
Subject.BuildFileName(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
||||
.Should().Be("South Park - S15E06 - S15E07 - (HDTV-720p, , SonarrTest) - City Sushi");
|
||||
.Should().Be("South Park - S15E06 - S15E07 - (HDTV-720p, , LidarrTest) - City Sushi");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
@ -41,14 +41,14 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
},
|
||||
new object[]
|
||||
{
|
||||
@"C:\Test\Weeds.S01E10.DVDRip.XviD-SONARR\AHFMZXGHEWD660.mkv".AsOsAgnostic(),
|
||||
@"C:\Test\Weeds.S01E10.DVDRip.XviD-Lidarr\AHFMZXGHEWD660.mkv".AsOsAgnostic(),
|
||||
"Weeds",
|
||||
Quality.DVD,
|
||||
"SONARR"
|
||||
"Lidarr"
|
||||
},
|
||||
new object[]
|
||||
{
|
||||
@"C:\Test\Deadwood.S02E12.1080p.BluRay.x264-SONARR\Backup_72023S02-12.mkv".AsOsAgnostic(),
|
||||
@"C:\Test\Deadwood.S02E12.1080p.BluRay.x264-Lidarr\Backup_72023S02-12.mkv".AsOsAgnostic(),
|
||||
"Deadwood",
|
||||
Quality.Bluray1080p,
|
||||
null
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace NzbDrone.Core.Test.UpdateTests
|
|||
_updatePackage = new UpdatePackage
|
||||
{
|
||||
FileName = "NzbDrone.develop.2.0.0.0.tar.gz",
|
||||
Url = "http://download.sonarr.tv/v2/develop/mono/NzbDrone.develop.tar.gz",
|
||||
Url = "http://download.Lidarr.tv/v2/develop/mono/NzbDrone.develop.tar.gz",
|
||||
Version = new Version("2.0.0.0")
|
||||
};
|
||||
}
|
||||
|
@ -46,14 +46,14 @@ namespace NzbDrone.Core.Test.UpdateTests
|
|||
_updatePackage = new UpdatePackage
|
||||
{
|
||||
FileName = "NzbDrone.develop.2.0.0.0.zip",
|
||||
Url = "http://download.sonarr.tv/v2/develop/windows/NzbDrone.develop.zip",
|
||||
Url = "http://download.Lidarr.tv/v2/develop/windows/NzbDrone.develop.zip",
|
||||
Version = new Version("2.0.0.0")
|
||||
};
|
||||
}
|
||||
|
||||
Mocker.GetMock<IAppFolderInfo>().SetupGet(c => c.TempFolder).Returns(TempFolder);
|
||||
Mocker.GetMock<IAppFolderInfo>().SetupGet(c => c.StartUpFolder).Returns(@"C:\NzbDrone".AsOsAgnostic);
|
||||
Mocker.GetMock<IAppFolderInfo>().SetupGet(c => c.AppDataFolder).Returns(@"C:\ProgramData\NzbDrone".AsOsAgnostic);
|
||||
Mocker.GetMock<IAppFolderInfo>().SetupGet(c => c.StartUpFolder).Returns(@"C:\Lidarr".AsOsAgnostic);
|
||||
Mocker.GetMock<IAppFolderInfo>().SetupGet(c => c.AppDataFolder).Returns(@"C:\ProgramData\Lidarr".AsOsAgnostic);
|
||||
|
||||
Mocker.GetMock<ICheckUpdateService>().Setup(c => c.AvailableUpdate()).Returns(_updatePackage);
|
||||
Mocker.GetMock<IVerifyUpdates>().Setup(c => c.Verify(It.IsAny<UpdatePackage>(), It.IsAny<string>())).Returns(true);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
@ -304,12 +304,12 @@ namespace NzbDrone.Core.Configuration
|
|||
|
||||
if (contents.IsNullOrWhiteSpace())
|
||||
{
|
||||
throw new InvalidConfigFileException($"{_configFile} is empty. Please delete the config file and Sonarr will recreate it.");
|
||||
throw new InvalidConfigFileException($"{_configFile} is empty. Please delete the config file and Lidarr will recreate it.");
|
||||
}
|
||||
|
||||
if (contents.All(char.IsControl))
|
||||
{
|
||||
throw new InvalidConfigFileException($"{_configFile} is corrupt. Please delete the config file and Sonarr will recreate it.");
|
||||
throw new InvalidConfigFileException($"{_configFile} is corrupt. Please delete the config file and Lidarr will recreate it.");
|
||||
}
|
||||
|
||||
return XDocument.Parse(_diskProvider.ReadAllText(_configFile));
|
||||
|
@ -324,7 +324,7 @@ namespace NzbDrone.Core.Configuration
|
|||
|
||||
catch (XmlException ex)
|
||||
{
|
||||
throw new InvalidConfigFileException($"{_configFile} is corrupt is invalid. Please delete the config file and Sonarr will recreate it.", ex);
|
||||
throw new InvalidConfigFileException($"{_configFile} is corrupt is invalid. Please delete the config file and Lidarr will recreate it.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
|
@ -18,7 +18,7 @@ namespace NzbDrone.Core.DataAugmentation.DailySeries
|
|||
private readonly IHttpRequestBuilderFactory _requestBuilder;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public DailySeriesDataProxy(IHttpClient httpClient, ISonarrCloudRequestBuilder requestBuilder, Logger logger)
|
||||
public DailySeriesDataProxy(IHttpClient httpClient, ILidarrCloudRequestBuilder requestBuilder, Logger logger)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
_requestBuilder = requestBuilder.Services;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Common.Cloud;
|
||||
using NzbDrone.Common.Http;
|
||||
|
||||
|
@ -14,7 +14,7 @@ namespace NzbDrone.Core.DataAugmentation.Scene
|
|||
private readonly IHttpClient _httpClient;
|
||||
private readonly IHttpRequestBuilderFactory _requestBuilder;
|
||||
|
||||
public SceneMappingProxy(IHttpClient httpClient, ISonarrCloudRequestBuilder requestBuilder)
|
||||
public SceneMappingProxy(IHttpClient httpClient, ILidarrCloudRequestBuilder requestBuilder)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
_requestBuilder = requestBuilder.Services;
|
||||
|
|
|
@ -110,10 +110,10 @@ namespace NzbDrone.Core.Datastore
|
|||
{
|
||||
if (OsInfo.IsOsx)
|
||||
{
|
||||
throw new CorruptDatabaseException("Database file: {0} is corrupt, restore from backup if available. See: https://github.com/Sonarr/Sonarr/wiki/FAQ#i-use-sonarr-on-a-mac-and-it-suddenly-stopped-working-what-happened", ex, fileName);
|
||||
throw new CorruptDatabaseException("Database file: {0} is corrupt, restore from backup if available. See: https://github.com/Lidarr/Lidarr/wiki/FAQ#i-use-Lidarr-on-a-mac-and-it-suddenly-stopped-working-what-happened", ex, fileName);
|
||||
}
|
||||
|
||||
throw new CorruptDatabaseException("Database file: {0} is corrupt, restore from backup if available. See: https://github.com/Sonarr/Sonarr/wiki/FAQ#i-am-getting-an-error-database-disk-image-is-malformed", ex, fileName);
|
||||
throw new CorruptDatabaseException("Database file: {0} is corrupt, restore from backup if available. See: https://github.com/Lidarr/Lidarr/wiki/FAQ#i-am-getting-an-error-database-disk-image-is-malformed", ex, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
// Delete extraneous files without extensions that Sonarr found previously,
|
||||
// Delete extraneous files without extensions that Lidarr found previously,
|
||||
// these will be blocked from importing as well.
|
||||
Execute.Sql("DELETE FROM ExtraFiles WHERE TRIM(Extension) = ''");
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
|||
{
|
||||
DownloadClient = Definition.Name,
|
||||
DownloadId = Definition.Name + "_" + item.DownloadId,
|
||||
Category = "sonarr",
|
||||
Category = "Lidarr",
|
||||
Title = item.Title,
|
||||
|
||||
TotalSize = item.TotalSize,
|
||||
|
|
|
@ -26,10 +26,10 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
|||
|
||||
private static readonly TorrentBlackholeSettingsValidator Validator = new TorrentBlackholeSettingsValidator();
|
||||
|
||||
[FieldDefinition(0, Label = "Torrent Folder", Type = FieldType.Path, HelpText = "Folder in which Sonarr will store the .torrent file")]
|
||||
[FieldDefinition(0, Label = "Torrent Folder", Type = FieldType.Path, HelpText = "Folder in which Lidarr will store the .torrent file")]
|
||||
public string TorrentFolder { get; set; }
|
||||
|
||||
[FieldDefinition(1, Label = "Watch Folder", Type = FieldType.Path, HelpText = "Folder from which Sonarr should import completed downloads")]
|
||||
[FieldDefinition(1, Label = "Watch Folder", Type = FieldType.Path, HelpText = "Folder from which Lidarr should import completed downloads")]
|
||||
public string WatchFolder { get; set; }
|
||||
|
||||
[DefaultValue(false)]
|
||||
|
@ -39,7 +39,7 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
|||
|
||||
[DefaultValue(false)]
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||
[FieldDefinition(3, Label = "Read Only", Type = FieldType.Checkbox, HelpText = "Instead of moving files this will instruct Sonarr to Copy or Hardlink (depending on settings/system configuration)")]
|
||||
[FieldDefinition(3, Label = "Read Only", Type = FieldType.Checkbox, HelpText = "Instead of moving files this will instruct Lidarr to Copy or Hardlink (depending on settings/system configuration)")]
|
||||
public bool ReadOnly { get; set; }
|
||||
|
||||
public NzbDroneValidationResult Validate()
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
|||
{
|
||||
DownloadClient = Definition.Name,
|
||||
DownloadId = Definition.Name + "_" + item.DownloadId,
|
||||
Category = "sonarr",
|
||||
Category = "Lidarr",
|
||||
Title = item.Title,
|
||||
|
||||
TotalSize = item.TotalSize,
|
||||
|
|
|
@ -19,10 +19,10 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
|
|||
{
|
||||
private static readonly UsenetBlackholeSettingsValidator Validator = new UsenetBlackholeSettingsValidator();
|
||||
|
||||
[FieldDefinition(0, Label = "Nzb Folder", Type = FieldType.Path, HelpText = "Folder in which Sonarr will store the .nzb file")]
|
||||
[FieldDefinition(0, Label = "Nzb Folder", Type = FieldType.Path, HelpText = "Folder in which Lidarr will store the .nzb file")]
|
||||
public string NzbFolder { get; set; }
|
||||
|
||||
[FieldDefinition(1, Label = "Watch Folder", Type = FieldType.Path, HelpText = "Folder from which Sonarr should import completed downloads")]
|
||||
[FieldDefinition(1, Label = "Watch Folder", Type = FieldType.Path, HelpText = "Folder from which Lidarr should import completed downloads")]
|
||||
public string WatchFolder { get; set; }
|
||||
|
||||
public NzbDroneValidationResult Validate()
|
||||
|
|
|
@ -262,7 +262,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
|||
{
|
||||
return new NzbDroneValidationFailure("TvCategory", "Configuration of label failed")
|
||||
{
|
||||
DetailedDescription = "Sonarr as unable to add the label to Deluge."
|
||||
DetailedDescription = "Lidarr as unable to add the label to Deluge."
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
|||
Host = "localhost";
|
||||
Port = 8112;
|
||||
Password = "deluge";
|
||||
TvCategory = "tv-sonarr";
|
||||
TvCategory = "tv-Lidarr";
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Host", Type = FieldType.Textbox)]
|
||||
|
@ -40,7 +40,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
|||
[FieldDefinition(3, Label = "Password", Type = FieldType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[FieldDefinition(4, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Sonarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
[FieldDefinition(4, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Lidarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
public string TvCategory { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Recent Priority", Type = FieldType.Select, SelectOptions = typeof(DelugePriority), HelpText = "Priority to use when grabbing episodes that aired within the last 14 days")]
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
|
|||
[FieldDefinition(3, Label = "Password", Type = FieldType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[FieldDefinition(4, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Sonarr avoids conflicts with unrelated downloads, but it's optional. Creates a [category] subdirectory in the output directory.")]
|
||||
[FieldDefinition(4, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Lidarr avoids conflicts with unrelated downloads, but it's optional. Creates a [category] subdirectory in the output directory.")]
|
||||
public string TvCategory { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Directory", Type = FieldType.Textbox, HelpText = "Optional shared folder to put downloads into, leave blank to use the default Download Station location")]
|
||||
|
|
|
@ -335,7 +335,7 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
|
|||
_logger.Error(ex, ex.Message);
|
||||
return new NzbDroneValidationFailure("Username", "Authentication failure")
|
||||
{
|
||||
DetailedDescription = $"Please verify your username and password. Also verify if the host running Sonarr isn't blocked from accessing {Name} by WhiteList limitations in the {Name} configuration."
|
||||
DetailedDescription = $"Please verify your username and password. Also verify if the host running Lidarr isn't blocked from accessing {Name} by WhiteList limitations in the {Name} configuration."
|
||||
};
|
||||
}
|
||||
catch (WebException ex)
|
||||
|
|
|
@ -254,7 +254,7 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
|
|||
_logger.Error(ex, ex.Message);
|
||||
return new NzbDroneValidationFailure("Username", "Authentication failure")
|
||||
{
|
||||
DetailedDescription = $"Please verify your username and password. Also verify if the host running Sonarr isn't blocked from accessing {Name} by WhiteList limitations in the {Name} configuration."
|
||||
DetailedDescription = $"Please verify your username and password. Also verify if the host running Lidarr isn't blocked from accessing {Name} by WhiteList limitations in the {Name} configuration."
|
||||
};
|
||||
}
|
||||
catch (WebException ex)
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
|||
{
|
||||
Host = "localhost";
|
||||
Port = 7070;
|
||||
Category = "sonarr-tv";
|
||||
Category = "Lidarr-tv";
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Host", Type = FieldType.Textbox)]
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
|
|||
[FieldDefinition(2, Label = "API Key", Type = FieldType.Textbox)]
|
||||
public string ApiKey { get; set; }
|
||||
|
||||
[FieldDefinition(3, Label = "Group", Type = FieldType.Textbox, HelpText = "Adding a category specific to Sonarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
[FieldDefinition(3, Label = "Group", Type = FieldType.Textbox, HelpText = "Adding a category specific to Lidarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
public string TvCategory { get; set; }
|
||||
|
||||
[FieldDefinition(4, Label = "Recent Priority", Type = FieldType.Select, SelectOptions = typeof(NzbVortexPriority), HelpText = "Priority to use when grabbing episodes that aired within the last 14 days")]
|
||||
|
|
|
@ -319,7 +319,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
|||
return new NzbDroneValidationFailure(string.Empty, "NzbGet setting KeepHistory should be greater than 0")
|
||||
{
|
||||
InfoLink = string.Format("http://{0}:{1}/", Settings.Host, Settings.Port),
|
||||
DetailedDescription = "NzbGet setting KeepHistory is set to 0. Which prevents Sonarr from seeing completed downloads."
|
||||
DetailedDescription = "NzbGet setting KeepHistory is set to 0. Which prevents Lidarr from seeing completed downloads."
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
|||
|
||||
if (id.Length < 10 && int.TryParse(id, out nzbId))
|
||||
{
|
||||
// Download wasn't grabbed by Sonarr, so the id is the NzbId reported by nzbget.
|
||||
// Download wasn't grabbed by Lidarr, so the id is the NzbId reported by nzbget.
|
||||
queueItem = queue.SingleOrDefault(h => h.NzbId == nzbId);
|
||||
historyItem = history.SingleOrDefault(h => h.Id == nzbId);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
|||
[FieldDefinition(3, Label = "Password", Type = FieldType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[FieldDefinition(4, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Sonarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
[FieldDefinition(4, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Lidarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
public string TvCategory { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Recent Priority", Type = FieldType.Select, SelectOptions = typeof(NzbgetPriority), HelpText = "Priority to use when grabbing episodes that aired within the last 14 days")]
|
||||
|
|
|
@ -210,7 +210,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
|||
return new NzbDroneValidationFailure("TvCategory", "Category is recommended")
|
||||
{
|
||||
IsWarning = true,
|
||||
DetailedDescription = "Sonarr will not attempt to import completed downloads without a category."
|
||||
DetailedDescription = "Lidarr will not attempt to import completed downloads without a category."
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
|||
{
|
||||
return new NzbDroneValidationFailure(String.Empty, "QBittorrent is configured to remove torrents when they reach their Share Ratio Limit")
|
||||
{
|
||||
DetailedDescription = "Sonarr will be unable to perform Completed Download Handling as configured. You can fix this in qBittorrent ('Tools -> Options...' in the menu) by changing 'Options -> BitTorrent -> Share Ratio Limiting' from 'Remove them' to 'Pause them'."
|
||||
DetailedDescription = "Lidarr will be unable to perform Completed Download Handling as configured. You can fix this in qBittorrent ('Tools -> Options...' in the menu) by changing 'Options -> BitTorrent -> Share Ratio Limiting' from 'Remove them' to 'Pause them'."
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
|||
{
|
||||
Host = "localhost";
|
||||
Port = 9091;
|
||||
TvCategory = "tv-sonarr";
|
||||
TvCategory = "tv-Lidarr";
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Host", Type = FieldType.Textbox)]
|
||||
|
@ -37,7 +37,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
|||
[FieldDefinition(3, Label = "Password", Type = FieldType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[FieldDefinition(4, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Sonarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
[FieldDefinition(4, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Lidarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
public string TvCategory { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Recent Priority", Type = FieldType.Select, SelectOptions = typeof(QBittorrentPriority), HelpText = "Priority to use when grabbing episodes that aired within the last 14 days")]
|
||||
|
|
|
@ -364,7 +364,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
|||
return new NzbDroneValidationFailure("Version", "Sabnzbd develop version, assuming version 1.1.0 or higher.")
|
||||
{
|
||||
IsWarning = true,
|
||||
DetailedDescription = "Sonarr may not be able to support new features added to SABnzbd when running develop versions."
|
||||
DetailedDescription = "Lidarr may not be able to support new features added to SABnzbd when running develop versions."
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
|||
return new NzbDroneValidationFailure("", "Disable 'Check before download' option in Sabnbzd")
|
||||
{
|
||||
InfoLink = string.Format("http://{0}:{1}/sabnzbd/config/switches/", Settings.Host, Settings.Port),
|
||||
DetailedDescription = "Using Check before download affects Sonarr ability to track new downloads. Also Sabnzbd recommends 'Abort jobs that cannot be completed' instead since it's more effective."
|
||||
DetailedDescription = "Using Check before download affects Lidarr ability to track new downloads. Also Sabnzbd recommends 'Abort jobs that cannot be completed' instead since it's more effective."
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -436,7 +436,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
|||
return new NzbDroneValidationFailure("TvCategory", "Enable Job folders")
|
||||
{
|
||||
InfoLink = string.Format("http://{0}:{1}/sabnzbd/config/categories/", Settings.Host, Settings.Port),
|
||||
DetailedDescription = "Sonarr prefers each download to have a separate folder. With * appended to the Folder/Path Sabnzbd will not create these job folders. Go to Sabnzbd to fix it."
|
||||
DetailedDescription = "Lidarr prefers each download to have a separate folder. With * appended to the Folder/Path Sabnzbd will not create these job folders. Go to Sabnzbd to fix it."
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -456,7 +456,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
|||
return new NzbDroneValidationFailure("TvCategory", "Disable TV Sorting")
|
||||
{
|
||||
InfoLink = string.Format("http://{0}:{1}/sabnzbd/config/sorting/", Settings.Host, Settings.Port),
|
||||
DetailedDescription = "You must disable Sabnzbd TV Sorting for the category Sonarr uses to prevent import issues. Go to Sabnzbd to fix it."
|
||||
DetailedDescription = "You must disable Sabnzbd TV Sorting for the category Lidarr uses to prevent import issues. Go to Sabnzbd to fix it."
|
||||
};
|
||||
}
|
||||
if (config.Misc.enable_movie_sorting && ContainsCategory(config.Misc.movie_categories, Settings.TvCategory))
|
||||
|
@ -464,7 +464,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
|||
return new NzbDroneValidationFailure("TvCategory", "Disable Movie Sorting")
|
||||
{
|
||||
InfoLink = string.Format("http://{0}:{1}/sabnzbd/config/sorting/", Settings.Host, Settings.Port),
|
||||
DetailedDescription = "You must disable Sabnzbd Movie Sorting for the category Sonarr uses to prevent import issues. Go to Sabnzbd to fix it."
|
||||
DetailedDescription = "You must disable Sabnzbd Movie Sorting for the category Lidarr uses to prevent import issues. Go to Sabnzbd to fix it."
|
||||
};
|
||||
}
|
||||
if (config.Misc.enable_date_sorting && ContainsCategory(config.Misc.date_categories, Settings.TvCategory))
|
||||
|
@ -472,7 +472,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
|||
return new NzbDroneValidationFailure("TvCategory", "Disable Date Sorting")
|
||||
{
|
||||
InfoLink = string.Format("http://{0}:{1}/sabnzbd/config/sorting/", Settings.Host, Settings.Port),
|
||||
DetailedDescription = "You must disable Sabnzbd Date Sorting for the category Sonarr uses to prevent import issues. Go to Sabnzbd to fix it."
|
||||
DetailedDescription = "You must disable Sabnzbd Date Sorting for the category Lidarr uses to prevent import issues. Go to Sabnzbd to fix it."
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
|||
[FieldDefinition(4, Label = "Password", Type = FieldType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Sonarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
[FieldDefinition(5, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Lidarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
public string TvCategory { get; set; }
|
||||
|
||||
[FieldDefinition(6, Label = "Recent Priority", Type = FieldType.Select, SelectOptions = typeof(SabnzbdPriority), HelpText = "Priority to use when grabbing episodes that aired within the last 14 days")]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
|
@ -207,7 +207,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
|||
_logger.Error(ex);
|
||||
return new NzbDroneValidationFailure("Username", "Authentication failure")
|
||||
{
|
||||
DetailedDescription = string.Format("Please verify your username and password. Also verify if the host running Sonarr isn't blocked from accessing {0} by WhiteList limitations in the {0} configuration.", Name)
|
||||
DetailedDescription = string.Format("Please verify your username and password. Also verify if the host running Lidarr isn't blocked from accessing {0} by WhiteList limitations in the {0} configuration.", Name)
|
||||
};
|
||||
}
|
||||
catch (WebException ex)
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
|||
[FieldDefinition(4, Label = "Password", Type = FieldType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Sonarr avoids conflicts with unrelated downloads, but it's optional. Creates a [category] subdirectory in the output directory.")]
|
||||
[FieldDefinition(5, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Lidarr avoids conflicts with unrelated downloads, but it's optional. Creates a [category] subdirectory in the output directory.")]
|
||||
public string TvCategory { get; set; }
|
||||
|
||||
[FieldDefinition(6, Label = "Directory", Type = FieldType.Textbox, Advanced = true, HelpText = "Optional location to put downloads in, leave blank to use the default Transmission location")]
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
|
|||
|
||||
public override string Name => "rTorrent";
|
||||
|
||||
public override ProviderMessage Message => new ProviderMessage("Sonarr is unable to remove torrents that have finished seeding when using rTorrent", ProviderMessageType.Warning);
|
||||
public override ProviderMessage Message => new ProviderMessage("Lidarr is unable to remove torrents that have finished seeding when using rTorrent", ProviderMessageType.Warning);
|
||||
|
||||
public override IEnumerable<DownloadClientItem> GetItems()
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
|
|||
Host = "localhost";
|
||||
Port = 8080;
|
||||
UrlBase = "RPC2";
|
||||
TvCategory = "tv-sonarr";
|
||||
TvCategory = "tv-Lidarr";
|
||||
OlderTvPriority = (int)RTorrentPriority.Normal;
|
||||
RecentTvPriority = (int)RTorrentPriority.Normal;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
|
|||
[FieldDefinition(5, Label = "Password", Type = FieldType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[FieldDefinition(6, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Sonarr avoids conflicts with unrelated downloads, but it's optional.")]
|
||||
[FieldDefinition(6, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Lidarr avoids conflicts with unrelated downloads, but it's optional.")]
|
||||
public string TvCategory { get; set; }
|
||||
|
||||
[FieldDefinition(7, Label = "Directory", Type = FieldType.Textbox, Advanced = true, HelpText = "Optional location to put downloads in, leave blank to use the default rTorrent location")]
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
|
|||
{
|
||||
Host = "localhost";
|
||||
Port = 9091;
|
||||
TvCategory = "tv-sonarr";
|
||||
TvCategory = "tv-Lidarr";
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Host", Type = FieldType.Textbox)]
|
||||
|
@ -38,7 +38,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
|
|||
[FieldDefinition(3, Label = "Password", Type = FieldType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[FieldDefinition(4, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Sonarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
[FieldDefinition(4, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Lidarr avoids conflicts with unrelated downloads, but it's optional")]
|
||||
public string TvCategory { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Recent Priority", Type = FieldType.Select, SelectOptions = typeof(UTorrentPriority), HelpText = "Priority to use when grabbing episodes that aired within the last 14 days")]
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace NzbDrone.Core.Download
|
|||
|
||||
if (historyItem == null && trackedDownload.DownloadItem.Category.IsNullOrWhiteSpace())
|
||||
{
|
||||
trackedDownload.Warn("Download wasn't grabbed by Sonarr and not in a category, Skipping.");
|
||||
trackedDownload.Warn("Download wasn't grabbed by Lidarr and not in a category, Skipping.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ namespace NzbDrone.Core.Download
|
|||
{
|
||||
return new NzbDroneValidationFailure(propertyName, "Folder does not exist")
|
||||
{
|
||||
DetailedDescription = string.Format("The folder you specified does not exist or is inaccessible. Please verify the folder permissions for the user account '{0}', which is used to execute Sonarr.", Environment.UserName)
|
||||
DetailedDescription = string.Format("The folder you specified does not exist or is inaccessible. Please verify the folder permissions for the user account '{0}', which is used to execute Lidarr.", Environment.UserName)
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ namespace NzbDrone.Core.Download
|
|||
_logger.Error("Folder '{0}' is not writable.", folder);
|
||||
return new NzbDroneValidationFailure(propertyName, "Unable to write to folder")
|
||||
{
|
||||
DetailedDescription = string.Format("The folder you specified is not writable. Please verify the folder permissions for the user account '{0}', which is used to execute Sonarr.", Environment.UserName)
|
||||
DetailedDescription = string.Format("The folder you specified is not writable. Please verify the folder permissions for the user account '{0}', which is used to execute Lidarr.", Environment.UserName)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace NzbDrone.Core.Download
|
|||
|
||||
if (grabbedItems.Empty())
|
||||
{
|
||||
trackedDownload.Warn("Download wasn't grabbed by sonarr, skipping");
|
||||
trackedDownload.Warn("Download wasn't grabbed by Lidarr, skipping");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ namespace NzbDrone.Core.Download
|
|||
if (actualHash.IsNotNullOrWhiteSpace() && hash != actualHash)
|
||||
{
|
||||
_logger.Debug(
|
||||
"{0} did not return the expected InfoHash for '{1}', Sonarr could potentially lose track of the download in progress.",
|
||||
"{0} did not return the expected InfoHash for '{1}', Lidarr could potentially lose track of the download in progress.",
|
||||
Definition.Implementation, remoteEpisode.Release.DownloadUrl);
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ namespace NzbDrone.Core.Download
|
|||
if (actualHash.IsNotNullOrWhiteSpace() && hash != actualHash)
|
||||
{
|
||||
_logger.Debug(
|
||||
"{0} did not return the expected InfoHash for '{1}', Sonarr could potentially lose track of the download in progress.",
|
||||
"{0} did not return the expected InfoHash for '{1}', Lidarr could potentially lose track of the download in progress.",
|
||||
Definition.Implementation, remoteEpisode.Release.DownloadUrl);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||
|
||||
if (enabled.Empty())
|
||||
{
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Error, "No indexers available with RSS sync enabled, Sonarr will not grab new releases automatically");
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Error, "No indexers available with RSS sync enabled, Lidarr will not grab new releases automatically");
|
||||
}
|
||||
|
||||
var active = _indexerFactory.RssEnabled(true);
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||
|
||||
if (enabled.Empty())
|
||||
{
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Warning, "No indexers available with Search enabled, Sonarr will not provide any search results");
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Warning, "No indexers available with Search enabled, Lidarr will not provide any search results");
|
||||
}
|
||||
|
||||
var active = _indexerFactory.SearchEnabled(true);
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||
|
||||
private readonly IHttpRequestBuilderFactory _cloudRequestBuilder;
|
||||
|
||||
public ProxyCheck(ISonarrCloudRequestBuilder cloudRequestBuilder, IConfigService configService, IHttpClient client, Logger logger)
|
||||
public ProxyCheck(ILidarrCloudRequestBuilder cloudRequestBuilder, IConfigService configService, IHttpClient client, Logger logger)
|
||||
{
|
||||
_configService = configService;
|
||||
_client = client;
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace NzbDrone.Core.HealthCheck
|
|||
|
||||
private static HttpUri MakeWikiUrl(string fragment)
|
||||
{
|
||||
return new HttpUri("https://github.com/Sonarr/Sonarr/wiki/Health-checks") + new HttpUri(fragment);
|
||||
return new HttpUri("https://github.com/Lidarr/Lidarr/wiki/Health-checks") + new HttpUri(fragment);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace NzbDrone.Core.Indexers.Newznab
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex, "Failed to determine newznab api capabilities for {0}, using the defaults instead till Sonarr restarts.", indexerSettings.Url);
|
||||
_logger.Error(ex, "Failed to determine newznab api capabilities for {0}, using the defaults instead till Lidarr restarts.", indexerSettings.Url);
|
||||
}
|
||||
|
||||
return capabilities;
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace NzbDrone.Core.Indexers.Rarbg
|
|||
requestBuilder.AddQueryParam("limit", "100");
|
||||
requestBuilder.AddQueryParam("token", _tokenProvider.GetToken(Settings));
|
||||
requestBuilder.AddQueryParam("format", "json_extended");
|
||||
requestBuilder.AddQueryParam("app_id", "Sonarr");
|
||||
requestBuilder.AddQueryParam("app_id", "Lidarr");
|
||||
|
||||
yield return new IndexerRequest(requestBuilder.Build());
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Cache;
|
||||
|
@ -31,7 +31,7 @@ namespace NzbDrone.Core.Indexers.Rarbg
|
|||
{
|
||||
var requestBuilder = new HttpRequestBuilder(settings.BaseUrl.Trim('/'))
|
||||
.WithRateLimit(3.0)
|
||||
.Resource("/pubapi_v2.php?get_token=get_token&app_id=Sonarr")
|
||||
.Resource("/pubapi_v2.php?get_token=get_token&app_id=Lidarr")
|
||||
.Accept(HttpAccept.Json);
|
||||
|
||||
if (settings.CaptchaToken.IsNotNullOrWhiteSpace())
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||
return ProcessFile(fileInfo, importMode, series, downloadClientItem);
|
||||
}
|
||||
|
||||
_logger.Error("Import failed, path does not exist or is not accessible by Sonarr: {0}", path);
|
||||
_logger.Error("Import failed, path does not exist or is not accessible by Lidarr: {0}", path);
|
||||
return new List<ImportResult>();
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
|||
|
||||
private readonly IHttpRequestBuilderFactory _requestBuilder;
|
||||
|
||||
public SkyHookProxy(IHttpClient httpClient, ISonarrCloudRequestBuilder requestBuilder, Logger logger)
|
||||
public SkyHookProxy(IHttpClient httpClient, ILidarrCloudRequestBuilder requestBuilder, Logger logger)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
_requestBuilder = requestBuilder.SkyHookTvdb;
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace NzbDrone.Core.Notifications.Boxcar
|
|||
try
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Lidarr";
|
||||
|
||||
SendNotification(title, body, settings);
|
||||
return null;
|
||||
|
@ -75,8 +75,8 @@ namespace NzbDrone.Core.Notifications.Boxcar
|
|||
request.AddParameter("user_credentials", settings.Token);
|
||||
request.AddParameter("notification[title]", title);
|
||||
request.AddParameter("notification[long_message]", message);
|
||||
request.AddParameter("notification[source_name]", "Sonarr");
|
||||
request.AddParameter("notification[icon_url]", "https://raw.githubusercontent.com/Sonarr/Sonarr/7818f0c59b787312f0bcbc5c0eafc3c9dd7e5451/Logo/64.png");
|
||||
request.AddParameter("notification[source_name]", "Lidarr");
|
||||
request.AddParameter("notification[icon_url]", "https://raw.githubusercontent.com/Lidarr/Lidarr/7818f0c59b787312f0bcbc5c0eafc3c9dd7e5451/Logo/64.png");
|
||||
|
||||
client.ExecuteAndValidate(request);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|||
|
||||
public override string Name => "Custom Script";
|
||||
|
||||
public override string Link => "https://github.com/Sonarr/Sonarr/wiki/Custom-Post-Processing-Scripts";
|
||||
public override string Link => "https://github.com/Lidarr/Lidarr/wiki/Custom-Post-Processing-Scripts";
|
||||
|
||||
public override void OnGrab(GrabMessage message)
|
||||
{
|
||||
|
@ -35,18 +35,18 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|||
var releaseGroup = remoteEpisode.ParsedEpisodeInfo.ReleaseGroup;
|
||||
var environmentVariables = new StringDictionary();
|
||||
|
||||
environmentVariables.Add("Sonarr_EventType", "Grab");
|
||||
environmentVariables.Add("Sonarr_Series_Id", series.Id.ToString());
|
||||
environmentVariables.Add("Sonarr_Series_Title", series.Title);
|
||||
environmentVariables.Add("Sonarr_Series_TvdbId", series.TvdbId.ToString());
|
||||
environmentVariables.Add("Sonarr_Series_Type", series.SeriesType.ToString());
|
||||
environmentVariables.Add("Sonarr_Release_EpisodeCount", remoteEpisode.Episodes.Count.ToString());
|
||||
environmentVariables.Add("Sonarr_Release_SeasonNumber", remoteEpisode.ParsedEpisodeInfo.SeasonNumber.ToString());
|
||||
environmentVariables.Add("Sonarr_Release_EpisodeNumbers", string.Join(",", remoteEpisode.Episodes.Select(e => e.EpisodeNumber)));
|
||||
environmentVariables.Add("Sonarr_Release_Title", remoteEpisode.Release.Title);
|
||||
environmentVariables.Add("Sonarr_Release_Indexer", remoteEpisode.Release.Indexer);
|
||||
environmentVariables.Add("Sonarr_Release_Size", remoteEpisode.Release.Size.ToString());
|
||||
environmentVariables.Add("Sonarr_Release_ReleaseGroup", releaseGroup);
|
||||
environmentVariables.Add("Lidarr_EventType", "Grab");
|
||||
environmentVariables.Add("Lidarr_Series_Id", series.Id.ToString());
|
||||
environmentVariables.Add("Lidarr_Series_Title", series.Title);
|
||||
environmentVariables.Add("Lidarr_Series_TvdbId", series.TvdbId.ToString());
|
||||
environmentVariables.Add("Lidarr_Series_Type", series.SeriesType.ToString());
|
||||
environmentVariables.Add("Lidarr_Release_EpisodeCount", remoteEpisode.Episodes.Count.ToString());
|
||||
environmentVariables.Add("Lidarr_Release_SeasonNumber", remoteEpisode.ParsedEpisodeInfo.SeasonNumber.ToString());
|
||||
environmentVariables.Add("Lidarr_Release_EpisodeNumbers", string.Join(",", remoteEpisode.Episodes.Select(e => e.EpisodeNumber)));
|
||||
environmentVariables.Add("Lidarr_Release_Title", remoteEpisode.Release.Title);
|
||||
environmentVariables.Add("Lidarr_Release_Indexer", remoteEpisode.Release.Indexer);
|
||||
environmentVariables.Add("Lidarr_Release_Size", remoteEpisode.Release.Size.ToString());
|
||||
environmentVariables.Add("Lidarr_Release_ReleaseGroup", releaseGroup);
|
||||
|
||||
ExecuteScript(environmentVariables);
|
||||
}
|
||||
|
@ -58,27 +58,27 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|||
var sourcePath = message.SourcePath;
|
||||
var environmentVariables = new StringDictionary();
|
||||
|
||||
environmentVariables.Add("Sonarr_EventType", "Download");
|
||||
environmentVariables.Add("Sonarr_Series_Id", series.Id.ToString());
|
||||
environmentVariables.Add("Sonarr_Series_Title", series.Title);
|
||||
environmentVariables.Add("Sonarr_Series_Path", series.Path);
|
||||
environmentVariables.Add("Sonarr_Series_TvdbId", series.TvdbId.ToString());
|
||||
environmentVariables.Add("Sonarr_Series_Type", series.SeriesType.ToString());
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_Id", episodeFile.Id.ToString());
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_EpisodeCount", episodeFile.Episodes.Value.Count.ToString());
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_RelativePath", episodeFile.RelativePath);
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_Path", Path.Combine(series.Path, episodeFile.RelativePath));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_SeasonNumber", episodeFile.SeasonNumber.ToString());
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_EpisodeNumbers", string.Join(",", episodeFile.Episodes.Value.Select(e => e.EpisodeNumber)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_EpisodeAirDates", string.Join(",", episodeFile.Episodes.Value.Select(e => e.AirDate)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_EpisodeAirDatesUtc", string.Join(",", episodeFile.Episodes.Value.Select(e => e.AirDateUtc)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_EpisodeTitles", string.Join("|", episodeFile.Episodes.Value.Select(e => e.Title)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_Quality", episodeFile.Quality.Quality.Name);
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_QualityVersion", episodeFile.Quality.Revision.Version.ToString());
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_ReleaseGroup", episodeFile.ReleaseGroup ?? string.Empty);
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_SceneName", episodeFile.SceneName ?? string.Empty);
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_SourcePath", sourcePath);
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_SourceFolder", Path.GetDirectoryName(sourcePath));
|
||||
environmentVariables.Add("Lidarr_EventType", "Download");
|
||||
environmentVariables.Add("Lidarr_Series_Id", series.Id.ToString());
|
||||
environmentVariables.Add("Lidarr_Series_Title", series.Title);
|
||||
environmentVariables.Add("Lidarr_Series_Path", series.Path);
|
||||
environmentVariables.Add("Lidarr_Series_TvdbId", series.TvdbId.ToString());
|
||||
environmentVariables.Add("Lidarr_Series_Type", series.SeriesType.ToString());
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_Id", episodeFile.Id.ToString());
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_EpisodeCount", episodeFile.Episodes.Value.Count.ToString());
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_RelativePath", episodeFile.RelativePath);
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_Path", Path.Combine(series.Path, episodeFile.RelativePath));
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_SeasonNumber", episodeFile.SeasonNumber.ToString());
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_EpisodeNumbers", string.Join(",", episodeFile.Episodes.Value.Select(e => e.EpisodeNumber)));
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_EpisodeAirDates", string.Join(",", episodeFile.Episodes.Value.Select(e => e.AirDate)));
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_EpisodeAirDatesUtc", string.Join(",", episodeFile.Episodes.Value.Select(e => e.AirDateUtc)));
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_EpisodeTitles", string.Join("|", episodeFile.Episodes.Value.Select(e => e.Title)));
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_Quality", episodeFile.Quality.Quality.Name);
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_QualityVersion", episodeFile.Quality.Revision.Version.ToString());
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_ReleaseGroup", episodeFile.ReleaseGroup ?? string.Empty);
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_SceneName", episodeFile.SceneName ?? string.Empty);
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_SourcePath", sourcePath);
|
||||
environmentVariables.Add("Lidarr_EpisodeFile_SourceFolder", Path.GetDirectoryName(sourcePath));
|
||||
|
||||
ExecuteScript(environmentVariables);
|
||||
}
|
||||
|
@ -87,12 +87,12 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
|||
{
|
||||
var environmentVariables = new StringDictionary();
|
||||
|
||||
environmentVariables.Add("Sonarr_EventType", "Rename");
|
||||
environmentVariables.Add("Sonarr_Series_Id", series.Id.ToString());
|
||||
environmentVariables.Add("Sonarr_Series_Title", series.Title);
|
||||
environmentVariables.Add("Sonarr_Series_Path", series.Path);
|
||||
environmentVariables.Add("Sonarr_Series_TvdbId", series.TvdbId.ToString());
|
||||
environmentVariables.Add("Sonarr_Series_Type", series.SeriesType.ToString());
|
||||
environmentVariables.Add("Lidarr_EventType", "Rename");
|
||||
environmentVariables.Add("Lidarr_Series_Id", series.Id.ToString());
|
||||
environmentVariables.Add("Lidarr_Series_Title", series.Title);
|
||||
environmentVariables.Add("Lidarr_Series_Path", series.Path);
|
||||
environmentVariables.Add("Lidarr_Series_TvdbId", series.TvdbId.ToString());
|
||||
environmentVariables.Add("Lidarr_Series_Type", series.SeriesType.ToString());
|
||||
|
||||
ExecuteScript(environmentVariables);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace NzbDrone.Core.Notifications.Email
|
|||
|
||||
try
|
||||
{
|
||||
SendEmail(settings, "Sonarr - Test Notification", body);
|
||||
SendEmail(settings, "Lidarr - Test Notification", body);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace NzbDrone.Core.Notifications.Growl
|
|||
{
|
||||
private readonly Logger _logger;
|
||||
|
||||
//TODO: Change this to Sonarr, but it is a breaking change (v3)
|
||||
//TODO: Change this to Lidarr, but it is a breaking change (v3)
|
||||
private readonly Application _growlApplication = new Application("NzbDrone");
|
||||
private readonly NotificationType[] _notificationTypes;
|
||||
|
||||
|
@ -102,7 +102,7 @@ namespace NzbDrone.Core.Notifications.Growl
|
|||
|
||||
private void Register(string host, int port, string password)
|
||||
{
|
||||
_logger.Debug("Registering Sonarr with Growl host: {0}:{1}", host, port);
|
||||
_logger.Debug("Registering Lidarr with Growl host: {0}:{1}", host, port);
|
||||
|
||||
var growlConnector = GetGrowlConnector(host, port, password);
|
||||
|
||||
|
@ -146,7 +146,7 @@ namespace NzbDrone.Core.Notifications.Growl
|
|||
Register(settings.Host, settings.Port, settings.Password);
|
||||
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Lidarr";
|
||||
|
||||
SendNotification(title, body, "TEST", settings.Host, settings.Port, settings.Password);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace NzbDrone.Core.Notifications.Join
|
|||
public ValidationFailure Test(JoinSettings settings)
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr.";
|
||||
const string body = "This is a test message from Lidarr.";
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -87,8 +87,8 @@ namespace NzbDrone.Core.Notifications.Join
|
|||
request.AddParameter("apikey", settings.ApiKey);
|
||||
request.AddParameter("title", title);
|
||||
request.AddParameter("text", message);
|
||||
request.AddParameter("icon", "https://cdn.rawgit.com/Sonarr/Sonarr/develop/Logo/256.png"); // Use the Sonarr logo.
|
||||
request.AddParameter("smallicon", "https://cdn.rawgit.com/Sonarr/Sonarr/develop/Logo/96-Outline-White.png"); // 96x96px with outline at 88x88px on a transparent background.
|
||||
request.AddParameter("icon", "https://cdn.rawgit.com/Lidarr/Lidarr/develop/Logo/256.png"); // Use the Lidarr logo.
|
||||
request.AddParameter("smallicon", "https://cdn.rawgit.com/Lidarr/Lidarr/develop/Logo/96-Outline-White.png"); // 96x96px with outline at 88x88px on a transparent background.
|
||||
|
||||
var response = client.ExecuteAndValidate(request);
|
||||
var res = Json.Deserialize<JoinResponseModel>(response.Content);
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace NzbDrone.Core.Notifications.Emby
|
|||
{
|
||||
_logger.Debug("Testing connection to MediaBrowser: {0}", settings.Address);
|
||||
|
||||
Notify(settings, "Test from Sonarr", "Success! MediaBrowser has been successfully configured!");
|
||||
Notify(settings, "Test from Lidarr", "Success! MediaBrowser has been successfully configured!");
|
||||
}
|
||||
catch (RestException ex)
|
||||
{
|
||||
|
|
|
@ -11,8 +11,8 @@ namespace NzbDrone.Core.Notifications
|
|||
protected const string EPISODE_GRABBED_TITLE = "Episode Grabbed";
|
||||
protected const string EPISODE_DOWNLOADED_TITLE = "Episode Downloaded";
|
||||
|
||||
protected const string EPISODE_GRABBED_TITLE_BRANDED = "Sonarr - " + EPISODE_GRABBED_TITLE;
|
||||
protected const string EPISODE_DOWNLOADED_TITLE_BRANDED = "Sonarr - " + EPISODE_DOWNLOADED_TITLE;
|
||||
protected const string EPISODE_GRABBED_TITLE_BRANDED = "Lidarr - " + EPISODE_GRABBED_TITLE;
|
||||
protected const string EPISODE_DOWNLOADED_TITLE_BRANDED = "Lidarr - " + EPISODE_DOWNLOADED_TITLE;
|
||||
|
||||
public abstract string Name { get; }
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid
|
|||
var request = new RestRequest("notify", Method.POST);
|
||||
request.RequestFormat = DataFormat.Xml;
|
||||
request.AddParameter("apikey", apiKey);
|
||||
request.AddParameter("application", "Sonarr");
|
||||
request.AddParameter("application", "Lidarr");
|
||||
request.AddParameter("event", title);
|
||||
request.AddParameter("description", message);
|
||||
request.AddParameter("priority", (int)priority);
|
||||
|
@ -69,7 +69,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid
|
|||
try
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Lidarr";
|
||||
Verify(settings.ApiKey);
|
||||
SendNotification(title, body, settings.ApiKey, (NotifyMyAndroidPriority)settings.Priority);
|
||||
}
|
||||
|
|
|
@ -192,8 +192,8 @@ namespace NzbDrone.Core.Notifications.Plex
|
|||
request.AddHeader("X-Plex-Platform-Version", "7");
|
||||
request.AddHeader("X-Plex-Provides", "player");
|
||||
request.AddHeader("X-Plex-Client-Identifier", "AB6CCCC7-5CF5-4523-826A-B969E0FFD8A0");
|
||||
request.AddHeader("X-Plex-Device-Name", "Sonarr");
|
||||
request.AddHeader("X-Plex-Product", "Sonarr");
|
||||
request.AddHeader("X-Plex-Device-Name", "Lidarr");
|
||||
request.AddHeader("X-Plex-Product", "Lidarr");
|
||||
request.AddHeader("X-Plex-Version", BuildInfo.Version.ToString());
|
||||
|
||||
return request;
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace NzbDrone.Core.Notifications.Plex
|
|||
{
|
||||
if (version >= new Version(1, 3, 0) && version < new Version(1, 3, 1))
|
||||
{
|
||||
throw new PlexVersionException("Found version {0}, upgrade to PMS 1.3.1 to fix library updating and then restart Sonarr", version);
|
||||
throw new PlexVersionException("Found version {0}, upgrade to PMS 1.3.1 to fix library updating and then restart Lidarr", version);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace NzbDrone.Core.Notifications.Prowl
|
|||
{
|
||||
var notification = new Prowlin.Notification
|
||||
{
|
||||
Application = "Sonarr",
|
||||
Application = "Lidarr",
|
||||
Description = message,
|
||||
Event = title,
|
||||
Priority = priority,
|
||||
|
@ -88,7 +88,7 @@ namespace NzbDrone.Core.Notifications.Prowl
|
|||
Verify(settings.ApiKey);
|
||||
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Lidarr";
|
||||
|
||||
SendNotification(title, body, settings.ApiKey);
|
||||
}
|
||||
|
|
|
@ -92,8 +92,8 @@ namespace NzbDrone.Core.Notifications.PushBullet
|
|||
{
|
||||
try
|
||||
{
|
||||
const string title = "Sonarr - Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string title = "Lidarr - Test Notification";
|
||||
const string body = "This is a test message from Lidarr";
|
||||
|
||||
SendNotification(title, body, settings);
|
||||
}
|
||||
|
|
|
@ -29,11 +29,11 @@ namespace NzbDrone.Core.Notifications.Pushalot
|
|||
var client = RestClientFactory.BuildClient(URL);
|
||||
var request = BuildRequest();
|
||||
|
||||
request.AddParameter("Source", "Sonarr");
|
||||
request.AddParameter("Source", "Lidarr");
|
||||
|
||||
if (settings.Image)
|
||||
{
|
||||
request.AddParameter("Image", "https://raw.githubusercontent.com/Sonarr/Sonarr/develop/Logo/128.png");
|
||||
request.AddParameter("Image", "https://raw.githubusercontent.com/Lidarr/Lidarr/develop/Logo/128.png");
|
||||
}
|
||||
|
||||
request.AddParameter("Title", title);
|
||||
|
@ -65,7 +65,7 @@ namespace NzbDrone.Core.Notifications.Pushalot
|
|||
try
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Lidarr";
|
||||
|
||||
SendNotification(title, body, settings);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace NzbDrone.Core.Notifications.Pushalot
|
|||
[FieldDefinition(1, Label = "Priority", Type = FieldType.Select, SelectOptions = typeof(PushalotPriority))]
|
||||
public int Priority { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "Image", Type = FieldType.Checkbox, HelpText = "Include Sonarr logo with notifications")]
|
||||
[FieldDefinition(2, Label = "Image", Type = FieldType.Checkbox, HelpText = "Include Lidarr logo with notifications")]
|
||||
public bool Image { get; set; }
|
||||
|
||||
public bool IsValid => !string.IsNullOrWhiteSpace(AuthToken);
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace NzbDrone.Core.Notifications.Pushover
|
|||
try
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Lidarr";
|
||||
|
||||
SendNotification(title, body, settings);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace NzbDrone.Core.Notifications.Slack
|
|||
{
|
||||
try
|
||||
{
|
||||
var message = $"Test message from Sonarr posted at {DateTime.Now}";
|
||||
var message = $"Test message from Lidarr posted at {DateTime.Now}";
|
||||
var payload = new SlackPayload
|
||||
{
|
||||
IconEmoji = Settings.Icon,
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace NzbDrone.Core.Notifications.Telegram
|
|||
try
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Lidarr";
|
||||
|
||||
SendNotification(title, body, settings);
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ namespace NzbDrone.Core.Notifications.Twitter
|
|||
{
|
||||
try
|
||||
{
|
||||
var body = "Sonarr: Test Message @ " + DateTime.Now;
|
||||
var body = "Lidarr: Test Message @ " + DateTime.Now;
|
||||
|
||||
SendNotification(body, settings);
|
||||
}
|
||||
|
|
|
@ -37,10 +37,10 @@ namespace NzbDrone.Core.Notifications.Twitter
|
|||
AuthorizeNotification = "step1";
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Consumer Key", HelpText = "Consumer key from a Twitter application", HelpLink = "https://github.com/Sonarr/Sonarr/wiki/Twitter-Notifications")]
|
||||
[FieldDefinition(0, Label = "Consumer Key", HelpText = "Consumer key from a Twitter application", HelpLink = "https://github.com/Lidarr/Lidarr/wiki/Twitter-Notifications")]
|
||||
public string ConsumerKey { get; set; }
|
||||
|
||||
[FieldDefinition(1, Label = "Consumer Secret", HelpText = "Consumer secret from a Twitter application", HelpLink = "https://github.com/Sonarr/Sonarr/wiki/Twitter-Notifications")]
|
||||
[FieldDefinition(1, Label = "Consumer Secret", HelpText = "Consumer secret from a Twitter application", HelpLink = "https://github.com/Lidarr/Lidarr/wiki/Twitter-Notifications")]
|
||||
public string ConsumerSecret { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "Access Token", Advanced = true)]
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace NzbDrone.Core.Notifications.Webhook
|
|||
_service = service;
|
||||
}
|
||||
|
||||
public override string Link => "https://github.com/Sonarr/Sonarr/wiki/Webhook";
|
||||
public override string Link => "https://github.com/Lidarr/Lidarr/wiki/Webhook";
|
||||
|
||||
public override void OnGrab(GrabMessage message)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
|||
|
||||
public void Notify(XbmcSettings settings, string title, string message)
|
||||
{
|
||||
var notification = string.Format("Notification({0},{1},{2},{3})", title, message, settings.DisplayTime * 1000, "https://raw.github.com/Sonarr/Sonarr/develop/Logo/64.png");
|
||||
var notification = string.Format("Notification({0},{1},{2},{3})", title, message, settings.DisplayTime * 1000, "https://raw.github.com/Lidarr/Lidarr/develop/Logo/64.png");
|
||||
var command = BuildExecBuiltInCommand(notification);
|
||||
|
||||
SendCommand(settings, command);
|
||||
|
|
|
@ -23,14 +23,14 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
|||
|
||||
public override void OnGrab(GrabMessage grabMessage)
|
||||
{
|
||||
const string header = "Sonarr - Grabbed";
|
||||
const string header = "Lidarr - Grabbed";
|
||||
|
||||
Notify(Settings, header, grabMessage.Message);
|
||||
}
|
||||
|
||||
public override void OnDownload(DownloadMessage message)
|
||||
{
|
||||
const string header = "Sonarr - Downloaded";
|
||||
const string header = "Lidarr - Downloaded";
|
||||
|
||||
Notify(Settings, header, message.Message);
|
||||
UpdateAndClean(message.Series, message.OldFiles.Any());
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
|||
var parameters = new Dictionary<string, object>();
|
||||
parameters.Add("title", title);
|
||||
parameters.Add("message", message);
|
||||
parameters.Add("image", "https://raw.github.com/Sonarr/Sonarr/develop/Logo/64.png");
|
||||
parameters.Add("image", "https://raw.github.com/Lidarr/Lidarr/develop/Logo/64.png");
|
||||
parameters.Add("displaytime", settings.DisplayTime * 1000);
|
||||
|
||||
ProcessRequest(request, settings, "GUI.ShowNotification", parameters);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue