First round of refactoring.

This commit is contained in:
Matthew Despain 2017-03-29 21:49:38 -06:00
parent c98c679504
commit 20c8dec50a
117 changed files with 283 additions and 261 deletions

View file

@ -38,7 +38,7 @@ public void Register(IPipelines pipelines)
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);

View file

@ -26,7 +26,7 @@ public CalendarFeedModule(IEpisodeService episodeService, ITagService tagService
_tagService = tagService;
Get["/NzbDrone.ics"] = options => GetCalendarFeed();
Get["/Sonarr.ics"] = options => GetCalendarFeed();
Get["/Lidarr.ics"] = options => GetCalendarFeed();
}
private Response GetCalendarFeed()
@ -89,7 +89,7 @@ private Response GetCalendarFeed()
var episodes = _episodeService.EpisodesBetweenDates(start, end, unmonitored);
var calendar = new Ical.Net.Calendar
{
ProductId = "-//sonarr.tv//Sonarr//EN"
ProductId = "-//Lidarr.tv//Lidarr//EN"
};

View file

@ -119,7 +119,7 @@ protected virtual void MapToResource(TProviderResource resource, TProviderDefini
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());
}

View file

@ -155,7 +155,7 @@ public void should_send_user_agent()
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 @@ public void should_not_download_file_with_error()
{
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();

View file

@ -12,7 +12,7 @@ public class CleanseLogMessageFixture
[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

View file

@ -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();
}

View file

@ -23,7 +23,7 @@ public void PrintHelp()
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.");
}

View file

@ -127,7 +127,7 @@ public bool FolderWritable(string path)
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);

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Net;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Extensions;
@ -138,7 +138,7 @@ protected virtual void AddRequestHeaders(HttpWebRequest webRequest, HttpHeader h
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:

View file

@ -24,7 +24,7 @@ public class HttpProvider : IHttpProvider
public HttpProvider(Logger logger)
{
_logger = logger;
_userAgent = string.Format("Sonarr {0}", BuildInfo.Version);
_userAgent = string.Format("Lidarr {0}", BuildInfo.Version);
ServicePointManager.Expect100Continue = false;
}

View file

@ -1,4 +1,4 @@
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.EnvironmentInfo;
namespace NzbDrone.Common.Http
{
@ -33,8 +33,8 @@ public UserAgentBuilder(IOsInfo osInfo)
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)}";
}
}
}

View file

@ -92,15 +92,15 @@ private static void RegisterSentry(bool updateClient)
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 @@ private static void RegisterConsole()
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)

View file

@ -33,7 +33,7 @@ public class SentryTarget : TargetWithLayout
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",

View file

