Răsfoiți Sursa

update core project

Luke Pulverenti 8 ani în urmă
părinte
comite
00cbadea2c
28 a modificat fișierele cu 102 adăugiri și 113 ștergeri
  1. 5 0
      Emby.Common.Implementations/IO/ManagedFileSystem.cs
  2. 3 3
      Emby.Common.Implementations/Net/NetSocket.cs
  3. 1 1
      Emby.Common.Implementations/Net/UdpSocket.cs
  4. 23 2
      Emby.Common.Implementations/Networking/NetworkManager.cs
  5. 4 13
      Emby.Server.Core/FFMpeg/FFMpegLoader.cs
  6. 1 1
      Emby.Server.Core/Localization/TextLocalizer.cs
  7. 1 1
      Emby.Server.Core/Security/AuthenticationRepository.cs
  8. 7 0
      Emby.Server.Core/project.json
  9. 5 0
      Emby.Server.Implementations/Emby.Server.Implementations.csproj
  10. 2 2
      Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs
  11. 0 7
      MediaBrowser.Common/Net/INetworkManager.cs
  12. 0 2
      MediaBrowser.Controller/MediaBrowser.Controller.csproj
  13. 2 0
      MediaBrowser.Model/IO/IFileSystem.cs
  14. 0 0
      MediaBrowser.Server.Implementations/Devices/CameraUploadsFolder.cs
  15. 2 4
      MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj
  16. 0 0
      MediaBrowser.Server.Implementations/Playlists/ManualPlaylistsFolder.cs
  17. 5 3
      MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj
  18. 1 2
      MediaBrowser.Server.Mono/Native/MonoApp.cs
  19. 21 0
      MediaBrowser.Server.Mono/Native/MonoFileSystem.cs
  20. 2 1
      MediaBrowser.Server.Mono/Program.cs
  21. 10 10
      MediaBrowser.Server.Startup.Common/ApplicationHost.cs
  22. 1 1
      MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs
  23. 0 5
      MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj
  24. 0 50
      MediaBrowser.Server.Startup.Common/Networking/NetworkManager.cs
  25. 1 0
      MediaBrowser.ServerApplication/MainStartup.cs
  26. 4 3
      MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj
  27. 0 1
      MediaBrowser.ServerApplication/Native/WindowsApp.cs
  28. 1 1
      MediaBrowser.ServerApplication/Networking/NetworkManager.cs

+ 5 - 0
Emby.Common.Implementations/IO/ManagedFileSystem.cs

@@ -761,5 +761,10 @@ namespace Emby.Common.Implementations.IO
             var searchOption = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;
             return Directory.EnumerateFileSystemEntries(path, "*", searchOption);
         }
+
+        public virtual void SetExecutable(string path)
+        {
+            
+        }
     }
 }

+ 3 - 3
Emby.Common.Implementations/Net/NetSocket.cs

@@ -23,7 +23,7 @@ namespace Emby.Common.Implementations.Net
         {
             get
             {
-                return BaseNetworkManager.ToIpEndPointInfo((IPEndPoint)Socket.LocalEndPoint);
+                return NetworkManager.ToIpEndPointInfo((IPEndPoint)Socket.LocalEndPoint);
             }
         }
 
@@ -31,7 +31,7 @@ namespace Emby.Common.Implementations.Net
         {
             get
             {
-                return BaseNetworkManager.ToIpEndPointInfo((IPEndPoint)Socket.RemoteEndPoint);
+                return NetworkManager.ToIpEndPointInfo((IPEndPoint)Socket.RemoteEndPoint);
             }
         }
 
@@ -64,7 +64,7 @@ namespace Emby.Common.Implementations.Net
 
         public void Bind(IpEndPointInfo endpoint)
         {
-            var nativeEndpoint = BaseNetworkManager.ToIPEndPoint(endpoint);
+            var nativeEndpoint = NetworkManager.ToIPEndPoint(endpoint);
 
             Socket.Bind(nativeEndpoint);
         }

+ 1 - 1
Emby.Common.Implementations/Net/UdpSocket.cs

