From 10c29a65dbedd58d36a4a2d94b7000581e0984b1 Mon Sep 17 00:00:00 2001 From: Qstick Date: Tue, 24 Oct 2017 22:31:37 -0400 Subject: [PATCH] Assembly Naming, Default Windows Service Account --- build-appveyor.cake | 22 ++++---- build.sh | 24 ++++----- setup/build.bat | 2 +- setup/{nzbdrone.iss => lidarr.iss} | 2 +- .../Calendar/CalendarFeedModule.cs | 4 ++ src/Lidarr.Api.V3/Properties/AssemblyInfo.cs | 6 +-- .../NzbDrone.Api.Test.csproj | 2 +- .../Properties/AssemblyInfo.cs | 6 +-- .../NzbDrone.Host.Test.csproj | 2 +- .../Properties/AssemblyInfo.cs | 6 +-- src/NzbDrone.App.Test/RouterTest.cs | 12 +++-- .../NzbDrone.Automation.Test.csproj | 2 +- .../Properties/AssemblyInfo.cs | 6 +-- .../NzbDrone.Common.Test.csproj | 2 +- .../ReflectionExtensionFixture.cs | 8 +-- .../ServiceProviderTests.cs | 6 +-- .../Composition/ContainerBuilderBase.cs | 6 +-- .../EnvironmentInfo/RuntimeInfo.cs | 4 ++ src/NzbDrone.Common/NzbDrone.Common.csproj | 2 +- .../Processes/ProcessProvider.cs | 9 ++-- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/SharedAssemblyInfo.cs | 4 +- .../Reflection/ReflectionExtensions.cs | 6 +-- src/NzbDrone.Common/ServiceProvider.cs | 50 ++++++++++++++++--- .../Properties/AssemblyInfo.cs | 2 +- .../NzbDrone.Core.Test.csproj | 2 +- .../Properties/AssemblyInfo.cs | 8 +-- ...Core.dll.config => Lidarr.Core.dll.config} | 0 src/NzbDrone.Core/NzbDrone.Core.csproj | 4 +- src/NzbDrone.Core/Properties/AssemblyInfo.cs | 6 +-- src/NzbDrone.Host/MainAppContainerBuilder.cs | 6 +-- src/NzbDrone.Host/NzbDrone.Host.csproj | 2 +- src/NzbDrone.Host/Router.cs | 24 +++++++-- .../ApiTests/ArtistFixture.cs | 18 +++---- src/NzbDrone.Integration.Test/CorsFixture.cs | 2 +- .../IntegrationTestBase.cs | 5 +- .../NzbDrone.Integration.Test.csproj | 2 +- .../Properties/AssemblyInfo.cs | 6 +-- .../NzbDrone.Libraries.Test.csproj | 2 +- .../Properties/AssemblyInfo.cs | 6 +-- .../NzbDrone.Mono.Test.csproj | 2 +- .../Properties/AssemblyInfo.cs | 6 +-- src/NzbDrone.Mono/NzbDrone.Mono.csproj | 2 +- src/NzbDrone.Mono/Properties/AssemblyInfo.cs | 6 +-- src/NzbDrone.SignalR/NzbDrone.SignalR.csproj | 2 +- .../Properties/AssemblyInfo.cs | 4 +- src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs | 6 +-- .../NzbDrone.Test.Common.csproj | 2 +- .../Properties/AssemblyInfo.cs | 6 +-- src/NzbDrone.Test.Dummy/DummyApp.cs | 4 +- .../NzbDrone.Test.Dummy.csproj | 2 +- .../Properties/AssemblyInfo.cs | 6 +-- .../NzbDrone.Update.Test.csproj | 2 +- .../Properties/AssemblyInfo.cs | 6 +-- .../StartNzbDroneService.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 +- .../NzbDrone.Windows.Test.csproj | 2 +- .../Properties/AssemblyInfo.cs | 6 +-- src/NzbDrone.Windows/NzbDrone.Windows.csproj | 2 +- .../Properties/AssemblyInfo.cs | 6 +-- .../ServiceInstall/ServiceHelper.cs | 2 - .../ServiceUninstall/ServiceHelper.cs | 2 - 62 files changed, 219 insertions(+), 155 deletions(-) rename setup/{nzbdrone.iss => lidarr.iss} (99%) rename src/NzbDrone.Core/{NzbDrone.Core.dll.config => Lidarr.Core.dll.config} (100%) diff --git a/build-appveyor.cake b/build-appveyor.cake index f7b49540f..7d839d7a5 100644 --- a/build-appveyor.cake +++ b/build-appveyor.cake @@ -136,8 +136,8 @@ Task("PackageMono").Does(() => { DeleteFiles(outputFolderMono + "/sqlite3.*"); DeleteFiles(outputFolderMono + "/MediaInfo.*"); - // Adding NzbDrone.Core.dll.config (for dllmap) - CopyFile(sourceFolder + "/NzbDrone.Core/NzbDrone.Core.dll.config", outputFolderMono + "/NzbDrone.Core.dll.config"); + // Adding Lidarr.Core.dll.config (for dllmap) + CopyFile(sourceFolder + "/NzbDrone.Core/Lidarr.Core.dll.config", outputFolderMono + "/Lidarr.Core.dll.config"); // Adding CurlSharp.dll.config (for dllmap) CopyFile(sourceFolder + "/NzbDrone.Common/CurlSharp.dll.config", outputFolderMono + "/CurlSharp.dll.config"); @@ -148,11 +148,11 @@ Task("PackageMono").Does(() => { MoveFile(outputFolderMono + "/Lidarr.Console.exe.config", outputFolderMono + "/Lidarr.exe.config"); MoveFile(outputFolderMono + "/Lidarr.Console.exe.mdb", outputFolderMono + "/Lidarr.exe.mdb"); - // Remove NzbDrone.Windows.* - DeleteFiles(outputFolderMono + "/NzbDrone.Windows.*"); + // Remove Lidarr.Windows.* + DeleteFiles(outputFolderMono + "/Lidarr.Windows.*"); - // Adding NzbDrone.Mono to updatePackage - CopyFiles(outputFolderMono + "/NzbDrone.Mono.*", updateFolderMono); + // Adding Lidarr.Mono to updatePackage + CopyFiles(outputFolderMono + "/Lidarr.Mono.*", updateFolderMono); }); Task("PackageOsx").Does(() => { @@ -227,8 +227,8 @@ Task("PackageTests").Does(() => { // Clean CleanFolder(testPackageFolder, true); - // Adding NzbDrone.Core.dll.config (for dllmap) - CopyFile(sourceFolder + "/NzbDrone.Core/NzbDrone.Core.dll.config", testPackageFolder + "/NzbDrone.Core.dll.config"); + // Adding Lidarr.Core.dll.config (for dllmap) + CopyFile(sourceFolder + "/NzbDrone.Core/Lidarr.Core.dll.config", testPackageFolder + "/Lidarr.Core.dll.config"); // Adding CurlSharp.dll.config (for dllmap) CopyFile(sourceFolder + "/NzbDrone.Common/CurlSharp.dll.config", testPackageFolder + "/CurlSharp.dll.config"); @@ -239,10 +239,10 @@ Task("PackageTests").Does(() => { Task("CleanupWindowsPackage").Does(() => { // Remove mono - DeleteFiles(outputFolder + "/NzbDrone.Mono.*"); + DeleteFiles(outputFolder + "/Lidarr.Mono.*"); - // Adding NzbDrone.Windows to updatePackage - CopyFiles(outputFolder + "/NzbDrone.Windows.*", updateFolder); + // Adding Lidarr.Windows to updatePackage + CopyFiles(outputFolder + "/Lidarr.Windows.*", updateFolder); }); Task("Build") diff --git a/build.sh b/build.sh index 237ec16d5..297a932e2 100755 --- a/build.sh +++ b/build.sh @@ -158,8 +158,8 @@ PackageMono() rm -f $outputFolderMono/sqlite3.* rm -f $outputFolderMono/MediaInfo.* - echo "Adding NzbDrone.Core.dll.config (for dllmap)" - cp $sourceFolder/NzbDrone.Core/NzbDrone.Core.dll.config $outputFolderMono + echo "Adding Lidarr.Core.dll.config (for dllmap)" + cp $sourceFolder/NzbDrone.Core/Lidarr.Core.dll.config $outputFolderMono echo "Adding CurlSharp.dll.config (for dllmap)" cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $outputFolderMono @@ -170,11 +170,11 @@ PackageMono() mv "$file" "${file//.Console/}" done - echo "Removing NzbDrone.Windows" - rm $outputFolderMono/NzbDrone.Windows.* + echo "Removing Lidarr.Windows" + rm $outputFolderMono/Lidarr.Windows.* - echo "Adding NzbDrone.Mono to UpdatePackage" - cp $outputFolderMono/NzbDrone.Mono.* $updateFolderMono + echo "Adding Lidarr.Mono to UpdatePackage" + cp $outputFolderMono/Lidarr.Mono.* $updateFolderMono echo "##teamcity[progressFinish 'Creating Mono Package']" } @@ -234,8 +234,8 @@ PackageTests() CleanFolder $testPackageFolder true - echo "Adding NzbDrone.Core.dll.config (for dllmap)" - cp $sourceFolder/NzbDrone.Core/NzbDrone.Core.dll.config $testPackageFolder + echo "Adding Lidarr.Core.dll.config (for dllmap)" + cp $sourceFolder/NzbDrone.Core/Lidarr.Core.dll.config $testPackageFolder echo "Adding CurlSharp.dll.config (for dllmap)" cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $testPackageFolder @@ -248,11 +248,11 @@ PackageTests() CleanupWindowsPackage() { - echo "Removing NzbDrone.Mono" - rm -f $outputFolder/NzbDrone.Mono.* + echo "Removing Lidarr.Mono" + rm -f $outputFolder/Lidarr.Mono.* - echo "Adding NzbDrone.Windows to UpdatePackage" - cp $outputFolder/NzbDrone.Windows.* $updateFolder + echo "Adding Lidarr.Windows to UpdatePackage" + cp $outputFolder/Lidarr.Windows.* $updateFolder } # Use mono or .net depending on OS diff --git a/setup/build.bat b/setup/build.bat index 964fe8abf..faef79cb4 100644 --- a/setup/build.bat +++ b/setup/build.bat @@ -1,3 +1,3 @@ REM SET BUILD_NUMBER=1 REM SET branch=develop -inno\ISCC.exe nzbdrone.iss \ No newline at end of file +inno\ISCC.exe lidarr.iss \ No newline at end of file diff --git a/setup/nzbdrone.iss b/setup/lidarr.iss similarity index 99% rename from setup/nzbdrone.iss rename to setup/lidarr.iss index 7a93a2fe3..09c44e103 100644 --- a/setup/nzbdrone.iss +++ b/setup/lidarr.iss @@ -6,7 +6,7 @@ #define AppURL "https://lidarr.audio/" #define ForumsURL "https://forums.lidarr.audio/" #define AppExeName "Lidarr.exe" -#define BuildNumber "2.0" +#define BuildNumber "0.3" #define BuildNumber GetEnv('BUILD_NUMBER') #define BranchName GetEnv('branch') diff --git a/src/Lidarr.Api.V3/Calendar/CalendarFeedModule.cs b/src/Lidarr.Api.V3/Calendar/CalendarFeedModule.cs index c4e948bb2..86a467be7 100644 --- a/src/Lidarr.Api.V3/Calendar/CalendarFeedModule.cs +++ b/src/Lidarr.Api.V3/Calendar/CalendarFeedModule.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using Ical.Net; using Ical.Net.DataTypes; +using Ical.Net.General; using Ical.Net.Interfaces.Serialization; using Ical.Net.Serialization; using Ical.Net.Serialization.iCalendar.Factory; @@ -67,6 +68,9 @@ namespace Lidarr.Api.V3.Calendar ProductId = "-//lidarr.audio//Lidarr//EN" }; + var calendarName = "Lidarr Music Schedule"; + calendar.AddProperty(new CalendarProperty("NAME", calendarName)); + calendar.AddProperty(new CalendarProperty("X-WR-CALNAME", calendarName)); foreach (var album in albums.OrderBy(v => v.ReleaseDate.Value)) { diff --git a/src/Lidarr.Api.V3/Properties/AssemblyInfo.cs b/src/Lidarr.Api.V3/Properties/AssemblyInfo.cs index b74bdad6c..8cfbdf950 100644 --- a/src/Lidarr.Api.V3/Properties/AssemblyInfo.cs +++ b/src/Lidarr.Api.V3/Properties/AssemblyInfo.cs @@ -1,9 +1,9 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: AssemblyTitle("NzbDrone.Api")] +[assembly: AssemblyTitle("Lidarr.Api")] [assembly: Guid("4c0922d7-979e-4ff7-b44b-b8ac2100eeb5")] -[assembly: InternalsVisibleTo("NzbDrone.Core")] +[assembly: InternalsVisibleTo("Lidarr.Core")] diff --git a/src/NzbDrone.Api.Test/NzbDrone.Api.Test.csproj b/src/NzbDrone.Api.Test/NzbDrone.Api.Test.csproj index 32ed3c462..ffc34d23a 100644 --- a/src/NzbDrone.Api.Test/NzbDrone.Api.Test.csproj +++ b/src/NzbDrone.Api.Test/NzbDrone.Api.Test.csproj @@ -8,7 +8,7 @@ Library Properties NzbDrone.Api.Test - NzbDrone.Api.Test + Lidarr.Api.Test v4.6.1 512 ..\ diff --git a/src/NzbDrone.Api.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.Api.Test/Properties/AssemblyInfo.cs index b45cbd098..2bcd18392 100644 --- a/src/NzbDrone.Api.Test/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Api.Test/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Api.Test")] +[assembly: AssemblyTitle("Lidarr.Api.Test")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NzbDrone.Api.Test")] +[assembly: AssemblyProduct("Lidarr.Api.Test")] [assembly: AssemblyCopyright("Copyright © 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj b/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj index b185baf18..30cc080cb 100644 --- a/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj +++ b/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj @@ -9,7 +9,7 @@ Library Properties NzbDrone.App.Test - NzbDrone.App.Test + Lidarr.App.Test v4.6.1 512 ..\ diff --git a/src/NzbDrone.App.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.App.Test/Properties/AssemblyInfo.cs index 0d82bf1bf..3c316c92f 100644 --- a/src/NzbDrone.App.Test/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.App.Test/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.App.Test")] +[assembly: AssemblyTitle("Lidarr.App.Test")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NzbDrone.App.Test")] +[assembly: AssemblyProduct("Lidarr.App.Test")] [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NzbDrone.App.Test/RouterTest.cs b/src/NzbDrone.App.Test/RouterTest.cs index 411b0a1d4..de1f7db63 100644 --- a/src/NzbDrone.App.Test/RouterTest.cs +++ b/src/NzbDrone.App.Test/RouterTest.cs @@ -3,6 +3,7 @@ using Moq; using NUnit.Framework; using NzbDrone.Common; using NzbDrone.Common.EnvironmentInfo; +using NzbDrone.Common.Processes; using NzbDrone.Host; using NzbDrone.Test.Common; @@ -22,9 +23,12 @@ namespace NzbDrone.App.Test public void Route_should_call_install_service_when_application_mode_is_install() { var serviceProviderMock = Mocker.GetMock(MockBehavior.Strict); - serviceProviderMock.Setup(c => c.Install(ServiceProvider.SERVICE_NAME)); serviceProviderMock.Setup(c => c.ServiceExist(ServiceProvider.SERVICE_NAME)).Returns(false); - serviceProviderMock.Setup(c => c.Start(ServiceProvider.SERVICE_NAME)); + serviceProviderMock.Setup(c => c.Install(ServiceProvider.SERVICE_NAME)); + serviceProviderMock.Setup(c => c.SetPermissions(ServiceProvider.SERVICE_NAME)); + + Mocker.GetMock() + .Setup(c => c.SpawnNewProcess("sc.exe", It.IsAny(), null, true)); Mocker.GetMock().SetupGet(c => c.IsUserInteractive).Returns(true); Subject.Route(ApplicationModes.InstallService); @@ -37,13 +41,13 @@ namespace NzbDrone.App.Test public void Route_should_call_uninstall_service_when_application_mode_is_uninstall() { var serviceProviderMock = Mocker.GetMock(); - serviceProviderMock.Setup(c => c.UnInstall(ServiceProvider.SERVICE_NAME)); + serviceProviderMock.Setup(c => c.Uninstall(ServiceProvider.SERVICE_NAME)); Mocker.GetMock().SetupGet(c => c.IsUserInteractive).Returns(true); serviceProviderMock.Setup(c => c.ServiceExist(ServiceProvider.SERVICE_NAME)).Returns(true); Subject.Route(ApplicationModes.UninstallService); - serviceProviderMock.Verify(c => c.UnInstall(ServiceProvider.SERVICE_NAME), Times.Once()); + serviceProviderMock.Verify(c => c.Uninstall(ServiceProvider.SERVICE_NAME), Times.Once()); } [Test] diff --git a/src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj b/src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj index 3267d82b5..34e239a38 100644 --- a/src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj +++ b/src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj @@ -8,7 +8,7 @@ Library Properties NzbDrone.Automation.Test - NzbDrone.Automation.Test + Lidarr.Automation.Test v4.6.1 512 ..\ diff --git a/src/NzbDrone.Automation.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.Automation.Test/Properties/AssemblyInfo.cs index a5d255084..cea10d8a1 100644 --- a/src/NzbDrone.Automation.Test/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Automation.Test/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Automation.Test")] +[assembly: AssemblyTitle("Lidarr.Automation.Test")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NzbDrone.Automation.Test")] +[assembly: AssemblyProduct("Lidarr.Automation.Test")] [assembly: AssemblyCopyright("Copyright © 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj b/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj index cc9445bad..952513f98 100644 --- a/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj +++ b/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj @@ -9,7 +9,7 @@ Library Properties NzbDrone.Common.Test - NzbDrone.Common.Test + Lidarr.Common.Test v4.6.1 512 ..\ diff --git a/src/NzbDrone.Common.Test/ReflectionTests/ReflectionExtensionFixture.cs b/src/NzbDrone.Common.Test/ReflectionTests/ReflectionExtensionFixture.cs index 3e6c3fab9..4480b6449 100644 --- a/src/NzbDrone.Common.Test/ReflectionTests/ReflectionExtensionFixture.cs +++ b/src/NzbDrone.Common.Test/ReflectionTests/ReflectionExtensionFixture.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using FluentAssertions; using NUnit.Framework; using NzbDrone.Common.Reflection; @@ -12,7 +12,7 @@ namespace NzbDrone.Common.Test.ReflectionTests [Test] public void should_get_properties_from_models() { - var models = Assembly.Load("NzbDrone.Core").ImplementationsOf(); + var models = Assembly.Load("Lidarr.Core").ImplementationsOf(); foreach (var model in models) { @@ -23,9 +23,9 @@ namespace NzbDrone.Common.Test.ReflectionTests [Test] public void should_be_able_to_get_implementations() { - var models = Assembly.Load("NzbDrone.Core").ImplementationsOf(); + var models = Assembly.Load("Lidarr.Core").ImplementationsOf(); models.Should().NotBeEmpty(); } } -} \ No newline at end of file +} diff --git a/src/NzbDrone.Common.Test/ServiceProviderTests.cs b/src/NzbDrone.Common.Test/ServiceProviderTests.cs index 945aac2a9..4ebf15c93 100644 --- a/src/NzbDrone.Common.Test/ServiceProviderTests.cs +++ b/src/NzbDrone.Common.Test/ServiceProviderTests.cs @@ -36,7 +36,7 @@ namespace NzbDrone.Common.Test { if (Subject.ServiceExist(TEMP_SERVICE_NAME)) { - Subject.UnInstall(TEMP_SERVICE_NAME); + Subject.Uninstall(TEMP_SERVICE_NAME); } if (Subject.IsServiceRunning(ALWAYS_INSTALLED_SERVICE)) @@ -65,7 +65,7 @@ namespace NzbDrone.Common.Test Subject.ServiceExist(TEMP_SERVICE_NAME).Should().BeFalse("Service already installed"); Subject.Install(TEMP_SERVICE_NAME); Subject.ServiceExist(TEMP_SERVICE_NAME).Should().BeTrue(); - Subject.UnInstall(TEMP_SERVICE_NAME); + Subject.Uninstall(TEMP_SERVICE_NAME); Subject.ServiceExist(TEMP_SERVICE_NAME).Should().BeFalse(); ExceptionVerification.ExpectedWarns(1); @@ -76,7 +76,7 @@ namespace NzbDrone.Common.Test [ManualTest] public void UnInstallService() { - Subject.UnInstall(ServiceProvider.SERVICE_NAME); + Subject.Uninstall(ServiceProvider.SERVICE_NAME); Subject.ServiceExist(ServiceProvider.SERVICE_NAME).Should().BeFalse(); } diff --git a/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs b/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs index a4174a26f..7323c06f9 100644 --- a/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs +++ b/src/NzbDrone.Common/Composition/ContainerBuilderBase.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; @@ -18,8 +18,8 @@ namespace NzbDrone.Common.Composition { _loadedTypes = new List(); - assemblies.Add(OsInfo.IsWindows ? "NzbDrone.Windows" : "NzbDrone.Mono"); - assemblies.Add("NzbDrone.Common"); + assemblies.Add(OsInfo.IsWindows ? "Lidarr.Windows" : "Lidarr.Mono"); + assemblies.Add("Lidarr.Common"); foreach (var assembly in assemblies) { diff --git a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs index a2ce8a09c..0c6369a07 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs @@ -30,6 +30,8 @@ namespace NzbDrone.Common.EnvironmentInfo if (entry != null) { ExecutingApplication = entry.Location; + IsWindowsTray = OsInfo.IsWindows && entry.ManifestModule.Name == $"{ProcessProvider.LIDARR_PROCESS_NAME}.exe"; + } } @@ -146,5 +148,7 @@ namespace NzbDrone.Common.EnvironmentInfo return true; } + + public bool IsWindowsTray { get; private set; } } } diff --git a/src/NzbDrone.Common/NzbDrone.Common.csproj b/src/NzbDrone.Common/NzbDrone.Common.csproj index 44b2ae730..5606b2045 100644 --- a/src/NzbDrone.Common/NzbDrone.Common.csproj +++ b/src/NzbDrone.Common/NzbDrone.Common.csproj @@ -9,7 +9,7 @@ Library Properties NzbDrone.Common - NzbDrone.Common + Lidarr.Common v4.6.1 512 ..\ diff --git a/src/NzbDrone.Common/Processes/ProcessProvider.cs b/src/NzbDrone.Common/Processes/ProcessProvider.cs index ad104cb68..dcc86bebe 100644 --- a/src/NzbDrone.Common/Processes/ProcessProvider.cs +++ b/src/NzbDrone.Common/Processes/ProcessProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; @@ -27,7 +27,7 @@ namespace NzbDrone.Common.Processes bool Exists(string processName); ProcessPriorityClass GetCurrentProcessPriority(); Process Start(string path, string args = null, StringDictionary environmentVariables = null, Action onOutputDataReceived = null, Action onErrorDataReceived = null); - Process SpawnNewProcess(string path, string args = null, StringDictionary environmentVariables = null); + Process SpawnNewProcess(string path, string args = null, StringDictionary environmentVariables = null, bool noWindow = false); ProcessOutput StartAndCapture(string path, string args = null, StringDictionary environmentVariables = null); } @@ -172,7 +172,7 @@ namespace NzbDrone.Common.Processes return process; } - public Process SpawnNewProcess(string path, string args = null, StringDictionary environmentVariables = null) + public Process SpawnNewProcess(string path, string args = null, StringDictionary environmentVariables = null, bool noWindow = false) { if (PlatformInfo.IsMono && path.EndsWith(".exe", StringComparison.InvariantCultureIgnoreCase)) { @@ -183,6 +183,9 @@ namespace NzbDrone.Common.Processes _logger.Debug("Starting {0} {1}", path, args); var startInfo = new ProcessStartInfo(path, args); + startInfo.CreateNoWindow = noWindow; + startInfo.UseShellExecute = !noWindow; + var process = new Process { StartInfo = startInfo diff --git a/src/NzbDrone.Common/Properties/AssemblyInfo.cs b/src/NzbDrone.Common/Properties/AssemblyInfo.cs index 7ab20e84b..77d21a2e6 100644 --- a/src/NzbDrone.Common/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Common/Properties/AssemblyInfo.cs @@ -1,10 +1,10 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Common")] +[assembly: AssemblyTitle("Lidarr.Common")] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("b6eaa144-e13b-42e5-a738-c60d89c0f728")] diff --git a/src/NzbDrone.Common/Properties/SharedAssemblyInfo.cs b/src/NzbDrone.Common/Properties/SharedAssemblyInfo.cs index c1118072f..2234c9d14 100644 --- a/src/NzbDrone.Common/Properties/SharedAssemblyInfo.cs +++ b/src/NzbDrone.Common/Properties/SharedAssemblyInfo.cs @@ -1,11 +1,11 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // Gets updated at build time by TeamCity to branch name [assembly: AssemblyConfiguration("debug")] [assembly: AssemblyCompany("lidarr.audio")] -[assembly: AssemblyProduct("NzbDrone")] +[assembly: AssemblyProduct("Lidarr")] [assembly: AssemblyVersion("10.0.0.*")] [assembly: AssemblyCopyright("GNU General Public v3")] [assembly: AssemblyTrademark("")] diff --git a/src/NzbDrone.Common/Reflection/ReflectionExtensions.cs b/src/NzbDrone.Common/Reflection/ReflectionExtensions.cs index db7edc31b..2f54aa5a2 100644 --- a/src/NzbDrone.Common/Reflection/ReflectionExtensions.cs +++ b/src/NzbDrone.Common/Reflection/ReflectionExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; @@ -7,7 +7,7 @@ namespace NzbDrone.Common.Reflection { public static class ReflectionExtensions { - public static readonly Assembly CoreAssembly = Assembly.Load("NzbDrone.Core"); + public static readonly Assembly CoreAssembly = Assembly.Load("Lidarr.Core"); public static List GetSimpleProperties(this Type type) { @@ -70,4 +70,4 @@ namespace NzbDrone.Common.Reflection return type.GetCustomAttributes(typeof(TAttribute), true).Any(); } } -} \ No newline at end of file +} diff --git a/src/NzbDrone.Common/ServiceProvider.cs b/src/NzbDrone.Common/ServiceProvider.cs index 4dae9e078..2819c2736 100644 --- a/src/NzbDrone.Common/ServiceProvider.cs +++ b/src/NzbDrone.Common/ServiceProvider.cs @@ -1,10 +1,11 @@ -using System; +using System; using System.Collections.Specialized; using System.Configuration.Install; using System.Diagnostics; using System.Linq; using System.ServiceProcess; using NLog; +using NzbDrone.Common.Extensions; using NzbDrone.Common.Processes; namespace NzbDrone.Common @@ -14,13 +15,14 @@ namespace NzbDrone.Common bool ServiceExist(string name); bool IsServiceRunning(string name); void Install(string serviceName); - void UnInstall(string serviceName); + void Uninstall(string serviceName); void Run(ServiceBase service); ServiceController GetService(string serviceName); void Stop(string serviceName); void Start(string serviceName); ServiceControllerStatus GetStatus(string serviceName); void Restart(string serviceName); + void SetPermissions(string serviceName); } public class ServiceProvider : IServiceProvider @@ -30,7 +32,6 @@ namespace NzbDrone.Common private readonly IProcessProvider _processProvider; private readonly Logger _logger; - public ServiceProvider(IProcessProvider processProvider, Logger logger) { _processProvider = processProvider; @@ -66,7 +67,7 @@ namespace NzbDrone.Common var installer = new ServiceProcessInstaller { - Account = ServiceAccount.LocalSystem + Account = ServiceAccount.LocalService }; var serviceInstaller = new ServiceInstaller(); @@ -89,7 +90,7 @@ namespace NzbDrone.Common _logger.Info("Service Has installed successfully."); } - public virtual void UnInstall(string serviceName) + public virtual void Uninstall(string serviceName) { _logger.Info("Uninstalling {0} service", serviceName); @@ -189,5 +190,42 @@ namespace NzbDrone.Common _processProvider.Start("cmd.exe", args); } + + public void SetPermissions(string serviceName) + { + var dacls = GetServiceDacls(serviceName); + SetServiceDacls(serviceName, dacls); + } + + private string GetServiceDacls(string serviceName) + { + var output = _processProvider.StartAndCapture("sc.exe", $"sdshow {serviceName}"); + + var dacls = output.Standard.Select(s => s.Content).Where(s => s.IsNotNullOrWhiteSpace()).ToList(); + + if (dacls.Count == 1) + { + return dacls[0]; + } + + throw new ArgumentException("Invalid DACL output"); + } + + private void SetServiceDacls(string serviceName, string dacls) + { + const string authenticatedUsersDacl = "(A;;CCLCSWRPWPLOCRRC;;;AU)"; + + if (dacls.Contains(authenticatedUsersDacl)) + { + // Permssions already set + return; + } + + var indexOfS = dacls.IndexOf("S:", StringComparison.InvariantCultureIgnoreCase); + + dacls = indexOfS == -1 ? $"{dacls}{authenticatedUsersDacl}" : dacls.Insert(indexOfS, authenticatedUsersDacl); + + _processProvider.Start("sc.exe", $"sdset {serviceName} {dacls}").WaitForExit(); + } } -} \ No newline at end of file +} diff --git a/src/NzbDrone.Console/Properties/AssemblyInfo.cs b/src/NzbDrone.Console/Properties/AssemblyInfo.cs index afad85dfd..78d2227d3 100644 --- a/src/NzbDrone.Console/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Console/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index 053715ae8..d5a0c106e 100644 --- a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -9,7 +9,7 @@ Library Properties NzbDrone.Core.Test - NzbDrone.Core.Test + Lidarr.Core.Test v4.6.1 512 ..\ diff --git a/src/NzbDrone.Core.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.Core.Test/Properties/AssemblyInfo.cs index 867cfc620..606b5b963 100644 --- a/src/NzbDrone.Core.Test/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Core.Test/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -6,11 +6,11 @@ using System.Runtime.InteropServices; // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Core.Test")] +[assembly: AssemblyTitle("Lidarr.Core.Test")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NzbDrone.Core.Test")] +[assembly: AssemblyProduct("Lidarr.Core.Test")] [assembly: AssemblyCopyright("Copyright © Microsoft 2010")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -25,4 +25,4 @@ using System.Runtime.InteropServices; [assembly: Guid("699aed1b-015e-4f0d-9c81-d5557b05d260")] -[assembly: InternalsVisibleTo("NzbDrone.Core")] \ No newline at end of file +[assembly: InternalsVisibleTo("Lidarr.Core")] diff --git a/src/NzbDrone.Core/NzbDrone.Core.dll.config b/src/NzbDrone.Core/Lidarr.Core.dll.config similarity index 100% rename from src/NzbDrone.Core/NzbDrone.Core.dll.config rename to src/NzbDrone.Core/Lidarr.Core.dll.config diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index 27e832e38..06c7af236 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -9,7 +9,7 @@ Library Properties NzbDrone.Core - NzbDrone.Core + Lidarr.Core v4.6.1 @@ -1059,7 +1059,7 @@ - + Always diff --git a/src/NzbDrone.Core/Properties/AssemblyInfo.cs b/src/NzbDrone.Core/Properties/AssemblyInfo.cs index 7ddb4d5ec..352317239 100644 --- a/src/NzbDrone.Core/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Core/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -6,9 +6,9 @@ using System.Runtime.InteropServices; // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Core")] +[assembly: AssemblyTitle("Lidarr.Core")] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("3C29FEF7-4B07-49ED-822E-1C29DC49BFAB")] -[assembly: InternalsVisibleTo("NzbDrone.Core.Test")] +[assembly: InternalsVisibleTo("Lidarr.Core.Test")] diff --git a/src/NzbDrone.Host/MainAppContainerBuilder.cs b/src/NzbDrone.Host/MainAppContainerBuilder.cs index c8d4e417f..86dfc9b93 100644 --- a/src/NzbDrone.Host/MainAppContainerBuilder.cs +++ b/src/NzbDrone.Host/MainAppContainerBuilder.cs @@ -14,9 +14,9 @@ namespace NzbDrone.Host { var assemblies = new List { - "NzbDrone.Host", - "NzbDrone.Core", - "NzbDrone.SignalR", + "Lidarr.Host", + "Lidarr.Core", + "Lidarr.SignalR", "Lidarr.Api.V3", "Lidarr.Http" }; diff --git a/src/NzbDrone.Host/NzbDrone.Host.csproj b/src/NzbDrone.Host/NzbDrone.Host.csproj index acd6d0462..64b28955f 100644 --- a/src/NzbDrone.Host/NzbDrone.Host.csproj +++ b/src/NzbDrone.Host/NzbDrone.Host.csproj @@ -9,7 +9,7 @@ Library Properties NzbDrone.Host - NzbDrone.Host + Lidarr.Host v4.6.1 512 diff --git a/src/NzbDrone.Host/Router.cs b/src/NzbDrone.Host/Router.cs index 32fc9a3be..48e72f873 100644 --- a/src/NzbDrone.Host/Router.cs +++ b/src/NzbDrone.Host/Router.cs @@ -1,5 +1,10 @@ -using NLog; +using System; +using NLog; using NzbDrone.Common; +using NzbDrone.Common.EnvironmentInfo; +using NzbDrone.Common.Processes; +using IServiceProvider = NzbDrone.Common.IServiceProvider; + namespace NzbDrone.Host { @@ -8,14 +13,19 @@ namespace NzbDrone.Host private readonly INzbDroneServiceFactory _nzbDroneServiceFactory; private readonly IServiceProvider _serviceProvider; private readonly IConsoleService _consoleService; + private readonly IProcessProvider _processProvider; private readonly Logger _logger; - public Router(INzbDroneServiceFactory nzbDroneServiceFactory, IServiceProvider serviceProvider, - IConsoleService consoleService, Logger logger) + public Router(INzbDroneServiceFactory nzbDroneServiceFactory, + IServiceProvider serviceProvider, + IConsoleService consoleService, + IProcessProvider processProvider, + Logger logger) { _nzbDroneServiceFactory = nzbDroneServiceFactory; _serviceProvider = serviceProvider; _consoleService = consoleService; + _processProvider = processProvider; _logger = logger; } @@ -48,7 +58,11 @@ namespace NzbDrone.Host else { _serviceProvider.Install(ServiceProvider.SERVICE_NAME); - _serviceProvider.Start(ServiceProvider.SERVICE_NAME); + _serviceProvider.SetPermissions(ServiceProvider.SERVICE_NAME); + + // Start the service and exit. + // Ensures that there isn't an instance of Sonarr already running that the service account cannot stop. + _processProvider.SpawnNewProcess("sc.exe", $"start {ServiceProvider.SERVICE_NAME}", null, true); } break; } @@ -61,7 +75,7 @@ namespace NzbDrone.Host } else { - _serviceProvider.UnInstall(ServiceProvider.SERVICE_NAME); + _serviceProvider.Uninstall(ServiceProvider.SERVICE_NAME); } break; diff --git a/src/NzbDrone.Integration.Test/ApiTests/ArtistFixture.cs b/src/NzbDrone.Integration.Test/ApiTests/ArtistFixture.cs index 3b2275943..e6ebff506 100644 --- a/src/NzbDrone.Integration.Test/ApiTests/ArtistFixture.cs +++ b/src/NzbDrone.Integration.Test/ApiTests/ArtistFixture.cs @@ -12,10 +12,10 @@ namespace NzbDrone.Integration.Test.ApiTests [Test, Order(0)] public void add_artist_with_tags_should_store_them() { - EnsureNoArtist("266189", "Alien Ant Farm"); + EnsureNoArtist("f59c5520-5f46-4d2c-b2c4-822eabf53419", "Linkin Park"); var tag = EnsureTag("abc"); - var artist = Artist.Lookup("lidarr:266189").Single(); + var artist = Artist.Lookup("lidarr:f59c5520-5f46-4d2c-b2c4-822eabf53419").Single(); artist.QualityProfileId = 1; artist.Path = Path.Combine(ArtistRootFolder, artist.ArtistName); @@ -31,9 +31,9 @@ namespace NzbDrone.Integration.Test.ApiTests [Test, Order(0)] public void add_artist_without_profileid_should_return_badrequest() { - EnsureNoArtist("266189", "Alien Ant Farm"); + EnsureNoArtist("f59c5520-5f46-4d2c-b2c4-822eabf53419", "Linkin Park"); - var artist = Artist.Lookup("lidarr:266189").Single(); + var artist = Artist.Lookup("lidarr:f59c5520-5f46-4d2c-b2c4-822eabf53419").Single(); artist.Path = Path.Combine(ArtistRootFolder, artist.ArtistName); @@ -43,9 +43,9 @@ namespace NzbDrone.Integration.Test.ApiTests [Test, Order(0)] public void add_artist_without_path_should_return_badrequest() { - EnsureNoArtist("266189", "Alien Ant Farm"); + EnsureNoArtist("f59c5520-5f46-4d2c-b2c4-822eabf53419", "Linkin Park"); - var artist = Artist.Lookup("lidarr:266189").Single(); + var artist = Artist.Lookup("lidarr:f59c5520-5f46-4d2c-b2c4-822eabf53419").Single(); artist.QualityProfileId = 1; @@ -55,9 +55,9 @@ namespace NzbDrone.Integration.Test.ApiTests [Test, Order(1)] public void add_artist() { - EnsureNoArtist("266189", "Alien Ant Farm"); + EnsureNoArtist("f59c5520-5f46-4d2c-b2c4-822eabf53419", "Linkin Park"); - var artist = Artist.Lookup("lidarr:266189").Single(); + var artist = Artist.Lookup("lidarr:f59c5520-5f46-4d2c-b2c4-822eabf53419").Single(); artist.QualityProfileId = 1; artist.Path = Path.Combine(ArtistRootFolder, artist.ArtistName); @@ -119,7 +119,7 @@ namespace NzbDrone.Integration.Test.ApiTests [Test, Order(3)] public void update_artist_monitored() { - var artist = EnsureArtist("266189", "Alien Ant Farm", false); + var artist = EnsureArtist("f59c5520-5f46-4d2c-b2c4-822eabf53419", "Linkin Park", false); artist.Monitored.Should().BeFalse(); //artist.Seasons.First().Monitored.Should().BeFalse(); diff --git a/src/NzbDrone.Integration.Test/CorsFixture.cs b/src/NzbDrone.Integration.Test/CorsFixture.cs index f2c0f378a..d27539ba8 100644 --- a/src/NzbDrone.Integration.Test/CorsFixture.cs +++ b/src/NzbDrone.Integration.Test/CorsFixture.cs @@ -10,7 +10,7 @@ namespace NzbDrone.Integration.Test { private RestRequest BuildRequest() { - var request = new RestRequest("series"); + var request = new RestRequest("artist"); request.AddHeader(AccessControlHeaders.RequestMethod, "POST"); return request; diff --git a/src/NzbDrone.Integration.Test/IntegrationTestBase.cs b/src/NzbDrone.Integration.Test/IntegrationTestBase.cs index 4b8e7ee89..55e1c5046 100644 --- a/src/NzbDrone.Integration.Test/IntegrationTestBase.cs +++ b/src/NzbDrone.Integration.Test/IntegrationTestBase.cs @@ -40,7 +40,7 @@ namespace NzbDrone.Integration.Test public ClientBase Blacklist; public CommandClient Commands; public DownloadClientClient DownloadClients; - public AlbumClient Episodes; + public AlbumClient Albums; public TrackClient Tracks; public ClientBase History; public ClientBase HostConfig; @@ -101,7 +101,7 @@ namespace NzbDrone.Integration.Test Blacklist = new ClientBase(RestClient, ApiKey); Commands = new CommandClient(RestClient, ApiKey); DownloadClients = new DownloadClientClient(RestClient, ApiKey); - Episodes = new AlbumClient(RestClient, ApiKey); + Albums = new AlbumClient(RestClient, ApiKey); History = new ClientBase(RestClient, ApiKey); HostConfig = new ClientBase(RestClient, ApiKey, "config/host"); Indexers = new IndexerClient(RestClient, ApiKey); @@ -212,6 +212,7 @@ namespace NzbDrone.Integration.Test var lookup = Artist.Lookup("lidarr:" + lidarrId); var artist = lookup.First(); artist.QualityProfileId = 1; + artist.LanguageProfileId = 1; artist.Path = Path.Combine(ArtistRootFolder, artist.ArtistName); artist.Monitored = true; artist.AddOptions = new Core.Music.AddArtistOptions(); diff --git a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj index 52ce7e544..8bf66b9e7 100644 --- a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj @@ -8,7 +8,7 @@ Library Properties NzbDrone.Integration.Test - NzbDrone.Integration.Test + Lidarr.Integration.Test v4.6.1 512 ..\ diff --git a/src/NzbDrone.Integration.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.Integration.Test/Properties/AssemblyInfo.cs index 7950fa539..a53b560c0 100644 --- a/src/NzbDrone.Integration.Test/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Integration.Test/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Smoke.Test")] +[assembly: AssemblyTitle("Lidarr.Smoke.Test")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NzbDrone.Smoke.Test")] +[assembly: AssemblyProduct("Lidarr.Smoke.Test")] [assembly: AssemblyCopyright("Copyright © 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj b/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj index 7eef65860..2d9d78b03 100644 --- a/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj +++ b/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj @@ -8,7 +8,7 @@ Library Properties NzbDrone.Libraries.Test - NzbDrone.Libraries.Test + Lidarr.Libraries.Test v4.6.1 512 ..\ diff --git a/src/NzbDrone.Libraries.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.Libraries.Test/Properties/AssemblyInfo.cs index 883df114e..7e777db60 100644 --- a/src/NzbDrone.Libraries.Test/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Libraries.Test/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Libraries.Test")] +[assembly: AssemblyTitle("Lidarr.Libraries.Test")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NzbDrone.Libraries.Test")] +[assembly: AssemblyProduct("Lidarr.Libraries.Test")] [assembly: AssemblyCopyright("Copyright © 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NzbDrone.Mono.Test/NzbDrone.Mono.Test.csproj b/src/NzbDrone.Mono.Test/NzbDrone.Mono.Test.csproj index 663a985f0..1caca6658 100644 --- a/src/NzbDrone.Mono.Test/NzbDrone.Mono.Test.csproj +++ b/src/NzbDrone.Mono.Test/NzbDrone.Mono.Test.csproj @@ -8,7 +8,7 @@ Library Properties NzbDrone.Mono.Test - NzbDrone.Mono.Test + Lidarr.Mono.Test v4.6.1 512 ..\ diff --git a/src/NzbDrone.Mono.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.Mono.Test/Properties/AssemblyInfo.cs index 012007b52..9bacc9f2f 100644 --- a/src/NzbDrone.Mono.Test/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Mono.Test/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Mono.Test")] +[assembly: AssemblyTitle("Lidarr.Mono.Test")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NzbDrone.Mono.Test")] +[assembly: AssemblyProduct("Lidarr.Mono.Test")] [assembly: AssemblyCopyright("Copyright © 2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NzbDrone.Mono/NzbDrone.Mono.csproj b/src/NzbDrone.Mono/NzbDrone.Mono.csproj index 68106a478..34516784d 100644 --- a/src/NzbDrone.Mono/NzbDrone.Mono.csproj +++ b/src/NzbDrone.Mono/NzbDrone.Mono.csproj @@ -8,7 +8,7 @@ Library Properties NzbDrone.Mono - NzbDrone.Mono + Lidarr.Mono v4.6.1 512 diff --git a/src/NzbDrone.Mono/Properties/AssemblyInfo.cs b/src/NzbDrone.Mono/Properties/AssemblyInfo.cs index 3d0a8c8b7..f9d51f7d9 100644 --- a/src/NzbDrone.Mono/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Mono/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Mono")] +[assembly: AssemblyTitle("Lidarr.Mono")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NzbDrone.Mono")] +[assembly: AssemblyProduct("Lidarr.Mono")] [assembly: AssemblyCopyright("Copyright © 2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj b/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj index bb075487f..e05444021 100644 --- a/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj +++ b/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj @@ -8,7 +8,7 @@ Library Properties NzbDrone.SignalR - NzbDrone.SignalR + Lidarr.SignalR v4.6.1 512 ..\ diff --git a/src/NzbDrone.SignalR/Properties/AssemblyInfo.cs b/src/NzbDrone.SignalR/Properties/AssemblyInfo.cs index 5a0c4d1cd..9bdb0da6c 100644 --- a/src/NzbDrone.SignalR/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.SignalR/Properties/AssemblyInfo.cs @@ -1,9 +1,9 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.SignalR")] +[assembly: AssemblyTitle("Lidarr.SignalR")] [assembly: Guid("98bd985a-4f23-4201-8ed3-f6f3d7f2a5fe")] diff --git a/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs b/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs index 5cf6805a8..d8ef41b9a 100644 --- a/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs +++ b/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs @@ -171,11 +171,11 @@ namespace NzbDrone.Test.Common.AutoMoq private void RegisterPlatformLibrary(IUnityContainer container) { - var assemblyName = "NzbDrone.Windows"; + var assemblyName = "Lidarr.Windows"; if (OsInfo.IsNotWindows) { - assemblyName = "NzbDrone.Mono"; + assemblyName = "Lidarr.Mono"; } if (!File.Exists(assemblyName + ".dll")) @@ -188,4 +188,4 @@ namespace NzbDrone.Test.Common.AutoMoq #endregion } -} \ No newline at end of file +} diff --git a/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj b/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj index 3d4f8b2b3..f710cb88b 100644 --- a/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj +++ b/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj @@ -9,7 +9,7 @@ Library Properties NzbDrone.Test.Common - NzbDrone.Test.Common + Lidarr.Test.Common v4.6.1 512 ..\ diff --git a/src/NzbDrone.Test.Common/Properties/AssemblyInfo.cs b/src/NzbDrone.Test.Common/Properties/AssemblyInfo.cs index b1487e507..a73dfabf8 100644 --- a/src/NzbDrone.Test.Common/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Test.Common/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Test.Common")] +[assembly: AssemblyTitle("Lidarr.Test.Common")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NzbDrone.Test.Common")] +[assembly: AssemblyProduct("Lidarr.Test.Common")] [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NzbDrone.Test.Dummy/DummyApp.cs b/src/NzbDrone.Test.Dummy/DummyApp.cs index 5176dab6f..37b7f261e 100644 --- a/src/NzbDrone.Test.Dummy/DummyApp.cs +++ b/src/NzbDrone.Test.Dummy/DummyApp.cs @@ -1,11 +1,11 @@ -using System; +using System; using System.Diagnostics; namespace NzbDrone.Test.Dummy { public class DummyApp { - public const string DUMMY_PROCCESS_NAME = "NzbDrone.Test.Dummy"; + public const string DUMMY_PROCCESS_NAME = "Lidarr.Test.Dummy"; static void Main(string[] args) { diff --git a/src/NzbDrone.Test.Dummy/NzbDrone.Test.Dummy.csproj b/src/NzbDrone.Test.Dummy/NzbDrone.Test.Dummy.csproj index 0a9d39c47..ebf6a23aa 100644 --- a/src/NzbDrone.Test.Dummy/NzbDrone.Test.Dummy.csproj +++ b/src/NzbDrone.Test.Dummy/NzbDrone.Test.Dummy.csproj @@ -9,7 +9,7 @@ Exe Properties NzbDrone.Test.Dummy - NzbDrone.Test.Dummy + Lidarr.Test.Dummy v4.6.1 diff --git a/src/NzbDrone.Test.Dummy/Properties/AssemblyInfo.cs b/src/NzbDrone.Test.Dummy/Properties/AssemblyInfo.cs index 0dec52aa7..fe958f227 100644 --- a/src/NzbDrone.Test.Dummy/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Test.Dummy/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Test.Dummy")] +[assembly: AssemblyTitle("Lidarr.Test.Dummy")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NzbDrone.Test.Dummy")] +[assembly: AssemblyProduct("Lidarr.Test.Dummy")] [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj b/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj index 206539196..993138c50 100644 --- a/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj +++ b/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj @@ -9,7 +9,7 @@ Library Properties NzbDrone.Update.Test - NzbDrone.Update.Test + Lidarr.Update.Test v4.6.1 diff --git a/src/NzbDrone.Update.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.Update.Test/Properties/AssemblyInfo.cs index 3eed9b81b..e7a36b7be 100644 --- a/src/NzbDrone.Update.Test/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Update.Test/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Update.Test")] +[assembly: AssemblyTitle("Lidarr.Update.Test")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NzbDrone.Update.Test")] +[assembly: AssemblyProduct("Lidarr.Update.Test")] [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NzbDrone.Update.Test/StartNzbDroneService.cs b/src/NzbDrone.Update.Test/StartNzbDroneService.cs index 0cc2e2e3a..087cecb16 100644 --- a/src/NzbDrone.Update.Test/StartNzbDroneService.cs +++ b/src/NzbDrone.Update.Test/StartNzbDroneService.cs @@ -32,7 +32,7 @@ namespace NzbDrone.Update.Test Subject.Start(AppType.Service, targetFolder); - Mocker.GetMock().Verify(c => c.SpawnNewProcess("c:\\Lidarr\\Lidarr.Console.exe", "/" + StartupContext.NO_BROWSER, null), Times.Once()); + Mocker.GetMock().Verify(c => c.SpawnNewProcess("c:\\Lidarr\\Lidarr.Console.exe", "/" + StartupContext.NO_BROWSER, null, false), Times.Once()); ExceptionVerification.ExpectedWarns(1); } diff --git a/src/NzbDrone.Update/Properties/AssemblyInfo.cs b/src/NzbDrone.Update/Properties/AssemblyInfo.cs index 4289d6b2f..652646236 100644 --- a/src/NzbDrone.Update/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Update/Properties/AssemblyInfo.cs @@ -1,10 +1,10 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Update")] +[assembly: AssemblyTitle("Lidarr.Update")] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("e4560a3d-8053-4d57-a260-bfe52f4cc357")] diff --git a/src/NzbDrone.Windows.Test/NzbDrone.Windows.Test.csproj b/src/NzbDrone.Windows.Test/NzbDrone.Windows.Test.csproj index 41115ac08..c70c85c06 100644 --- a/src/NzbDrone.Windows.Test/NzbDrone.Windows.Test.csproj +++ b/src/NzbDrone.Windows.Test/NzbDrone.Windows.Test.csproj @@ -8,7 +8,7 @@ Library Properties NzbDrone.Windows.Test - NzbDrone.Windows.Test + Lidarr.Windows.Test v4.6.1 512 ..\ diff --git a/src/NzbDrone.Windows.Test/Properties/AssemblyInfo.cs b/src/NzbDrone.Windows.Test/Properties/AssemblyInfo.cs index c881ae54e..e4c165eb6 100644 --- a/src/NzbDrone.Windows.Test/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Windows.Test/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Windows.Test")] +[assembly: AssemblyTitle("Lidarr.Windows.Test")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NzbDrone.Windows.Test")] +[assembly: AssemblyProduct("Lidarr.Windows.Test")] [assembly: AssemblyCopyright("Copyright © 2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/NzbDrone.Windows/NzbDrone.Windows.csproj b/src/NzbDrone.Windows/NzbDrone.Windows.csproj index df9e689c3..20b8e9c28 100644 --- a/src/NzbDrone.Windows/NzbDrone.Windows.csproj +++ b/src/NzbDrone.Windows/NzbDrone.Windows.csproj @@ -8,7 +8,7 @@ Library Properties NzbDrone.Windows - NzbDrone.Windows + Lidarr.Windows v4.6.1 512 ..\ diff --git a/src/NzbDrone.Windows/Properties/AssemblyInfo.cs b/src/NzbDrone.Windows/Properties/AssemblyInfo.cs index bbeee6014..1ea78db56 100644 --- a/src/NzbDrone.Windows/Properties/AssemblyInfo.cs +++ b/src/NzbDrone.Windows/Properties/AssemblyInfo.cs @@ -1,14 +1,14 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("NzbDrone.Windows")] +[assembly: AssemblyTitle("Lidarr.Windows")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NzbDrone.Windows")] +[assembly: AssemblyProduct("Lidarr.Windows")] [assembly: AssemblyCopyright("Copyright © 2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/ServiceHelpers/ServiceInstall/ServiceHelper.cs b/src/ServiceHelpers/ServiceInstall/ServiceHelper.cs index 7dcd40cef..265b86c43 100644 --- a/src/ServiceHelpers/ServiceInstall/ServiceHelper.cs +++ b/src/ServiceHelpers/ServiceInstall/ServiceHelper.cs @@ -50,13 +50,11 @@ namespace ServiceInstall process.BeginOutputReadLine(); process.WaitForExit(); - } private static void OnDataReceived(object sender, DataReceivedEventArgs e) { Console.WriteLine(e.Data); } - } } diff --git a/src/ServiceHelpers/ServiceUninstall/ServiceHelper.cs b/src/ServiceHelpers/ServiceUninstall/ServiceHelper.cs index 0e0378004..9ad0944ee 100644 --- a/src/ServiceHelpers/ServiceUninstall/ServiceHelper.cs +++ b/src/ServiceHelpers/ServiceUninstall/ServiceHelper.cs @@ -50,13 +50,11 @@ namespace ServiceUninstall process.BeginOutputReadLine(); process.WaitForExit(); - } private static void OnDataReceived(object sender, DataReceivedEventArgs e) { Console.WriteLine(e.Data); } - } }