@ -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 @@ private static string ShortenPath(string path)
public JsonPacket Create(string project, SentryEvent @event)
{
var packet = new SonarrSentryPacket(project, @event);
var packet = new LidarrSentryPacket(project, @event);
try
{

View file

@ -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

View file

@ -4,7 +4,7 @@
// 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("")]

View file

@ -23,7 +23,7 @@ public static void Main(string[] args)
{
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);

View file

@ -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>

View file

@ -32,7 +32,7 @@ public class TorrentDownloadStationFixture : DownloadClientFixtureBase<TorrentDo
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");

View file

@ -28,7 +28,7 @@ public class UsenetDownloadStationFixture : DownloadClientFixtureBase<UsenetDown
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");

View file

@ -37,7 +37,7 @@ public void Setup()
DownloadedBytes = 0,
Progress = 0.0,
SavePath = "somepath",
Label = "sonarr-tv"
Label = "lidarr-music"
};
_downloading = new HadoukenTorrent
@ -50,7 +50,7 @@ public void Setup()
DownloadedBytes = 100,
Progress = 10.0,
SavePath = "somepath",
Label = "sonarr-tv"
Label = "lidarr-music"
};
_failed = new HadoukenTorrent
@ -64,7 +64,7 @@ public void Setup()
DownloadedBytes = 100,
Progress = 10.0,
SavePath = "somepath",
Label = "sonarr-tv"
Label = "lidarr-music"
};
_completed = new HadoukenTorrent
@ -77,7 +77,7 @@ public void Setup()
DownloadedBytes = 1000,
Progress = 100.0,
SavePath = "somepath",
Label = "sonarr-tv"
Label = "lidarr-music"
};
Mocker.GetMock<ITorrentFileInfoReader>()
@ -235,7 +235,7 @@ public void GetItems_should_return_torrents_with_DownloadId_uppercase()
DownloadedBytes = 1000,
Progress = 100.0,
SavePath = "somepath",
Label = "sonarr-tv"
Label = "lidarr-music"
};
var torrents = new HadoukenTorrent[] { torrent };
@ -262,7 +262,7 @@ public void GetItems_should_ignore_torrents_with_a_different_category()
DownloadedBytes = 1000,
Progress = 100.0,
SavePath = "somepath",
Label = "sonarr-tv-other"
Label = "lidarr-music-other"
};
var torrents = new HadoukenTorrent[] { torrent };

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using System.Collections.Generic;
using FluentAssertions;
@ -54,7 +54,7 @@ protected void GivenRedirectToMagnet()
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 @@ public void should_not_be_read_only_if_max_ratio_reached_and_paused()
[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 @@ public void should_get_category_from_the_category_if_set()
[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

View file

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using Moq;
@ -75,7 +75,7 @@ public void Download_with_TvDirectory_should_force_directory()
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 @@ public void Download_with_category_should_force_directory()
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 @@ public void Download_with_category_should_not_have_double_slashes()
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 @@ public void should_exclude_items_not_in_category()
{
GivenTvCategory();
_downloading.DownloadDir = @"C:/Downloads/Finished/transmission/sonarr";
_downloading.DownloadDir = @"C:/Downloads/Finished/transmission/Lidarr";
GivenTorrents(new List<TransmissionTorrent>
{
@ -224,7 +224,7 @@ public void should_exclude_items_not_in_TvDirectory()
{
GivenTvDirectory();
_downloading.DownloadDir = @"C:/Downloads/Finished/sonarr/subdir";
_downloading.DownloadDir = @"C:/Downloads/Finished/Lidarr/subdir";
GivenTorrents(new List<TransmissionTorrent>
{

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using Moq;
using NUnit.Framework;
@ -112,12 +112,12 @@ public void Setup()
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()

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using System.Collections.Generic;
using FluentAssertions;
@ -107,7 +107,7 @@ protected void GivenRedirectToMagnet()
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)))

View file

@ -77,7 +77,7 @@ public void Download_with_TvDirectory_should_force_directory()
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 @@ public void Download_with_category_should_force_directory()
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 @@ public void Download_with_category_should_not_have_double_slashes()
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 @@ public void should_exclude_items_not_in_category()
{
GivenTvCategory();
_downloading.DownloadDir = @"C:/Downloads/Finished/transmission/sonarr";
_downloading.DownloadDir = @"C:/Downloads/Finished/transmission/Lidarr";
GivenTorrents(new List<TransmissionTorrent>
{
@ -226,7 +226,7 @@ public void should_exclude_items_not_in_TvDirectory()
{
GivenTvDirectory();
_downloading.DownloadDir = @"C:/Downloads/Finished/sonarr/subdir";
_downloading.DownloadDir = @"C:/Downloads/Finished/Lidarr/subdir";
GivenTorrents(new List<TransmissionTorrent>
{

View file

@ -27,7 +27,7 @@ protected void UseRealHttp()
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());
}
}

View file

@ -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")]

View 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.

View file

@ -17,7 +17,7 @@ public class MatchesFolderSpecificationFixture : CoreTest<MatchesFolderSpecifica
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 @@ public void should_should_be_accepted_for_full_season()
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 @@ public void should_be_accepted_if_file_and_folder_have_the_same_episode()
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 @@ public void should_be_rejected_if_file_and_folder_do_not_have_same_episode()
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();
}
}

View file

@ -34,7 +34,7 @@ public void Setup()
.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;

View file

@ -58,7 +58,7 @@ public void Setup()
.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>()))

View file

@ -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 @@ public void Setup()
.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 @@ public void should_not_require_a_separator_between_tokens()
_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 @@ public void should_be_able_to_use_original_filename_only()
}
[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;

View file

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using FizzWare.NBuilder;
using FluentAssertions;
@ -59,7 +59,7 @@ public void Setup()
.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 @@ public void should_get_proper_filename_when_multi_episode_is_duplicated_and_brac
_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]

View file

@ -41,14 +41,14 @@ public class HashedReleaseFixture : CoreTest
},
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

View file

@ -36,7 +36,7 @@ public void Setup()
_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 @@ public void Setup()
_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);

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@ -304,12 +304,12 @@ private XDocument LoadConfigFile()
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 @@ private XDocument LoadConfigFile()
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);
}
}

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using NLog;
@ -18,7 +18,7 @@ public class DailySeriesDataProxy : IDailySeriesDataProxy
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;