@@ -175,7 +175,7 @@ namespace Emby.Common.Implementations.Net
                 return null;
             }
 
-            return BaseNetworkManager.ToIpEndPointInfo(endpoint);
+            return NetworkManager.ToIpEndPointInfo(endpoint);
         }
 
         private void ProcessResponse(IAsyncResult asyncResult)

+ 23 - 2
Emby.Common.Implementations/Networking/BaseNetworkManager.cs → Emby.Common.Implementations/Networking/NetworkManager.cs

@@ -9,15 +9,17 @@ using System.Net.Sockets;
 using System.Threading.Tasks;
 using MediaBrowser.Model.Extensions;
 using MediaBrowser.Model.Net;
+using MediaBrowser.Model.IO;
+using MediaBrowser.Common.Net;
 
 namespace Emby.Common.Implementations.Networking
 {
-    public abstract class BaseNetworkManager
+    public class NetworkManager : INetworkManager
     {
         protected ILogger Logger { get; private set; }
         private DateTime _lastRefresh;
 
-        protected BaseNetworkManager(ILogger logger)
+        public NetworkManager(ILogger logger)
         {
             Logger = logger;
         }
@@ -481,5 +483,24 @@ namespace Emby.Common.Implementations.Networking
             var addresses = await Dns.GetHostAddressesAsync(host).ConfigureAwait(false);
             return addresses.Select(ToIpAddressInfo).ToArray();
         }
+
+        /// <summary>
+        /// Gets the network shares.
+        /// </summary>
+        /// <param name="path">The path.</param>
+        /// <returns>IEnumerable{NetworkShare}.</returns>
+        public IEnumerable<NetworkShare> GetNetworkShares(string path)
+        {
+            return new List<NetworkShare>();
+        }
+
+        /// <summary>
+        /// Gets available devices within the domain
+        /// </summary>
+        /// <returns>PC's in the Domain</returns>
+        public IEnumerable<FileSystemEntryInfo> GetNetworkDevices()
+        {
+            return new List<FileSystemEntryInfo>();
+        }
     }
 }

+ 4 - 13
MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegLoader.cs → Emby.Server.Core/FFMpeg/FFMpegLoader.cs

@@ -2,7 +2,6 @@
 using MediaBrowser.Common.Net;
 using MediaBrowser.Model.IO;
 using MediaBrowser.Model.Logging;
-using Mono.Unix.Native;
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -12,7 +11,7 @@ using System.Threading.Tasks;
 using Emby.Server.Core;
 using Emby.Server.Core.FFMpeg;
 
-namespace MediaBrowser.Server.Startup.Common.FFMpeg
+namespace Emby.Server.Core.FFMpeg
 {
     public class FFMpegLoader
     {
@@ -21,21 +20,19 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
         private readonly ILogger _logger;
         private readonly IZipClient _zipClient;
         private readonly IFileSystem _fileSystem;
-        private readonly NativeEnvironment _environment;
         private readonly FFMpegInstallInfo _ffmpegInstallInfo;
 
-        public FFMpegLoader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient, IFileSystem fileSystem, NativeEnvironment environment, FFMpegInstallInfo ffmpegInstallInfo)
+        public FFMpegLoader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient, IFileSystem fileSystem, FFMpegInstallInfo ffmpegInstallInfo)
         {
             _logger = logger;
             _appPaths = appPaths;
             _httpClient = httpClient;
             _zipClient = zipClient;
             _fileSystem = fileSystem;
-            _environment = environment;
             _ffmpegInstallInfo = ffmpegInstallInfo;
         }
 
