aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-11 02:24:36 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-11 02:24:36 -0500
commit00cbadea2c5ea8c717808fb4e8b11004509dc379 (patch)
tree3f59a210f8fd1bcd6cb72806eb11751712a2f777
parent06afe47ee9716cb210067f3c09cd0c97722bd1c7 (diff)
update core project
-rw-r--r--Emby.Common.Implementations/IO/ManagedFileSystem.cs5
-rw-r--r--Emby.Common.Implementations/Net/NetSocket.cs6
-rw-r--r--Emby.Common.Implementations/Net/UdpSocket.cs2
-rw-r--r--Emby.Common.Implementations/Networking/NetworkManager.cs (renamed from Emby.Common.Implementations/Networking/BaseNetworkManager.cs)25
-rw-r--r--Emby.Server.Core/FFMpeg/FFMpegLoader.cs (renamed from MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegLoader.cs)17
-rw-r--r--Emby.Server.Core/Localization/TextLocalizer.cs (renamed from MediaBrowser.Server.Startup.Common/TextLocalizer.cs)2
-rw-r--r--Emby.Server.Core/Security/AuthenticationRepository.cs (renamed from MediaBrowser.Server.Startup.Common/Security/AuthenticationRepository.cs)2
-rw-r--r--Emby.Server.Core/project.json7
-rw-r--r--Emby.Server.Implementations/Emby.Server.Implementations.csproj5
-rw-r--r--Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs (renamed from MediaBrowser.Server.Startup.Common/MbLinkShortcutHandler.cs)4
-rw-r--r--MediaBrowser.Common/Net/INetworkManager.cs7
-rw-r--r--MediaBrowser.Controller/MediaBrowser.Controller.csproj2
-rw-r--r--MediaBrowser.Model/IO/IFileSystem.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Devices/CameraUploadsFolder.cs (renamed from MediaBrowser.Controller/Devices/CameraUploadsFolder.cs)0
-rw-r--r--MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj6
-rw-r--r--MediaBrowser.Server.Implementations/Playlists/ManualPlaylistsFolder.cs (renamed from MediaBrowser.Controller/Playlists/ManualPlaylistsFolder.cs)0
-rw-r--r--MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj8
-rw-r--r--MediaBrowser.Server.Mono/Native/MonoApp.cs3
-rw-r--r--MediaBrowser.Server.Mono/Native/MonoFileSystem.cs21
-rw-r--r--MediaBrowser.Server.Mono/Program.cs3
-rw-r--r--MediaBrowser.Server.Startup.Common/ApplicationHost.cs20
-rw-r--r--MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs2
-rw-r--r--MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj5
-rw-r--r--MediaBrowser.Server.Startup.Common/Networking/NetworkManager.cs50
-rw-r--r--MediaBrowser.ServerApplication/MainStartup.cs1
-rw-r--r--MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj7
-rw-r--r--MediaBrowser.ServerApplication/Native/WindowsApp.cs1
-rw-r--r--MediaBrowser.ServerApplication/Networking/NetworkManager.cs2
28 files changed, 102 insertions, 113 deletions
diff --git a/Emby.Common.Implementations/IO/ManagedFileSystem.cs b/Emby.Common.Implementations/IO/ManagedFileSystem.cs
index 37b457598..81ca8dcff 100644
--- a/Emby.Common.Implementations/IO/ManagedFileSystem.cs
+++ b/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)
+ {
+
+ }
}
}
diff --git a/Emby.Common.Implementations/Net/NetSocket.cs b/Emby.Common.Implementations/Net/NetSocket.cs
index 72faa41a9..faa1a81e2 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.Net
public 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.cs
index 244b37bb4..eca82034b 100644
--- a/Emby.Common.Implementations/Net/UdpSocket.cs
+++ b/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)
diff --git a/Emby.Common.Implementations/Networking/BaseNetworkManager.cs b/Emby.Common.Implementations/Networking/NetworkManager.cs
index f1ac8413b..e33697337 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.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>();
+ }
}
}
diff --git a/MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegLoader.cs b/Emby.Server.Core/FFMpeg/FFMpegLoader.cs
index 08e6b435b..6b090102a 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.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)
diff --git a/MediaBrowser.Server.Startup.Common/TextLocalizer.cs b/Emby.Server.Core/Localization/TextLocalizer.cs
index c578199a0..016d59659 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.cs
index 0cf9f0879..eaf91c710 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.json
index e4e4741b1..8e120c8a1 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.csproj
index 438edf212..f65b8ac4a 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.cs
index 26318365b..0b1391ae0 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.Common
throw new ArgumentNullException("targetPath");
}
- File.WriteAllText(shortcutPath, targetPath);
+ _fileSystem.WriteAllText(shortcutPath, targetPath);
}
}
}
diff --git a/MediaBrowser.Common/Net/INetworkManager.cs b/MediaBrowser.Common/Net/INetworkManager.cs
index 779db0a82..5ac701f82 100644
--- a/MediaBrowser.Common/Net/INetworkManager.cs
+++ b/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);
}
} \ No newline at end of file
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index d867b1512..518daa6d7 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.cs
index d2bb35520..f219d9295 100644
--- a/MediaBrowser.Model/IO/IFileSystem.cs
+++ b/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
diff --git a/MediaBrowser.Controller/Devices/CameraUploadsFolder.cs b/MediaBrowser.Server.Implementations/Devices/CameraUploadsFolder.cs
index 979a929ca..979a929ca 100644
--- a/MediaBrowser.Controller/Devices/CameraUploadsFolder.cs
+++ b/MediaBrowser.Server.Implementations/Devices/CameraUploadsFolder.cs
diff --git a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj
index 16c45f2e5..3bfbff6e6 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.cs
index 07773d846..07773d846 100644
--- a/MediaBrowser.Controller/Playlists/ManualPlaylistsFolder.cs
+++ b/MediaBrowser.Server.Implementations/Playlists/ManualPlaylistsFolder.cs
diff --git a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj
index d59725d1d..b62d99a13 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.cs
index 59c95316c..6e7a677ae 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.Native
diff --git a/MediaBrowser.Server.Mono/Native/MonoFileSystem.cs b/MediaBrowser.Server.Mono/Native/MonoFileSystem.cs
new file mode 100644
index 000000000..963956694
--- /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.cs
index d45359627..7d687bb54 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 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"));
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
index 6d7ec699d..0646c71fd 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.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);
diff --git a/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs b/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs
index f36b14cae..f5a337505 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.csproj
index 79c1356de..4bbd86060 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.cs
deleted file mode 100644
index bd260bf87..000000000
--- 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.cs
index 2d97cbdf7..f2967e14a 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.csproj
index 2c78c22c9..b082b14d8 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.cs
index 8424bf574..d0f8239fe 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.Native
diff --git a/MediaBrowser.ServerApplication/Networking/NetworkManager.cs b/MediaBrowser.ServerApplication/Networking/NetworkManager.cs
index 7b4379abf..ed99dcc06 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)