From 8bd3b9f8d8c90f9ada1280bd62af7bd2f9e16108 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 13 Aug 2017 16:35:17 -0400 Subject: [PATCH 01/15] 3.2.27.0 --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 09b55030f..15b923d63 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.26.26")] +[assembly: AssemblyVersion("3.2.27.0")] From 19c3ad643cd3f5eba0682fb9700187751f71c2d8 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 15 Aug 2017 23:38:25 -0400 Subject: [PATCH 02/15] fix merge conflict --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 15b923d63..b2c885b0a 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.27.0")] +[assembly: AssemblyVersion("3.2.27.1")] From 77d4791dc2ade5561ae4cf9339f85bd4d593cf7d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 15 Aug 2017 23:39:05 -0400 Subject: [PATCH 03/15] update version --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index b2c885b0a..15b923d63 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.27.1")] +[assembly: AssemblyVersion("3.2.27.0")] From 6b077f3f8467caa26388a25e6acd1990d286b5d0 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 19 Aug 2017 16:06:00 -0400 Subject: [PATCH 04/15] fix merge conflict --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 15b923d63..7f7bb8564 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.27.0")] +[assembly: AssemblyVersion("3.2.27.3")] From 9ccdd71f29e7ceeb28fbcc421c88d2b304f77a1d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 20 Aug 2017 15:06:05 -0400 Subject: [PATCH 05/15] fix quick play with play button --- Emby.Server.Implementations/Dto/DtoService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index e1d0a1858..c49c318ee 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -517,7 +517,7 @@ namespace Emby.Server.Implementations.Dto } } - if (/*!(item is LiveTvProgram) ||*/ fields.Contains(ItemFields.PlayAccess)) + if (!(item is LiveTvProgram) || fields.Contains(ItemFields.PlayAccess)) { dto.PlayAccess = item.GetPlayAccess(user); } From 42816d6c043c00fefebc1358b9af67e7c7faa71b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 20 Aug 2017 15:06:21 -0400 Subject: [PATCH 06/15] 3.2.28.0 --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 7f7bb8564..fcd6b4bee 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.27.3")] +[assembly: AssemblyVersion("3.2.28.0")] From cc9feb17c4d5adcb58d74180d0cbc963c152ae9c Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 22 Aug 2017 14:46:16 -0400 Subject: [PATCH 07/15] update mac project --- MediaBrowser.Server.Mac.sln | 68 ------------------- MediaBrowser.Server.Mac/Main.cs | 26 +++---- .../Native/MonoFileSystem.cs | 2 +- 3 files changed, 11 insertions(+), 85 deletions(-) diff --git a/MediaBrowser.Server.Mac.sln b/MediaBrowser.Server.Mac.sln index ba912566a..051ea660b 100644 --- a/MediaBrowser.Server.Mac.sln +++ b/MediaBrowser.Server.Mac.sln @@ -17,8 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Model", "Media EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Providers", "MediaBrowser.Providers\MediaBrowser.Providers.csproj", "{442B5058-DCAF-4263-BB6A-F21E31120A1B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Server.Implementations", "MediaBrowser.Server.Implementations\MediaBrowser.Server.Implementations.csproj", "{2E781478-814D-4A48-9D80-BFF206441A65}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.WebDashboard", "MediaBrowser.WebDashboard\MediaBrowser.WebDashboard.csproj", "{5624B7B5-B5A7-41D8-9F10-CC5611109619}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.XbmcMetadata", "MediaBrowser.XbmcMetadata\MediaBrowser.XbmcMetadata.csproj", "{23499896-B135-4527-8574-C26E926EA99E}" @@ -41,8 +39,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RSSDP", "RSSDP\RSSDP.csproj EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Drawing.Skia", "Emby.Drawing.Skia\Emby.Drawing.Skia.csproj", "{2312DA6D-FF86-4597-9777-BCEEC32D96DD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Common.Implementations", "Emby.Common.Implementations\Emby.Common.Implementations.csproj", "{1E37A338-9F57-4B70-BD6D-BB9C591E319B}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SocketHttpListener", "SocketHttpListener\SocketHttpListener.csproj", "{1D74413B-E7CF-455B-B021-F52BDF881542}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Nat", "Mono.Nat\Mono.Nat.csproj", "{CB7F2326-6497-4A3D-BA03-48513B17A7BE}" @@ -210,26 +206,6 @@ Global {442B5058-DCAF-4263-BB6A-F21E31120A1B}.Signed|Any CPU.Build.0 = Release Mono|Any CPU {442B5058-DCAF-4263-BB6A-F21E31120A1B}.Signed|x86.ActiveCfg = Release Mono|Any CPU {442B5058-DCAF-4263-BB6A-F21E31120A1B}.Signed|x86.Build.0 = Release Mono|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.AppStore|Any CPU.Build.0 = Release|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.AppStore|x86.ActiveCfg = Release Mono|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.AppStore|x86.Build.0 = Release Mono|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Debug|x86.ActiveCfg = Debug|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Debug|x86.Build.0 = Debug|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Release Mono|Any CPU.ActiveCfg = Release Mono|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Release Mono|Any CPU.Build.0 = Release Mono|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Release Mono|x86.ActiveCfg = Release Mono|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Release Mono|x86.Build.0 = Release Mono|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Release|Any CPU.Build.0 = Release|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Release|x86.ActiveCfg = Release|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Release|x86.Build.0 = Release|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Signed|Any CPU.ActiveCfg = Release Mono|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Signed|Any CPU.Build.0 = Release Mono|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Signed|x86.ActiveCfg = Release Mono|Any CPU - {2E781478-814D-4A48-9D80-BFF206441A65}.Signed|x86.Build.0 = Release Mono|Any CPU {5624B7B5-B5A7-41D8-9F10-CC5611109619}.AppStore|Any CPU.ActiveCfg = Release|Any CPU {5624B7B5-B5A7-41D8-9F10-CC5611109619}.AppStore|Any CPU.Build.0 = Release|Any CPU {5624B7B5-B5A7-41D8-9F10-CC5611109619}.AppStore|x86.ActiveCfg = Release Mono|Any CPU @@ -470,50 +446,6 @@ Global {2312DA6D-FF86-4597-9777-BCEEC32D96DD}.Signed|x64.Build.0 = Release|Any CPU {2312DA6D-FF86-4597-9777-BCEEC32D96DD}.Signed|x86.ActiveCfg = Release|Any CPU {2312DA6D-FF86-4597-9777-BCEEC32D96DD}.Signed|x86.Build.0 = Release|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.AppStore|x86.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.AppStore|x86.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Debug|x86.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Debug|x86.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release Mono|Any CPU.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release Mono|Any CPU.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release Mono|x86.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release Mono|x86.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release|Any CPU.Build.0 = Release|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release|x86.ActiveCfg = Release|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release|x86.Build.0 = Release|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Signed|Any CPU.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Signed|Any CPU.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Signed|x86.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Signed|x86.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Debug|Win32.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Debug|Win32.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Debug|x64.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Debug|x64.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release Mono|Mixed Platforms.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release Mono|Mixed Platforms.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release Mono|Win32.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release Mono|Win32.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release Mono|x64.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release Mono|x64.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release|Win32.ActiveCfg = Release|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release|Win32.Build.0 = Release|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release|x64.ActiveCfg = Release|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Release|x64.Build.0 = Release|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Signed|Mixed Platforms.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Signed|Mixed Platforms.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Signed|Win32.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Signed|Win32.Build.0 = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Signed|x64.ActiveCfg = Debug|Any CPU - {1E37A338-9F57-4B70-BD6D-BB9C591E319B}.Signed|x64.Build.0 = Debug|Any CPU {1D74413B-E7CF-455B-B021-F52BDF881542}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU {1D74413B-E7CF-455B-B021-F52BDF881542}.AppStore|Any CPU.Build.0 = Debug|Any CPU {1D74413B-E7CF-455B-B021-F52BDF881542}.AppStore|x86.ActiveCfg = Debug|Any CPU diff --git a/MediaBrowser.Server.Mac/Main.cs b/MediaBrowser.Server.Mac/Main.cs index cedeeb22e..e70ef01eb 100644 --- a/MediaBrowser.Server.Mac/Main.cs +++ b/MediaBrowser.Server.Mac/Main.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Logging; -using MediaBrowser.Server.Implementations; using System; using System.Diagnostics; using System.Globalization; @@ -20,21 +19,18 @@ using MonoMac.ObjCRuntime; using Emby.Server.Core; using Emby.Server.Core.Cryptography; using Emby.Server.Implementations; -using Emby.Common.Implementations.Logging; using Emby.Server.Implementations.Logging; -using Emby.Common.Implementations.EnvironmentInfo; using Emby.Server.Mac.Native; using Emby.Server.Implementations.IO; -using Emby.Common.Implementations.Networking; -using Emby.Common.Implementations.Cryptography; using Mono.Unix.Native; using MediaBrowser.Model.System; using MediaBrowser.Model.IO; -using Emby.Server.Implementations.Logging; using Emby.Drawing; using Emby.Drawing.Skia; using MediaBrowser.Controller.Drawing; using MediaBrowser.Model.Drawing; +using Emby.Server.Implementations.EnvironmentInfo; +using Emby.Server.Implementations.Networking; namespace MediaBrowser.Server.Mac { @@ -60,7 +56,7 @@ namespace MediaBrowser.Server.Mac var appPaths = CreateApplicationPaths(appFolderPath, customProgramDataPath); - var logManager = new NlogManager(appPaths.LogDirectoryPath, "server"); + var logManager = new SimpleLogManager(appPaths.LogDirectoryPath, "server"); logManager.ReloadLogger(LogSeverity.Info); logManager.AddConsoleOutput(); @@ -90,9 +86,7 @@ namespace MediaBrowser.Server.Mac // Within the mac bundle, go uo two levels then down into Resources folder var resourcesPath = Path.Combine(Path.GetDirectoryName(appFolderPath), "Resources"); - Action createDirectoryFn = (string obj) => Directory.CreateDirectory(obj); - - return new ServerApplicationPaths(programDataPath, appFolderPath, resourcesPath, createDirectoryFn); + return new ServerApplicationPaths(programDataPath, appFolderPath, resourcesPath); } /// @@ -161,7 +155,7 @@ namespace MediaBrowser.Server.Mac { var info = new EnvironmentInfo() { - CustomOperatingSystem = MediaBrowser.Model.System.OperatingSystem.OSX + OperatingSystem = MediaBrowser.Model.System.OperatingSystem.OSX }; var uname = GetUnixName(); @@ -186,23 +180,23 @@ namespace MediaBrowser.Server.Mac if (archX86.IsMatch(uname.machine)) { - info.CustomArchitecture = Architecture.X86; + info.SystemArchitecture = Architecture.X86; } else if (string.Equals(uname.machine, "x86_64", StringComparison.OrdinalIgnoreCase)) { - info.CustomArchitecture = Architecture.X64; + info.SystemArchitecture = Architecture.X64; } else if (uname.machine.StartsWith("arm", StringComparison.OrdinalIgnoreCase)) { - info.CustomArchitecture = Architecture.Arm; + info.SystemArchitecture = Architecture.Arm; } else if (System.Environment.Is64BitOperatingSystem) { - info.CustomArchitecture = Architecture.X64; + info.SystemArchitecture = Architecture.X64; } else { - info.CustomArchitecture = Architecture.X86; + info.SystemArchitecture = Architecture.X86; } return info; diff --git a/MediaBrowser.Server.Mac/Native/MonoFileSystem.cs b/MediaBrowser.Server.Mac/Native/MonoFileSystem.cs index 7aeff5ac8..1fd140fb9 100644 --- a/MediaBrowser.Server.Mac/Native/MonoFileSystem.cs +++ b/MediaBrowser.Server.Mac/Native/MonoFileSystem.cs @@ -1,4 +1,4 @@ -using Emby.Common.Implementations.IO; +using Emby.Server.Implementations.IO; using MediaBrowser.Model.Logging; using Mono.Unix.Native; using MediaBrowser.Model.System; From 98fbfca458ff760587461a30832a4ded7c63fbd9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 22 Aug 2017 14:47:35 -0400 Subject: [PATCH 08/15] update mac project --- MediaBrowser.Server.Mac/MacAppHost.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Server.Mac/MacAppHost.cs b/MediaBrowser.Server.Mac/MacAppHost.cs index 2f8ee983c..7ad96d2bf 100644 --- a/MediaBrowser.Server.Mac/MacAppHost.cs +++ b/MediaBrowser.Server.Mac/MacAppHost.cs @@ -19,11 +19,11 @@ namespace MediaBrowser.Server.Mac { public class MacAppHost : ApplicationHost { - public MacAppHost(ServerApplicationPaths applicationPaths, ILogManager logManager, StartupOptions options, IFileSystem fileSystem, IPowerManagement powerManagement, string releaseAssetFilename, IEnvironmentInfo environmentInfo, MediaBrowser.Controller.Drawing.IImageEncoder imageEncoder, ISystemEvents systemEvents, IMemoryStreamFactory memoryStreamFactory, MediaBrowser.Common.Net.INetworkManager networkManager, Action certificateGenerator, Func defaultUsernameFactory) : base(applicationPaths, logManager, options, fileSystem, powerManagement, releaseAssetFilename, environmentInfo, imageEncoder, systemEvents, memoryStreamFactory, networkManager, certificateGenerator, defaultUsernameFactory) + public MacAppHost(ServerApplicationPaths applicationPaths, ILogManager logManager, StartupOptions options, IFileSystem fileSystem, IPowerManagement powerManagement, string releaseAssetFilename, IEnvironmentInfo environmentInfo, MediaBrowser.Controller.Drawing.IImageEncoder imageEncoder, ISystemEvents systemEvents, MediaBrowser.Common.Net.INetworkManager networkManager) : base(applicationPaths, logManager, options, fileSystem, powerManagement, releaseAssetFilename, environmentInfo, imageEncoder, systemEvents, networkManager) { } - public override bool CanSelfRestart + public override bool CanSelfRestart { get { From a9624a68d9423ef365abfd3b4045f6b1ce6cc5cc Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 22 Aug 2017 14:51:16 -0400 Subject: [PATCH 09/15] update mac project --- MediaBrowser.Server.Mac/Main.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/MediaBrowser.Server.Mac/Main.cs b/MediaBrowser.Server.Mac/Main.cs index e70ef01eb..3863937f8 100644 --- a/MediaBrowser.Server.Mac/Main.cs +++ b/MediaBrowser.Server.Mac/Main.cs @@ -119,10 +119,7 @@ namespace MediaBrowser.Server.Mac environmentInfo, imageEncoder, new SystemEvents(logManager.GetLogger("SystemEvents")), - new MemoryStreamProvider(), - new NetworkManager(logManager.GetLogger("NetworkManager")), - GenerateCertificate, - () => Environment.UserName); + new NetworkManager(logManager.GetLogger("NetworkManager"))); if (options.ContainsOption("-v")) { Console.WriteLine (AppHost.ApplicationVersion.ToString()); @@ -146,11 +143,6 @@ namespace MediaBrowser.Server.Mac } } - private static void GenerateCertificate(string certPath, string certHost, string certPassword) - { - CertificateGenerator.CreateSelfSignCertificatePfx(certPath, certHost, certPassword, _logger); - } - private static EnvironmentInfo GetEnvironmentInfo() { var info = new EnvironmentInfo() From ee8c829c5ba315eb369d7ddf4c97b6ba4fe6bb51 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 22 Aug 2017 14:54:18 -0400 Subject: [PATCH 10/15] update mac project --- MediaBrowser.Server.Mac/Emby.Server.Mac.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj index 161a4076a..fe9ab13fa 100644 --- a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj +++ b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj @@ -92,10 +92,6 @@ False ..\packages\Mono.Posix.4.0.0.0\lib\net40\Mono.Posix.dll - - ..\packages\NLog.4.4.12\lib\net45\NLog.dll - True - ..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll True From 4f8684a16b1102056bd2b527dcbd585b78dd8000 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 27 Aug 2017 13:34:42 -0400 Subject: [PATCH 11/15] fix merge conflicts --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index fcd6b4bee..e8903fbb5 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.28.0")] +[assembly: AssemblyVersion("3.2.28.8")] From 05a99105f45b46de41371bf1756a98917e8b1d14 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 27 Aug 2017 13:35:25 -0400 Subject: [PATCH 12/15] 3.2.29.0 --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index e8903fbb5..e7e2bfc7b 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.28.8")] +[assembly: AssemblyVersion("3.2.29.0")] From effac5e88216df9c73227f7e483aa679e8cd15db Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 28 Aug 2017 14:15:31 -0400 Subject: [PATCH 13/15] 3.2.30.0 --- Emby.Server.Implementations/ApplicationHost.cs | 3 ++- SharedVersion.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 70ec37a3b..cf46924b4 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1846,7 +1846,8 @@ namespace Emby.Server.Implementations { "mbplus.dll", "mbintros.dll", - "embytv.dll" + "embytv.dll", + "Messenger.dll" }; return !exclude.Contains(filename ?? string.Empty, StringComparer.OrdinalIgnoreCase); diff --git a/SharedVersion.cs b/SharedVersion.cs index e7e2bfc7b..c4efbe395 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.29.0")] +[assembly: AssemblyVersion("3.2.30.0")] From ec426d5c92875639ceac64477ce10fab3e639335 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 20 Sep 2017 13:22:11 -0400 Subject: [PATCH 14/15] fix merge conflicts --- .../ApplicationHost.cs | 192 +++++++++++------- SharedVersion.cs | 2 +- 2 files changed, 121 insertions(+), 73 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index cf46924b4..713ece421 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1,5 +1,4 @@ -using Emby.Common.Implementations; -using Emby.Common.Implementations.Serialization; +using Emby.Common.Implementations.Serialization; using Emby.Dlna; using Emby.Dlna.ConnectionManager; using Emby.Dlna.ContentDirectory; @@ -8,12 +7,16 @@ using Emby.Dlna.MediaReceiverRegistrar; using Emby.Dlna.Ssdp; using Emby.Drawing; using Emby.Photos; +using Emby.Server.Core.Cryptography; using Emby.Server.Implementations.Activity; +using Emby.Server.Implementations.Archiving; using Emby.Server.Implementations.Channels; using Emby.Server.Implementations.Collections; using Emby.Server.Implementations.Configuration; +using Emby.Server.Implementations.Cryptography; using Emby.Server.Implementations.Data; using Emby.Server.Implementations.Devices; +using Emby.Server.Implementations.Diagnostics; using Emby.Server.Implementations.Dto; using Emby.Server.Implementations.FFMpeg; using Emby.Server.Implementations.HttpServer; @@ -23,14 +26,20 @@ using Emby.Server.Implementations.Library; using Emby.Server.Implementations.LiveTv; using Emby.Server.Implementations.Localization; using Emby.Server.Implementations.MediaEncoder; -using Emby.Server.Implementations.Migrations; +using Emby.Server.Implementations.Net; using Emby.Server.Implementations.Notifications; using Emby.Server.Implementations.Playlists; +using Emby.Server.Implementations.Reflection; +using Emby.Server.Implementations.ScheduledTasks; using Emby.Server.Implementations.Security; +using Emby.Server.Implementations.Serialization; using Emby.Server.Implementations.Session; using Emby.Server.Implementations.Social; +using Emby.Server.Implementations.Threading; using Emby.Server.Implementations.TV; using Emby.Server.Implementations.Updates; +using Emby.Server.Implementations.Xml; +using Emby.Server.MediaEncoding.Subtitles; using MediaBrowser.Api; using MediaBrowser.Common; using MediaBrowser.Common.Configuration; @@ -52,9 +61,6 @@ using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Entities.Audio; -using MediaBrowser.Controller.Entities.Movies; -using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.MediaEncoding; @@ -72,10 +78,13 @@ using MediaBrowser.Controller.Subtitles; using MediaBrowser.Controller.Sync; using MediaBrowser.Controller.TV; using MediaBrowser.LocalMetadata.Savers; +using MediaBrowser.MediaEncoding.BdInfo; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Configuration; +using MediaBrowser.Model.Cryptography; using MediaBrowser.Model.Diagnostics; using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Events; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.IO; using MediaBrowser.Model.Logging; @@ -87,7 +96,9 @@ using MediaBrowser.Model.Serialization; using MediaBrowser.Model.Services; using MediaBrowser.Model.Social; using MediaBrowser.Model.System; +using MediaBrowser.Model.Tasks; using MediaBrowser.Model.Text; +using MediaBrowser.Model.Threading; using MediaBrowser.Model.Updates; using MediaBrowser.Model.Xml; using MediaBrowser.Providers.Chapters; @@ -97,7 +108,6 @@ using MediaBrowser.WebDashboard.Api; using MediaBrowser.XbmcMetadata.Providers; using OpenSubtitlesHandler; using ServiceStack; -using SocketHttpListener.Primitives; using System; using System.Collections.Concurrent; using System.Collections.Generic; @@ -111,30 +121,15 @@ using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading; using System.Threading.Tasks; -using Emby.Server.Core.Cryptography; -using Emby.Server.Implementations.Archiving; -using Emby.Server.Implementations.Cryptography; -using Emby.Server.Implementations.Diagnostics; -using Emby.Server.Implementations.Net; -using Emby.Server.Implementations.Reflection; -using Emby.Server.Implementations.ScheduledTasks; -using Emby.Server.Implementations.Serialization; -using Emby.Server.Implementations.Threading; -using Emby.Server.Implementations.Xml; -using Emby.Server.MediaEncoding.Subtitles; -using MediaBrowser.MediaEncoding.BdInfo; -using MediaBrowser.Model.Cryptography; -using MediaBrowser.Model.Events; -using MediaBrowser.Model.Tasks; -using MediaBrowser.Model.Threading; using StringExtensions = MediaBrowser.Controller.Extensions.StringExtensions; +using X509Certificate = System.Security.Cryptography.X509Certificates.X509Certificate; namespace Emby.Server.Implementations { /// /// Class CompositionRoot /// - public abstract class ApplicationHost : IServerApplicationHost, IDependencyContainer + public abstract class ApplicationHost : IServerApplicationHost, IDependencyContainer, IDisposable { /// /// Gets a value indicating whether this instance can self restart. @@ -170,6 +165,8 @@ namespace Emby.Server.Implementations /// true if this instance has pending application restart; otherwise, false. public bool HasPendingRestart { get; private set; } + public bool IsShuttingDown { get; private set; } + /// /// Gets or sets the logger. /// @@ -366,7 +363,7 @@ namespace Emby.Server.Implementations protected IAuthService AuthService { get; private set; } protected readonly StartupOptions StartupOptions; - private readonly string _releaseAssetFilename; + protected readonly string ReleaseAssetFilename; internal IPowerManagement PowerManagement { get; private set; } internal IImageEncoder ImageEncoder { get; private set; } @@ -419,7 +416,7 @@ namespace Emby.Server.Implementations Logger = LogManager.GetLogger("App"); StartupOptions = options; - _releaseAssetFilename = releaseAssetFilename; + ReleaseAssetFilename = releaseAssetFilename; PowerManagement = powerManagement; ImageEncoder = imageEncoder; @@ -442,14 +439,6 @@ namespace Emby.Server.Implementations } } - public virtual bool SupportsRunningAsService - { - get - { - return false; - } - } - private DeviceId _deviceId; public string SystemId { @@ -476,14 +465,6 @@ namespace Emby.Server.Implementations } } - public virtual bool IsRunningAsService - { - get - { - return false; - } - } - private Assembly GetAssembly(Type type) { return type.GetTypeInfo().Assembly; @@ -827,7 +808,7 @@ namespace Emby.Server.Implementations RegisterSingleInstance(MemoryStreamFactory); RegisterSingleInstance(SystemEvents); - RegisterSingleInstance(LogManager); + RegisterSingleInstance(LogManager, false); RegisterSingleInstance(Logger); RegisterSingleInstance(EnvironmentInfo); @@ -1051,7 +1032,7 @@ namespace Emby.Server.Implementations ((UserManager)UserManager).Initialize(); } - protected virtual string PackageRuntime + public virtual string PackageRuntime { get { @@ -1073,6 +1054,7 @@ namespace Emby.Server.Implementations builder.AppendLine(string.Format("Operating system: {0}", Environment.OSVersion)); builder.AppendLine(string.Format("64-Bit OS: {0}", Environment.Is64BitOperatingSystem)); builder.AppendLine(string.Format("64-Bit Process: {0}", Environment.Is64BitProcess)); + builder.AppendLine(string.Format("User Interactive: {0}", Environment.UserInteractive)); Type type = Type.GetType("Mono.Runtime"); if (type != null) @@ -1167,7 +1149,7 @@ namespace Emby.Server.Implementations } } - private ICertificate GetCertificate(CertificateInfo info) + private X509Certificate GetCertificate(CertificateInfo info) { var certificateLocation = info == null ? null : info.Path; @@ -1194,7 +1176,7 @@ namespace Emby.Server.Implementations return null; } - return new Certificate(localCert); + return localCert; } catch (Exception ex) { @@ -1482,13 +1464,26 @@ namespace Emby.Server.Implementations var assembly = plugin.GetType().Assembly; var assemblyName = assembly.GetName(); - var attribute = (GuidAttribute)assembly.GetCustomAttributes(typeof(GuidAttribute), true)[0]; - var assemblyId = new Guid(attribute.Value); - var assemblyFileName = assemblyName.Name + ".dll"; var assemblyFilePath = Path.Combine(ApplicationPaths.PluginsPath, assemblyFileName); - assemblyPlugin.SetAttributes(assemblyFilePath, assemblyFileName, assemblyName.Version, assemblyId); + assemblyPlugin.SetAttributes(assemblyFilePath, assemblyFileName, assemblyName.Version); + + try + { + var idAttributes = assembly.GetCustomAttributes(typeof(GuidAttribute), true); + if (idAttributes.Length > 0) + { + var attribute = (GuidAttribute)idAttributes[0]; + var assemblyId = new Guid(attribute.Value); + + assemblyPlugin.SetId(assemblyId); + } + } + catch (Exception ex) + { + Logger.ErrorException("Error getting plugin Id from {0}.", ex, plugin.GetType().FullName); + } } var isFirstRun = !File.Exists(plugin.ConfigurationFilePath); @@ -1570,7 +1565,7 @@ namespace Emby.Server.Implementations } private CertificateInfo CertificateInfo { get; set; } - private ICertificate Certificate { get; set; } + private X509Certificate Certificate { get; set; } private IEnumerable GetUrlPrefixes() { @@ -1601,7 +1596,7 @@ namespace Emby.Server.Implementations { try { - ServerManager.Start(GetUrlPrefixes()); + ServerManager.Start(GetUrlPrefixes().ToArray()); return; } catch (Exception ex) @@ -1618,7 +1613,7 @@ namespace Emby.Server.Implementations try { - ServerManager.Start(GetUrlPrefixes()); + ServerManager.Start(GetUrlPrefixes().ToArray()); } catch (Exception ex) { @@ -1740,25 +1735,35 @@ namespace Emby.Server.Implementations /// /// Restarts this instance. /// - public async Task Restart() + public void Restart() { if (!CanSelfRestart) { throw new PlatformNotSupportedException("The server is unable to self-restart. Please restart manually."); } - try + if (IsShuttingDown) { - await SessionManager.SendServerRestartNotification(CancellationToken.None).ConfigureAwait(false); - } - catch (Exception ex) - { - Logger.ErrorException("Error sending server restart notification", ex); + return; } - Logger.Info("Calling RestartInternal"); + IsShuttingDown = true; - RestartInternal(); + Task.Run(async () => + { + try + { + await SessionManager.SendServerRestartNotification(CancellationToken.None).ConfigureAwait(false); + } + catch (Exception ex) + { + Logger.ErrorException("Error sending server restart notification", ex); + } + + Logger.Info("Calling RestartInternal"); + + RestartInternal(); + }); } protected abstract void RestartInternal(); @@ -1847,7 +1852,32 @@ namespace Emby.Server.Implementations "mbplus.dll", "mbintros.dll", "embytv.dll", - "Messenger.dll" + "Messenger.dll", + "MediaBrowser.Plugins.TvMazeProvider.dll", + "MBBookshelf.dll", + "MediaBrowser.Channels.Adult.YouJizz.dll", + "MediaBrowser.Channels.Vine-co.dll", + "MediaBrowser.Plugins.Vimeo.dll", + "MediaBrowser.Channels.Vevo.dll", + "MediaBrowser.Plugins.Twitch.dll", + "MediaBrowser.Channels.SvtPlay.dll", + "MediaBrowser.Plugins.SoundCloud.dll", + "MediaBrowser.Plugins.SnesBox.dll", + "MediaBrowser.Plugins.RottenTomatoes.dll", + "MediaBrowser.Plugins.Revision3.dll", + "MediaBrowser.Plugins.NesBox.dll", + "MBChapters.dll", + "MediaBrowser.Channels.LeagueOfLegends.dll", + "MediaBrowser.Plugins.ADEProvider.dll", + "MediaBrowser.Channels.BallStreams.dll", + "MediaBrowser.Channels.Adult.Beeg.dll", + "ChannelDownloader.dll", + "Hamstercat.Emby.EmbyBands.dll", + "EmbyTV.dll", + "MediaBrowser.Channels.HitboxTV.dll", + "MediaBrowser.Channels.HockeyStreams.dll", + "MediaBrowser.Plugins.ITV.dll", + "MediaBrowser.Plugins.Lastfm.dll" }; return !exclude.Contains(filename ?? string.Empty, StringComparer.OrdinalIgnoreCase); @@ -1864,6 +1894,7 @@ namespace Emby.Server.Implementations return new SystemInfo { HasPendingRestart = HasPendingRestart, + IsShuttingDown = IsShuttingDown, Version = ApplicationVersion.ToString(), WebSocketPortNumber = HttpPort, FailedPluginAssemblies = FailedAssemblies.ToArray(), @@ -1887,7 +1918,6 @@ namespace Emby.Server.Implementations HasUpdateAvailable = HasUpdateAvailable, SupportsAutoRunAtStartup = SupportsAutoRunAtStartup, TranscodingTempPath = ApplicationPaths.TranscodingTempPath, - SupportsRunningAsService = SupportsRunningAsService, ServerName = FriendlyName, LocalAddress = localAddress, SupportsLibraryMonitor = true, @@ -2091,6 +2121,13 @@ namespace Emby.Server.Implementations /// public async Task Shutdown() { + if (IsShuttingDown) + { + return; + } + + IsShuttingDown = true; + try { await SessionManager.SendServerShutdownNotification(CancellationToken.None).ConfigureAwait(false); @@ -2169,22 +2206,31 @@ namespace Emby.Server.Implementations /// Task{CheckForUpdateResult}. public async Task CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress progress) { - var cacheLength = TimeSpan.FromHours(1); var updateLevel = SystemUpdateLevel; + var cacheLength = updateLevel == PackageVersionClass.Release ? + TimeSpan.FromHours(4) : + TimeSpan.FromMinutes(5); - if (updateLevel != PackageVersionClass.Release) - { - cacheLength = TimeSpan.FromMinutes(5); - } - - var result = await new GithubUpdater(HttpClient, JsonSerializer).CheckForUpdateResult("MediaBrowser", "Emby", ApplicationVersion, updateLevel, _releaseAssetFilename, - "MBServer", "Mbserver.zip", cacheLength, cancellationToken).ConfigureAwait(false); + var result = await new GithubUpdater(HttpClient, JsonSerializer).CheckForUpdateResult("MediaBrowser", + "Emby", + ApplicationVersion, + updateLevel, + ReleaseAssetFilename, + "MBServer", + UpdateTargetFileName, + cacheLength, + cancellationToken).ConfigureAwait(false); HasUpdateAvailable = result.IsUpdateAvailable; return result; } + protected virtual string UpdateTargetFileName + { + get { return "Mbserver.zip"; } + } + /// /// Updates the application. /// @@ -2327,6 +2373,7 @@ namespace Emby.Server.Implementations _disposed = true; Dispose(true); + GC.SuppressFinalize(this); } } @@ -2340,6 +2387,7 @@ namespace Emby.Server.Implementations { var type = GetType(); + LogManager.AddConsoleOutput(); Logger.Info("Disposing " + type.Name); var parts = DisposableParts.Distinct().Where(i => i.GetType() != type).ToList(); diff --git a/SharedVersion.cs b/SharedVersion.cs index c4efbe395..841d2968c 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.30.0")] +[assembly: AssemblyVersion("3.2.30.27")] From 1cf8eeaf0b99103a757104fce48b00e69ac260cd Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 20 Sep 2017 13:26:54 -0400 Subject: [PATCH 15/15] 3.2.31 --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 841d2968c..d2828ea18 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.30.27")] +[assembly: AssemblyVersion("3.2.31")]