-        public async Task<FFMpegInfo> GetFFMpegInfo(NativeEnvironment environment, StartupOptions options, IProgress<double> progress)
+        public async Task<FFMpegInfo> GetFFMpegInfo(StartupOptions options, IProgress<double> progress)
         {
             var customffMpegPath = options.GetOption("-ffmpeg");
             var customffProbePath = options.GetOption("-ffprobe");
@@ -210,13 +207,7 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
 
         private void SetFilePermissions(string path)
         {
-            // Linux: File permission to 666, and user's execute bit
-            if (_environment.OperatingSystem == OperatingSystem.Bsd || _environment.OperatingSystem == OperatingSystem.Linux || _environment.OperatingSystem == OperatingSystem.Osx)
-            {
-                _logger.Info("Syscall.chmod {0} FilePermissions.DEFFILEMODE | FilePermissions.S_IRWXU | FilePermissions.S_IXGRP | FilePermissions.S_IXOTH", path);
-
-                Syscall.chmod(path, FilePermissions.DEFFILEMODE | FilePermissions.S_IRWXU | FilePermissions.S_IXGRP | FilePermissions.S_IXOTH);
-            }
+            _fileSystem.SetExecutable(path);
         }
 
         private void ExtractArchive(FFMpegInstallInfo downloadinfo, string archivePath, string targetPath)

+ 1 - 1
MediaBrowser.Server.Startup.Common/TextLocalizer.cs → Emby.Server.Core/Localization/TextLocalizer.cs

@@ -4,7 +4,7 @@ using System.Linq;
 using System.Text;
 using Emby.Server.Implementations.Localization;
 
-namespace MediaBrowser.Server.Startup.Common
+namespace Emby.Server.Core.Localization
 {
     public class TextLocalizer : ITextLocalizer
     {

+ 1 - 1
MediaBrowser.Server.Startup.Common/Security/AuthenticationRepository.cs → Emby.Server.Core/Security/AuthenticationRepository.cs

@@ -11,7 +11,7 @@ using MediaBrowser.Controller.Security;
 using MediaBrowser.Model.Logging;
 using MediaBrowser.Model.Querying;
 
-namespace MediaBrowser.Server.Startup.Common.Security
+namespace Emby.Server.Core.Security
 {
     public class AuthenticationRepository : BaseSqliteRepository, IAuthenticationRepository
     {

+ 7 - 0
Emby.Server.Core/project.json

@@ -28,6 +28,9 @@
         },
         "Emby.Server.Implementations": {
           "target": "project"
+        },
+        "MediaBrowser.Server.Implementations": {
+          "target": "project"
         }
       }
     },
@@ -36,6 +39,7 @@
       "dependencies": {
         "NETStandard.Library": "1.6.0",
 		"System.AppDomain": "2.0.11",
+		"System.Globalization.Extensions": "4.0.1",
 		"MediaBrowser.Model": {
           "target": "project"
         },
@@ -53,6 +57,9 @@
         },
         "Emby.Server.Implementations": {
           "target": "project"
+        },
+        "MediaBrowser.Server.Implementations": {
+          "target": "project"
         }
       }
     }

+ 5 - 0
Emby.Server.Implementations/Emby.Server.Implementations.csproj

@@ -92,6 +92,7 @@
     <Compile Include="Images\BaseDynamicImageProvider.cs" />
     <Compile Include="Intros\DefaultIntroProvider.cs" />
     <Compile Include="IO\FileRefresher.cs" />
+    <Compile Include="IO\MbLinkShortcutHandler.cs" />
     <Compile Include="IO\ThrottledStream.cs" />
     <Compile Include="Library\CoreResolutionIgnoreRule.cs" />
     <Compile Include="Library\LibraryManager.cs" />
@@ -270,6 +271,10 @@
       <Project>{442b5058-dcaf-4263-bb6a-f21e31120a1b}</Project>
       <Name>MediaBrowser.Providers</Name>
     </ProjectReference>
+    <ProjectReference Include="..\MediaBrowser.Server.Implementations\MediaBrowser.Server.Implementations.csproj">
+      <Project>{2e781478-814d-4a48-9d80-bff206441a65}</Project>
+      <Name>MediaBrowser.Server.Implementations</Name>
+    </ProjectReference>
     <Reference Include="ServiceStack">
       <HintPath>..\ThirdParty\ServiceStack\ServiceStack.dll</HintPath>
     </Reference>

+ 2 - 2
MediaBrowser.Server.Startup.Common/MbLinkShortcutHandler.cs → Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs

