update core project

This commit is contained in:
Luke Pulverenti 2016-11-11 02:24:36 -05:00
parent 06afe47ee9
commit 00cbadea2c
28 changed files with 102 additions and 113 deletions

View File

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

View File

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

View File

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

View File

@ -9,15 +9,17 @@ using System.Net.Sockets;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Net; using MediaBrowser.Model.Net;
using MediaBrowser.Model.IO;
using MediaBrowser.Common.Net;
namespace Emby.Common.Implementations.Networking namespace Emby.Common.Implementations.Networking
{ {
public abstract class BaseNetworkManager public class NetworkManager : INetworkManager
{ {
protected ILogger Logger { get; private set; } protected ILogger Logger { get; private set; }
private DateTime _lastRefresh; private DateTime _lastRefresh;
protected BaseNetworkManager(ILogger logger) public NetworkManager(ILogger logger)
{ {
Logger = logger; Logger = logger;
} }
@ -481,5 +483,24 @@ namespace Emby.Common.Implementations.Networking
var addresses = await Dns.GetHostAddressesAsync(host).ConfigureAwait(false); var addresses = await Dns.GetHostAddressesAsync(host).ConfigureAwait(false);
return addresses.Select(ToIpAddressInfo).ToArray(); 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>();
}
} }
} }

View File

@ -2,7 +2,6 @@
using MediaBrowser.Common.Net; using MediaBrowser.Common.Net;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using Mono.Unix.Native;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
@ -12,7 +11,7 @@ using System.Threading.Tasks;
using Emby.Server.Core; using Emby.Server.Core;
using Emby.Server.Core.FFMpeg; using Emby.Server.Core.FFMpeg;
namespace MediaBrowser.Server.Startup.Common.FFMpeg namespace Emby.Server.Core.FFMpeg
{ {
public class FFMpegLoader public class FFMpegLoader
{ {
@ -21,21 +20,19 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly IZipClient _zipClient; private readonly IZipClient _zipClient;
private readonly IFileSystem _fileSystem; private readonly IFileSystem _fileSystem;
private readonly NativeEnvironment _environment;
private readonly FFMpegInstallInfo _ffmpegInstallInfo; 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; _logger = logger;
_appPaths = appPaths; _appPaths = appPaths;
_httpClient = httpClient; _httpClient = httpClient;
_zipClient = zipClient; _zipClient = zipClient;
_fileSystem = fileSystem; _fileSystem = fileSystem;
_environment = environment;
_ffmpegInstallInfo = ffmpegInstallInfo; _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 customffMpegPath = options.GetOption("-ffmpeg");
var customffProbePath = options.GetOption("-ffprobe"); var customffProbePath = options.GetOption("-ffprobe");
@ -210,13 +207,7 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
private void SetFilePermissions(string path) private void SetFilePermissions(string path)
{ {
// Linux: File permission to 666, and user's execute bit _fileSystem.SetExecutable(path);
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);
}
} }
private void ExtractArchive(FFMpegInstallInfo downloadinfo, string archivePath, string targetPath) private void ExtractArchive(FFMpegInstallInfo downloadinfo, string archivePath, string targetPath)

View File

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

View File

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

View File

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

View File

@ -92,6 +92,7 @@
<Compile Include="Images\BaseDynamicImageProvider.cs" /> <Compile Include="Images\BaseDynamicImageProvider.cs" />
<Compile Include="Intros\DefaultIntroProvider.cs" /> <Compile Include="Intros\DefaultIntroProvider.cs" />
<Compile Include="IO\FileRefresher.cs" /> <Compile Include="IO\FileRefresher.cs" />
<Compile Include="IO\MbLinkShortcutHandler.cs" />
<Compile Include="IO\ThrottledStream.cs" /> <Compile Include="IO\ThrottledStream.cs" />
<Compile Include="Library\CoreResolutionIgnoreRule.cs" /> <Compile Include="Library\CoreResolutionIgnoreRule.cs" />
<Compile Include="Library\LibraryManager.cs" /> <Compile Include="Library\LibraryManager.cs" />
@ -270,6 +271,10 @@
<Project>{442b5058-dcaf-4263-bb6a-f21e31120a1b}</Project> <Project>{442b5058-dcaf-4263-bb6a-f21e31120a1b}</Project>
<Name>MediaBrowser.Providers</Name> <Name>MediaBrowser.Providers</Name>
</ProjectReference> </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"> <Reference Include="ServiceStack">
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.dll</HintPath> <HintPath>..\ThirdParty\ServiceStack\ServiceStack.dll</HintPath>
</Reference> </Reference>

View File

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

View File

@ -54,12 +54,5 @@ namespace MediaBrowser.Common.Net
bool TryParseIpAddress(string ipAddress, out IpAddressInfo ipAddressInfo); bool TryParseIpAddress(string ipAddress, out IpAddressInfo ipAddressInfo);
Task<IpAddressInfo[]> GetHostAddressesAsync(string host); 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);
} }
} }

View File

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

View File

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

View File

@ -44,13 +44,11 @@
<Compile Include="..\SharedVersion.cs"> <Compile Include="..\SharedVersion.cs">
<Link>Properties\SharedVersion.cs</Link> <Link>Properties\SharedVersion.cs</Link>
</Compile> </Compile>
<Compile Include="Devices\CameraUploadsFolder.cs" />
<Compile Include="Playlists\ManualPlaylistsFolder.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<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"> <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">
<Project>{9142EEFA-7570-41E1-BFCC-468BB571AF2F}</Project> <Project>{9142EEFA-7570-41E1-BFCC-468BB571AF2F}</Project>
<Name>MediaBrowser.Common</Name> <Name>MediaBrowser.Common</Name>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,7 +5,7 @@ using System.Security.Cryptography;
namespace Emby.Common.Implementations.Security 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>"; 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>";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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