View file

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using NzbDrone.Common.Cloud;
using NzbDrone.Common.Http;
@ -14,7 +14,7 @@ public class SceneMappingProxy : ISceneMappingProxy
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;

View file

@ -110,10 +110,10 @@ public IDatabase Create(MigrationContext migrationContext)
{
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);
}
}

View file

@ -10,7 +10,7 @@ public class fix_extra_file_extension : NzbDroneMigrationBase
{
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) = ''");

View file

@ -93,7 +93,7 @@ public override IEnumerable<DownloadClientItem> GetItems()
{
DownloadClient = Definition.Name,
DownloadId = Definition.Name + "_" + item.DownloadId,
Category = "sonarr",
Category = "Lidarr",
Title = item.Title,
TotalSize = item.TotalSize,

View file

@ -26,10 +26,10 @@ public TorrentBlackholeSettings()
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 @@ public TorrentBlackholeSettings()
[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()

View file

@ -60,7 +60,7 @@ public override IEnumerable<DownloadClientItem> GetItems()
{
DownloadClient = Definition.Name,
DownloadId = Definition.Name + "_" + item.DownloadId,
Category = "sonarr",
Category = "Lidarr",
Title = item.Title,
TotalSize = item.TotalSize,

View file

@ -19,10 +19,10 @@ public class UsenetBlackholeSettings : IProviderConfig
{
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()

View file

@ -262,7 +262,7 @@ private ValidationFailure TestCategory()
{
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."
};
}
}

View file

@ -25,7 +25,7 @@ public DelugeSettings()
Host = "localhost";
Port = 8112;
Password = "deluge";
TvCategory = "tv-sonarr";
TvCategory = "tv-Lidarr";
}
[FieldDefinition(0, Label = "Host", Type = FieldType.Textbox)]
@ -40,7 +40,7 @@ public DelugeSettings()
[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")]

View file

@ -42,7 +42,7 @@ public class DownloadStationSettings : IProviderConfig
[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")]

View file

@ -335,7 +335,7 @@ protected ValidationFailure TestConnection()
_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)

View file

@ -254,7 +254,7 @@ protected ValidationFailure TestConnection()
_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)

View file

@ -28,7 +28,7 @@ public HadoukenSettings()
{
Host = "localhost";
Port = 7070;
Category = "sonarr-tv";
Category = "Lidarr-tv";
}
[FieldDefinition(0, Label = "Host", Type = FieldType.Textbox)]

View file

@ -43,7 +43,7 @@ public NzbVortexSettings()
[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")]

View file

@ -319,7 +319,7 @@ private ValidationFailure TestSettings()
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."
};
}

View file

@ -161,7 +161,7 @@ public void RemoveItem(string id, NzbgetSettings settings)
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);
}

View file