@@ -4,7 +4,7 @@ using MediaBrowser.Common.IO;
 using MediaBrowser.Controller.IO;
 using MediaBrowser.Model.IO;
 
-namespace MediaBrowser.Server.Startup.Common
+namespace Emby.Server.Implementations.IO
 {
     public class MbLinkShortcutHandler : IShortcutHandler
     {
@@ -49,7 +49,7 @@ namespace MediaBrowser.Server.Startup.Common
                 throw new ArgumentNullException("targetPath");
             }
 
-            File.WriteAllText(shortcutPath, targetPath);
+            _fileSystem.WriteAllText(shortcutPath, targetPath);
         }
     }
 }

+ 0 - 7
MediaBrowser.Common/Net/INetworkManager.cs

@@ -54,12 +54,5 @@ namespace MediaBrowser.Common.Net
         bool TryParseIpAddress(string ipAddress, out IpAddressInfo ipAddressInfo);
 
         Task<IpAddressInfo[]> GetHostAddressesAsync(string host);
-
-        /// <summary>
-        /// Generates a self signed certificate at the locatation specified by <paramref name="certificatePath"/>.
-        /// </summary>
-        /// <param name="certificatePath">The path to generate the certificate.</param>
-        /// <param name="hostname">The common name for the certificate.</param>
-        void GenerateSelfSignedSslCertificate(string certificatePath, string hostname);
     }
 }

+ 0 - 2
MediaBrowser.Controller/MediaBrowser.Controller.csproj

@@ -77,7 +77,6 @@
     <Compile Include="Connect\IConnectManager.cs" />
     <Compile Include="Connect\UserLinkResult.cs" />
     <Compile Include="Devices\CameraImageUploadInfo.cs" />
-    <Compile Include="Devices\CameraUploadsFolder.cs" />
     <Compile Include="Devices\IDeviceManager.cs" />
     <Compile Include="Devices\IDeviceRepository.cs" />
     <Compile Include="Dlna\ControlRequest.cs" />
@@ -218,7 +217,6 @@
     <Compile Include="Persistence\IFileOrganizationRepository.cs" />
     <Compile Include="Persistence\MediaStreamQuery.cs" />
     <Compile Include="Playlists\IPlaylistManager.cs" />
-    <Compile Include="Playlists\ManualPlaylistsFolder.cs" />
     <Compile Include="Playlists\Playlist.cs" />
     <Compile Include="Plugins\ILocalizablePlugin.cs" />
     <Compile Include="Providers\AlbumInfo.cs" />

+ 2 - 0
MediaBrowser.Model/IO/IFileSystem.cs

@@ -312,6 +312,8 @@ namespace MediaBrowser.Model.IO
         string GetFullPath(string path);
 
         List<FileSystemMetadata> GetDrives();
+
+        void SetExecutable(string path);
     }
 
     public enum FileOpenMode

+ 0 - 0
MediaBrowser.Controller/Devices/CameraUploadsFolder.cs → MediaBrowser.Server.Implementations/Devices/CameraUploadsFolder.cs


+ 2 - 4
MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj

@@ -44,13 +44,11 @@
     <Compile Include="..\SharedVersion.cs">
       <Link>Properties\SharedVersion.cs</Link>
     </Compile>
+    <Compile Include="Devices\CameraUploadsFolder.cs" />
+    <Compile Include="Playlists\ManualPlaylistsFolder.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\Emby.Server.Implementations\Emby.Server.Implementations.csproj">
-      <Project>{e383961b-9356-4d5d-8233-9a1079d03055}</Project>
-      <Name>Emby.Server.Implementations</Name>
-    </ProjectReference>
     <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">
       <Project>{9142EEFA-7570-41E1-BFCC-468BB571AF2F}</Project>
       <Name>MediaBrowser.Common</Name>

+ 0 - 0
MediaBrowser.Controller/Playlists/ManualPlaylistsFolder.cs → MediaBrowser.Server.Implementations/Playlists/ManualPlaylistsFolder.cs


+ 5 - 3
MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj

