diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-11 02:24:36 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-11 02:24:36 -0500 |
| commit | 00cbadea2c5ea8c717808fb4e8b11004509dc379 (patch) | |
| tree | 3f59a210f8fd1bcd6cb72806eb11751712a2f777 /MediaBrowser.Server.Mono | |
| parent | 06afe47ee9716cb210067f3c09cd0c97722bd1c7 (diff) | |
update core project
Diffstat (limited to 'MediaBrowser.Server.Mono')
| -rw-r--r-- | MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj | 8 | ||||
| -rw-r--r-- | MediaBrowser.Server.Mono/Native/MonoApp.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Server.Mono/Native/MonoFileSystem.cs | 21 | ||||
| -rw-r--r-- | MediaBrowser.Server.Mono/Program.cs | 3 |
4 files changed, 29 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj index 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.cs index 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.Native diff --git a/MediaBrowser.Server.Mono/Native/MonoFileSystem.cs b/MediaBrowser.Server.Mono/Native/MonoFileSystem.cs new file mode 100644 index 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.cs index 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 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")); |