@ -43,7 +43,7 @@ public NzbgetSettings()
[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")]

View file

@ -210,7 +210,7 @@ private ValidationFailure TestConnection()
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 @@ private ValidationFailure TestConnection()
{
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'."
};
}
}

View file

@ -22,7 +22,7 @@ public QBittorrentSettings()
{
Host = "localhost";
Port = 9091;
TvCategory = "tv-sonarr";
TvCategory = "tv-Lidarr";
}
[FieldDefinition(0, Label = "Host", Type = FieldType.Textbox)]
@ -37,7 +37,7 @@ public QBittorrentSettings()
[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")]

View file

@ -364,7 +364,7 @@ private ValidationFailure TestConnectionAndVersion()
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 @@ private ValidationFailure TestGlobalConfig()
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 @@ private ValidationFailure TestCategory()
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 @@ private ValidationFailure TestCategory()
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 @@ private ValidationFailure TestCategory()
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 @@ private ValidationFailure TestCategory()
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."
};
}

View file

@ -58,7 +58,7 @@ public SabnzbdSettings()
[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")]

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
@ -207,7 +207,7 @@ protected ValidationFailure TestConnection()
_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)

View file

@ -50,7 +50,7 @@ public TransmissionSettings()
[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")]

View file

@ -77,7 +77,7 @@ protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string
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()
{

View file

@ -26,7 +26,7 @@ public RTorrentSettings()
Host = "localhost";
Port = 8080;
UrlBase = "RPC2";
TvCategory = "tv-sonarr";
TvCategory = "tv-Lidarr";
OlderTvPriority = (int)RTorrentPriority.Normal;
RecentTvPriority = (int)RTorrentPriority.Normal;
}
@ -49,7 +49,7 @@ public RTorrentSettings()
[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")]

View file

@ -23,7 +23,7 @@ public UTorrentSettings()
{
Host = "localhost";
Port = 9091;
TvCategory = "tv-sonarr";
TvCategory = "tv-Lidarr";
}
[FieldDefinition(0, Label = "Host", Type = FieldType.Textbox)]
@ -38,7 +38,7 @@ public UTorrentSettings()
[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")]

View file

@ -61,7 +61,7 @@ public void Process(TrackedDownload trackedDownload, bool ignoreWarnings = false
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;
}

View file

@ -132,7 +132,7 @@ protected ValidationFailure TestFolder(string folder, string propertyName, bool
{
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 @@ protected ValidationFailure TestFolder(string folder, string propertyName, bool
_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)
};
}

View file

@ -72,7 +72,7 @@ public void Process(TrackedDownload trackedDownload)
if (grabbedItems.Empty())
{
trackedDownload.Warn("Download wasn't grabbed by sonarr, skipping");
trackedDownload.Warn("Download wasn't grabbed by Lidarr, skipping");
return;
}

View file

@ -183,7 +183,7 @@ private string DownloadFromWebUrl(RemoteEpisode remoteEpisode, string torrentUrl
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 @@ private string DownloadFromMagnetUrl(RemoteEpisode remoteEpisode, string magnetU
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);
}

View file

@ -19,7 +19,7 @@ public override HealthCheck Check()
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);

View file

@ -19,7 +19,7 @@ public override HealthCheck Check()
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);

View file

@ -16,7 +16,7 @@ public class ProxyCheck : HealthCheckBase
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;

View file

@ -39,7 +39,7 @@ private static string MakeWikiFragment(string message)
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);
}
}

View file

@ -73,7 +73,7 @@ private NewznabCapabilities FetchCapabilities(NewznabSettings indexerSettings)
}
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;

View file

@ -105,7 +105,7 @@ private IEnumerable<IndexerRequest> GetPagedRequests(string mode, int? tvdbId, s
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());
}

View file

@ -1,4 +1,4 @@
using System;
using System;
using Newtonsoft.Json.Linq;
using NLog;
using NzbDrone.Common.Cache;
@ -31,7 +31,7 @@ public string GetToken(RarbgSettings settings)
{
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())