@@ -77,9 +77,6 @@
       <Private>True</Private>
     </Reference>
     <Reference Include="System" />
-    <Reference Include="ServiceStack.Interfaces">
-      <HintPath>..\ThirdParty\ServiceStack\ServiceStack.Interfaces.dll</HintPath>
-    </Reference>
     <Reference Include="MediaBrowser.IsoMounting.Linux">
       <HintPath>..\ThirdParty\MediaBrowser.IsoMounting.Linux\MediaBrowser.IsoMounting.Linux.dll</HintPath>
     </Reference>
@@ -103,12 +100,17 @@
     </Compile>
     <Compile Include="Native\MonoApp.cs" />
     <Compile Include="Native\DbConnector.cs" />
+    <Compile Include="Native\MonoFileSystem.cs" />
     <Compile Include="Native\PowerManagement.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup>
+    <ProjectReference Include="..\Emby.Server.Implementations\Emby.Server.Implementations.csproj">
+      <Project>{e383961b-9356-4d5d-8233-9a1079d03055}</Project>
+      <Name>Emby.Server.Implementations</Name>
+    </ProjectReference>
     <ProjectReference Include="..\MediaBrowser.Server.Startup.Common\MediaBrowser.Server.Startup.Common.csproj">
       <Project>{b90ab8f2-1bff-4568-a3fd-2a338a435a75}</Project>
       <Name>MediaBrowser.Server.Startup.Common</Name>

+ 1 - 2
MediaBrowser.Server.Mono/Native/MonoApp.cs

@@ -7,12 +7,11 @@ using System;
 using System.Collections.Generic;
 using System.Reflection;
 using System.Text.RegularExpressions;
+using Emby.Common.Implementations.Networking;
 using Emby.Server.Core;
 using Emby.Server.Core.Data;
 using Emby.Server.Core.FFMpeg;
 using MediaBrowser.Model.System;
-using MediaBrowser.Server.Startup.Common.FFMpeg;
-using MediaBrowser.Server.Startup.Common.Networking;
 using OperatingSystem = MediaBrowser.Server.Startup.Common.OperatingSystem;
 
 namespace MediaBrowser.Server.Mono.Native

+ 21 - 0
MediaBrowser.Server.Mono/Native/MonoFileSystem.cs

@@ -0,0 +1,21 @@
+using Emby.Common.Implementations.IO;
+using MediaBrowser.Model.Logging;
+using Mono.Unix.Native;
+
+namespace MediaBrowser.Server.Mono.Native
+{
+    public class MonoFileSystem : ManagedFileSystem
+    {
+        public MonoFileSystem(ILogger logger, bool supportsAsyncFileStreams, bool enableManagedInvalidFileNameChars) : base(logger, supportsAsyncFileStreams, enableManagedInvalidFileNameChars)
+        {
+        }
+
+        public override void SetExecutable(string path)
+        {
+            // Linux: File permission to 666, and user's execute bit
+            Logger.Info("Syscall.chmod {0} FilePermissions.DEFFILEMODE | FilePermissions.S_IRWXU | FilePermissions.S_IXGRP | FilePermissions.S_IXOTH", path);
+
+            Syscall.chmod(path, FilePermissions.DEFFILEMODE | FilePermissions.S_IRWXU | FilePermissions.S_IXGRP | FilePermissions.S_IXOTH);
+        }
+    }
+}

+ 2 - 1
MediaBrowser.Server.Mono/Program.cs

@@ -15,6 +15,7 @@ using System.Threading.Tasks;
 using Emby.Common.Implementations.IO;
 using Emby.Common.Implementations.Logging;
 using Emby.Server.Core;
+using Emby.Server.Implementations.IO;
 
 namespace MediaBrowser.Server.Mono
 {
@@ -76,7 +77,7 @@ namespace MediaBrowser.Server.Mono
             // Allow all https requests
             ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });
 
-            var fileSystem = new ManagedFileSystem(logManager.GetLogger("FileSystem"), false, false);
+            var fileSystem = new MonoFileSystem(logManager.GetLogger("FileSystem"), false, false);
             fileSystem.AddShortcutHandler(new MbLinkShortcutHandler(fileSystem));
 
             var nativeApp = new MonoApp(options, logManager.GetLogger("App"));

