The Free Software Media System - Server Backend & API
update core project
Luke Pulverenti00cbadea2c5e
diff --git a/Emby.Common.Implementations/IO/ManagedFileSystem.cs b/Emby.Common.Implementations/IO/ManagedFileSystem.csindex 37b4575987..81ca8dcff2 100644--- a/Emby.Common.Implementations/IO/ManagedFileSystem.cs+++ b/Emby.Common.Implementations/IO/ManagedFileSystem.cs@@ -761,5 +761,10 @@ namespace Emby.Common.Implementations.IOvar searchOption = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;return Directory.EnumerateFileSystemEntries(path, "*", searchOption);}++ public virtual void SetExecutable(string path)+ {++ }}}diff --git a/Emby.Common.Implementations/Net/NetSocket.cs b/Emby.Common.Implementations/Net/NetSocket.csindex 72faa41a9a..faa1a81e2d 100644--- a/Emby.Common.Implementations/Net/NetSocket.cs+++ b/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.Netpublic void Bind(IpEndPointInfo endpoint){- var nativeEndpoint = BaseNetworkManager.ToIPEndPoint(endpoint);+ var nativeEndpoint = NetworkManager.ToIPEndPoint(endpoint);Socket.Bind(nativeEndpoint);}diff --git a/Emby.Common.Implementations/Net/UdpSocket.cs b/Emby.Common.Implementations/Net/UdpSocket.csindex 244b37bb41..eca82034b0 100644--- a/Emby.Common.Implementations/Net/UdpSocket.cs+++ b/Emby.Common.Implementations/Net/UdpSocket.cs@@ -175,7 +175,7 @@ namespace Emby.Common.Implementations.Netreturn null;}- return BaseNetworkManager.ToIpEndPointInfo(endpoint);+ return NetworkManager.ToIpEndPointInfo(endpoint);}private void ProcessResponse(IAsyncResult asyncResult)diff --git a/Emby.Common.Implementations/Networking/BaseNetworkManager.cs b/Emby.Common.Implementations/Networking/NetworkManager.cssimilarity index 95%rename from Emby.Common.Implementations/Networking/BaseNetworkManager.csrename to Emby.Common.Implementations/Networking/NetworkManager.csindex f1ac8413be..e336973377 100644--- a/Emby.Common.Implementations/Networking/BaseNetworkManager.cs+++ b/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.Networkingvar 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>();+ }}}diff --git a/MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegLoader.cs b/Emby.Server.Core/FFMpeg/FFMpegLoader.cssimilarity index 89%rename from MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegLoader.csrename to Emby.Server.Core/FFMpeg/FFMpegLoader.csindex 08e6b435b5..6b090102ab 100644--- a/MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegLoader.cs+++ b/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.FFMpegprivate 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.FFMpegprivate 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)diff --git a/MediaBrowser.Server.Startup.Common/TextLocalizer.cs b/Emby.Server.Core/Localization/TextLocalizer.cssimilarity index 93%rename from MediaBrowser.Server.Startup.Common/TextLocalizer.csrename to Emby.Server.Core/Localization/TextLocalizer.csindex c578199a07..016d596590 100644--- a/MediaBrowser.Server.Startup.Common/TextLocalizer.cs+++ b/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{diff --git a/MediaBrowser.Server.Startup.Common/Security/AuthenticationRepository.cs b/Emby.Server.Core/Security/AuthenticationRepository.cssimilarity index 99%rename from MediaBrowser.Server.Startup.Common/Security/AuthenticationRepository.csrename to Emby.Server.Core/Security/AuthenticationRepository.csindex 0cf9f0879a..eaf91c710e 100644--- a/MediaBrowser.Server.Startup.Common/Security/AuthenticationRepository.cs+++ b/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{diff --git a/Emby.Server.Core/project.json b/Emby.Server.Core/project.jsonindex e4e4741b13..8e120c8a11 100644--- a/Emby.Server.Core/project.json+++ b/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"}}}diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csprojindex 438edf212f..f65b8ac4aa 100644--- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj+++ b/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>diff --git a/MediaBrowser.Server.Startup.Common/MbLinkShortcutHandler.cs b/Emby.Server.Implementations/IO/MbLinkShortcutHandler.cssimilarity index 92%rename from MediaBrowser.Server.Startup.Common/MbLinkShortcutHandler.csrename to Emby.Server.Implementations/IO/MbLinkShortcutHandler.csindex 26318365b6..0b1391ae02 100644--- a/MediaBrowser.Server.Startup.Common/MbLinkShortcutHandler.cs+++ b/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.Commonthrow new ArgumentNullException("targetPath");}- File.WriteAllText(shortcutPath, targetPath);+ _fileSystem.WriteAllText(shortcutPath, targetPath);}}}diff --git a/MediaBrowser.Common/Net/INetworkManager.cs b/MediaBrowser.Common/Net/INetworkManager.csindex 779db0a828..5ac701f820 100644--- a/MediaBrowser.Common/Net/INetworkManager.cs+++ b/MediaBrowser.Common/Net/INetworkManager.cs@@ -54,12 +54,5 @@ namespace MediaBrowser.Common.Netbool 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);}}\ No newline at end of filediff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csprojindex d867b15123..518daa6d75 100644--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj+++ b/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" />diff --git a/MediaBrowser.Model/IO/IFileSystem.cs b/MediaBrowser.Model/IO/IFileSystem.csindex d2bb355203..f219d92959 100644--- a/MediaBrowser.Model/IO/IFileSystem.cs+++ b/MediaBrowser.Model/IO/IFileSystem.cs@@ -312,6 +312,8 @@ namespace MediaBrowser.Model.IOstring GetFullPath(string path);List<FileSystemMetadata> GetDrives();++ void SetExecutable(string path);}public enum FileOpenModediff --git a/MediaBrowser.Controller/Devices/CameraUploadsFolder.cs b/MediaBrowser.Server.Implementations/Devices/CameraUploadsFolder.cssimilarity index 100%rename from MediaBrowser.Controller/Devices/CameraUploadsFolder.csrename to MediaBrowser.Server.Implementations/Devices/CameraUploadsFolder.csdiff --git a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csprojindex 16c45f2e51..3bfbff6e67 100644--- a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj+++ b/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>diff --git a/MediaBrowser.Controller/Playlists/ManualPlaylistsFolder.cs b/MediaBrowser.Server.Implementations/Playlists/ManualPlaylistsFolder.cssimilarity index 100%rename from MediaBrowser.Controller/Playlists/ManualPlaylistsFolder.csrename to MediaBrowser.Server.Implementations/Playlists/ManualPlaylistsFolder.csdiff --git a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csprojindex d59725d1d1..b62d99a136 100644--- a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj+++ b/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>diff --git a/MediaBrowser.Server.Mono/Native/MonoApp.cs b/MediaBrowser.Server.Mono/Native/MonoApp.csindex 59c95316c1..6e7a677aee 100644--- a/MediaBrowser.Server.Mono/Native/MonoApp.cs+++ b/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.Nativediff --git a/MediaBrowser.Server.Mono/Native/MonoFileSystem.cs b/MediaBrowser.Server.Mono/Native/MonoFileSystem.csnew file mode 100644index 0000000000..9639566947--- /dev/null+++ b/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);+ }+ }+}diff --git a/MediaBrowser.Server.Mono/Program.cs b/MediaBrowser.Server.Mono/Program.csindex d453596278..7d687bb545 100644--- a/MediaBrowser.Server.Mono/Program.cs+++ b/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 requestsServicePointManager.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"));diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.csindex 6d7ec699d9..0646c71fda 100644--- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs+++ b/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.Commonstring 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.Commontry{- NetworkManager.GenerateSelfSignedSslCertificate(certPath, certHost);+ CertificateGenerator.CreateSelfSignCertificatePfx(certPath, certHost, Logger);}catch (Exception ex){@@ -1213,12 +1213,12 @@ namespace MediaBrowser.Server.Startup.Common// Common implementationslist.Add(typeof(TaskManager).Assembly);- // MediaBrowser.Server implementations- list.Add(typeof(ServerApplicationPaths).Assembly);-// Emby.Server implementationslist.Add(typeof(InstallationManager).Assembly);+ // Emby.Server.Core+ list.Add(typeof(ServerApplicationPaths).Assembly);+// MediaEncodinglist.Add(typeof(MediaEncoder).Assembly);diff --git a/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs b/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.csindex f36b14cae2..f5a337505b 100644--- a/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs+++ b/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>";diff --git a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csprojindex 79c1356de3..4bbd86060e 100644--- a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj+++ b/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">diff --git a/MediaBrowser.Server.Startup.Common/Networking/NetworkManager.cs b/MediaBrowser.Server.Startup.Common/Networking/NetworkManager.csdeleted file mode 100644index bd260bf873..0000000000--- a/MediaBrowser.Server.Startup.Common/Networking/NetworkManager.cs+++ /dev/null@@ -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);- }- }-}diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.csindex 2d97cbdf7a..f2967e14a0 100644--- a/MediaBrowser.ServerApplication/MainStartup.cs+++ b/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;diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csprojindex 2c78c22c92..b082b14d8b 100644--- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj+++ b/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>diff --git a/MediaBrowser.ServerApplication/Native/WindowsApp.cs b/MediaBrowser.ServerApplication/Native/WindowsApp.csindex 8424bf5746..d0f8239fec 100644--- a/MediaBrowser.ServerApplication/Native/WindowsApp.cs+++ b/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.Nativediff --git a/MediaBrowser.ServerApplication/Networking/NetworkManager.cs b/MediaBrowser.ServerApplication/Networking/NetworkManager.csindex 7b4379abf0..ed99dcc061 100644--- a/MediaBrowser.ServerApplication/Networking/NetworkManager.cs+++ b/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)