View file

@ -94,7 +94,7 @@ public List<ImportResult> ProcessPath(string path, ImportMode importMode = Impor
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>();
}

View file

@ -20,7 +20,7 @@ public class SkyHookProxy : IProvideSeriesInfo, ISearchForNewSeries
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;

View file

@ -43,7 +43,7 @@ public ValidationFailure Test(BoxcarSettings settings)
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 @@ private void SendNotification(string title, string message, RestRequest request,
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);
}

View file

@ -26,7 +26,7 @@ public CustomScript(IDiskProvider diskProvider, IProcessProvider processProvider
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 @@ public override void OnGrab(GrabMessage message)
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 @@ public override void OnDownload(DownloadMessage message)
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 @@ public override void OnRename(Series series)
{
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);
}

View file

@ -64,7 +64,7 @@ public ValidationFailure Test(EmailSettings settings)
try
{
SendEmail(settings, "Sonarr - Test Notification", body);
SendEmail(settings, "Lidarr - Test Notification", body);
}
catch (Exception ex)
{

View file

@ -21,7 +21,7 @@ public class GrowlService : IGrowlService
{
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 @@ public void SendNotification(string title, string message, string notificationTy
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 @@ public ValidationFailure Test(GrowlSettings settings)
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);
}

View file

@ -41,7 +41,7 @@ public void SendNotification(string title, string message, JoinSettings settings
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 @@ private void SendNotification(string title, string message, RestRequest request,
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);

View file

@ -41,7 +41,7 @@ public ValidationFailure Test(MediaBrowserSettings settings)
{
_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)
{

View file

@ -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; }

View file

@ -32,7 +32,7 @@ public void SendNotification(string title, string message, string apiKey, Notify
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 @@ public ValidationFailure Test(NotifyMyAndroidSettings settings)
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);
}

View file

@ -192,8 +192,8 @@ private RestRequest GetPlexTvRequest(string resource, Method method)
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;

View file

@ -98,7 +98,7 @@ private void ValidateVersion(Version version)
{
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);
}
}

View file

@ -26,7 +26,7 @@ public void SendNotification(string title, string message, string apiKey, Notifi
{
var notification = new Prowlin.Notification
{
Application = "Sonarr",
Application = "Lidarr",
Description = message,
Event = title,
Priority = priority,
@ -88,7 +88,7 @@ public ValidationFailure Test(ProwlSettings settings)
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);
}

View file

@ -92,8 +92,8 @@ public ValidationFailure Test(PushBulletSettings settings)
{
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);
}

View file

@ -29,11 +29,11 @@ public void SendNotification(string title, string message, PushalotSettings sett
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 @@ public ValidationFailure Test(PushalotSettings settings)
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);
}

View file

@ -28,7 +28,7 @@ public PushalotSettings()
[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);

View file

@ -53,7 +53,7 @@ public ValidationFailure Test(PushoverSettings settings)
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);
}

View file

@ -100,7 +100,7 @@ public ValidationFailure TestMessage()
{
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,

View file

@ -45,7 +45,7 @@ public ValidationFailure Test(TelegramSettings settings)
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);
}

View file

@ -125,7 +125,7 @@ public ValidationFailure Test(TwitterSettings settings)
{
try
{
var body = "Sonarr: Test Message @ " + DateTime.Now;
var body = "Lidarr: Test Message @ " + DateTime.Now;
SendNotification(body, settings);
}

View file

@ -37,10 +37,10 @@ public TwitterSettings()
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)]

View file

@ -15,7 +15,7 @@ public Webhook(IWebhookService service)
_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)
{

View file

@ -28,7 +28,7 @@ public bool CanHandle(XbmcVersion version)
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);

View file

@ -23,14 +23,14 @@ public Xbmc(IXbmcService xbmcService, Logger logger)
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());

View file

@ -41,7 +41,7 @@ public void Notify(XbmcSettings settings, string title, string message)
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