+ 10 - 10
MediaBrowser.Server.Startup.Common/ApplicationHost.cs

@@ -48,9 +48,6 @@ using MediaBrowser.Model.Updates;
 using MediaBrowser.Providers.Chapters;
 using MediaBrowser.Providers.Manager;
 using MediaBrowser.Providers.Subtitles;
-using MediaBrowser.Server.Implementations;
-using MediaBrowser.Server.Implementations.Devices;
-using MediaBrowser.Server.Startup.Common.FFMpeg;
 using MediaBrowser.WebDashboard.Api;
 using MediaBrowser.XbmcMetadata.Providers;
 using System;
@@ -69,6 +66,7 @@ using Emby.Common.Implementations;
 using Emby.Common.Implementations.Archiving;
 using Emby.Common.Implementations.Networking;
 using Emby.Common.Implementations.Reflection;
+using Emby.Common.Implementations.Security;
 using Emby.Common.Implementations.Serialization;
 using Emby.Common.Implementations.TextEncoding;
 using Emby.Common.Implementations.Updates;
@@ -93,8 +91,11 @@ using Emby.Server.Core.Activity;
 using Emby.Server.Core.Configuration;
 using Emby.Server.Core.Data;
 using Emby.Server.Core.Devices;
+using Emby.Server.Core.FFMpeg;
+using Emby.Server.Core.Localization;
 using Emby.Server.Core.Migrations;
 using Emby.Server.Core.Notifications;
+using Emby.Server.Core.Security;
 using Emby.Server.Core.Social;
 using Emby.Server.Core.Sync;
 using Emby.Server.Implementations.Activity;
@@ -134,7 +135,6 @@ using MediaBrowser.Model.Social;
 using MediaBrowser.Model.Text;
 using MediaBrowser.Model.Xml;
 using MediaBrowser.Server.Startup.Common.IO;
-using MediaBrowser.Server.Startup.Common.Security;
 using OpenSubtitlesHandler;
 using ServiceStack;
 using SocketHttpListener.Primitives;
@@ -817,8 +817,8 @@ namespace MediaBrowser.Server.Startup.Common
             string encoderPath = null;
             string probePath = null;
 
-            var info = await new FFMpegLoader(Logger, ApplicationPaths, HttpClient, ZipClient, FileSystemManager, NativeApp.Environment, NativeApp.GetFfmpegInstallInfo())
-                .GetFFMpegInfo(NativeApp.Environment, _startupOptions, progress).ConfigureAwait(false);
+            var info = await new FFMpegLoader(Logger, ApplicationPaths, HttpClient, ZipClient, FileSystemManager, NativeApp.GetFfmpegInstallInfo())
+                .GetFFMpegInfo(_startupOptions, progress).ConfigureAwait(false);
 
             encoderPath = info.EncoderPath;
             probePath = info.ProbePath;
@@ -1079,7 +1079,7 @@ namespace MediaBrowser.Server.Startup.Common
 
                     try
                     {
-                        NetworkManager.GenerateSelfSignedSslCertificate(certPath, certHost);
+                        CertificateGenerator.CreateSelfSignCertificatePfx(certPath, certHost, Logger);
                     }
                     catch (Exception ex)
                     {
@@ -1213,12 +1213,12 @@ namespace MediaBrowser.Server.Startup.Common
             // Common implementations
             list.Add(typeof(TaskManager).Assembly);
 
-            // MediaBrowser.Server implementations
-            list.Add(typeof(ServerApplicationPaths).Assembly);
-
             // Emby.Server implementations
             list.Add(typeof(InstallationManager).Assembly);
 
+            // Emby.Server.Core
+            list.Add(typeof(ServerApplicationPaths).Assembly);
+
             // MediaEncoding
             list.Add(typeof(MediaEncoder).Assembly);
 

+ 1 - 1
MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs

@@ -5,7 +5,7 @@ using System.Security.Cryptography;
 
 namespace Emby.Common.Implementations.Security
 {
-    internal class CertificateGenerator
+    public class CertificateGenerator
     {
         private const string MonoTestRootAgency = "<RSAKeyValue><Modulus>v/4nALBxCE+9JgEC0LnDUvKh6e96PwTpN4Rj+vWnqKT7IAp1iK/JjuqvAg6DQ2vTfv0dTlqffmHH51OyioprcT5nzxcSTsZb/9jcHScG0s3/FRIWnXeLk/fgm7mSYhjUaHNI0m1/NTTktipicjKxo71hGIg9qucCWnDum+Krh/k=</Modulus><Exponent>AQAB</Exponent><P>9jbKxMXEruW2CfZrzhxtull4O8P47+mNsEL+9gf9QsRO1jJ77C+jmzfU6zbzjf8+ViK+q62tCMdC1ZzulwdpXQ==</P><Q>x5+p198l1PkK0Ga2mRh0SIYSykENpY2aLXoyZD/iUpKYAvATm0/wvKNrE4dKJyPCA+y3hfTdgVag+SP9avvDTQ==</Q><DP>ISSjCvXsUfbOGG05eddN1gXxL2pj+jegQRfjpk7RAsnWKvNExzhqd5x+ZuNQyc6QH5wxun54inP4RTUI0P/IaQ==</DP><DQ>R815VQmR3RIbPqzDXzv5j6CSH6fYlcTiQRtkBsUnzhWmkd/y3XmamO+a8zJFjOCCx9CcjpVuGziivBqi65lVPQ==</DQ><InverseQ>iYiu0KwMWI/dyqN3RJYUzuuLj02/oTD1pYpwo2rvNCXU1Q5VscOeu2DpNg1gWqI+1RrRCsEoaTNzXB1xtKNlSw==</InverseQ><D>nIfh1LYF8fjRBgMdAH/zt9UKHWiaCnc+jXzq5tkR8HVSKTVdzitD8bl1JgAfFQD8VjSXiCJqluexy/B5SGrCXQ49c78NIQj0hD+J13Y8/E0fUbW1QYbhj6Ff7oHyhaYe1WOQfkp2t/h+llHOdt1HRf7bt7dUknYp7m8bQKGxoYE=</D></RSAKeyValue>";
 

+ 0 - 5
MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj

@@ -113,7 +113,6 @@
     <Compile Include="Cryptography\X509Extension.cs" />
     <Compile Include="Cryptography\X509Extensions.cs" />
     <Compile Include="Cryptography\X520Attributes.cs" />
-    <Compile Include="FFMpeg\FFMpegLoader.cs" />
     <Compile Include="HttpServerFactory.cs" />
     <Compile Include="INativeApp.cs" />
     <Compile Include="IO\LibraryMonitor.cs" />
@@ -140,13 +139,9 @@
     <Compile Include="LiveTv\TunerHosts\SatIp\SatIpHost.cs" />
     <Compile Include="LiveTv\TunerHosts\SatIp\TransmissionMode.cs" />
     <Compile Include="LiveTv\TunerHosts\SatIp\Utils.cs" />
-    <Compile Include="MbLinkShortcutHandler.cs" />
     <Compile Include="NativeEnvironment.cs" />
-    <Compile Include="Security\AuthenticationRepository.cs" />
-    <Compile Include="Networking\NetworkManager.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="SystemEvents.cs" />
-    <Compile Include="TextLocalizer.cs" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\Emby.Dlna\Emby.Dlna.csproj">

+ 0 - 50
MediaBrowser.Server.Startup.Common/Networking/NetworkManager.cs

@@ -1,50 +0,0 @@
-using System.Collections.Generic;
-using Emby.Common.Implementations.Networking;
-using Emby.Common.Implementations.Security;
-using MediaBrowser.Common.Net;
-using MediaBrowser.Model.IO;
-using MediaBrowser.Model.Logging;
-using MediaBrowser.Model.Net;
-
-namespace MediaBrowser.Server.Startup.Common.Networking
-{
-    /// <summary>
-    /// Class NetUtils
-    /// </summary>
-    public class NetworkManager : BaseNetworkManager, INetworkManager
-    {
-        public NetworkManager(ILogger logger)
-            : base(logger)
-        {
-        }
-
-        /// <summary>
-        /// Gets the network shares.
-        /// </summary>
-        /// <param name="path">The path.</param>
-        /// <returns>IEnumerable{NetworkShare}.</returns>
-        public IEnumerable<NetworkShare> GetNetworkShares(string path)
-        {
-            return new List<NetworkShare>();
-        }
-
-        /// <summary>
-        /// Gets available devices within the domain
-        /// </summary>
-        /// <returns>PC's in the Domain</returns>
-        public IEnumerable<FileSystemEntryInfo> GetNetworkDevices()
-        {
-            return new List<FileSystemEntryInfo>();
-        }
-
-        /// <summary>
-        /// Generates a self signed certificate at the locatation specified by <paramref name="certificatePath"/>.
-        /// </summary>
-        /// <param name="certificatePath">The path to generate the certificate.</param>
-        /// <param name="hostname">The common name for the certificate.</param>
-        public void GenerateSelfSignedSslCertificate(string certificatePath, string hostname)
-        {
-            CertificateGenerator.CreateSelfSignCertificatePfx(certificatePath, hostname, Logger);
-        }
-    }
-}

+ 1 - 0
MediaBrowser.ServerApplication/MainStartup.cs

@@ -21,6 +21,7 @@ using Emby.Common.Implementations.IO;
 using Emby.Common.Implementations.Logging;
 using Emby.Server.Core;
 using Emby.Server.Core.Browser;
+using Emby.Server.Implementations.IO;
 using ImageMagickSharp;
 using MediaBrowser.Common.Net;
 

+ 4 - 3
MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj

@@ -82,9 +82,6 @@
       <HintPath>..\packages\Patterns.Logging.1.0.0.6\lib\portable-net45+win8\Patterns.Logging.dll</HintPath>
       <Private>True</Private>
     </Reference>
-    <Reference Include="ServiceStack.Interfaces">
-      <HintPath>..\ThirdParty\ServiceStack\ServiceStack.Interfaces.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Configuration" />
     <Reference Include="System.Configuration.Install" />
@@ -1064,6 +1061,10 @@
       <Project>{08fff49b-f175-4807-a2b5-73b0ebd9f716}</Project>
       <Name>Emby.Drawing</Name>
     </ProjectReference>
+    <ProjectReference Include="..\Emby.Server.Implementations\Emby.Server.Implementations.csproj">
+      <Project>{e383961b-9356-4d5d-8233-9a1079d03055}</Project>
+      <Name>Emby.Server.Implementations</Name>
+    </ProjectReference>
     <ProjectReference Include="..\MediaBrowser.Api\MediaBrowser.Api.csproj">
       <Project>{4fd51ac5-2c16-4308-a993-c3a84f3b4582}</Project>
       <Name>MediaBrowser.Api</Name>

+ 0 - 1
MediaBrowser.ServerApplication/Native/WindowsApp.cs

@@ -15,7 +15,6 @@ using MediaBrowser.Common.IO;
 using MediaBrowser.Controller.IO;
 using MediaBrowser.Model.IO;
 using MediaBrowser.Model.System;
-using MediaBrowser.Server.Startup.Common.FFMpeg;
 using OperatingSystem = MediaBrowser.Server.Startup.Common.OperatingSystem;
 
 namespace MediaBrowser.ServerApplication.Native

+ 1 - 1
MediaBrowser.ServerApplication/Networking/NetworkManager.cs

@@ -13,7 +13,7 @@ namespace MediaBrowser.ServerApplication.Networking
     /// <summary>
     /// Class NetUtils
     /// </summary>
-    public class NetworkManager : Server.Startup.Common.Networking.NetworkManager
+    public class NetworkManager : Emby.Common.Implementations.Networking.NetworkManager
     {
         public NetworkManager(ILogger logger)
             : base(logger)