diff --git a/Emby.Drawing/Emby.Drawing.csproj b/Emby.Drawing/Emby.Drawing.csproj index f278e1e296..b286885a55 100644 --- a/Emby.Drawing/Emby.Drawing.csproj +++ b/Emby.Drawing/Emby.Drawing.csproj @@ -34,7 +34,7 @@ False - ..\packages\ImageMagickSharp.1.0.0.15\lib\net45\ImageMagickSharp.dll + ..\packages\ImageMagickSharp.1.0.0.16\lib\net45\ImageMagickSharp.dll diff --git a/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs b/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs index 3d6cdd03dd..380c56059d 100644 --- a/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs +++ b/Emby.Drawing/ImageMagick/ImageMagickEncoder.cs @@ -63,6 +63,7 @@ namespace Emby.Drawing.ImageMagick { _logger.Info("ImageMagick version: " + Wand.VersionString); TestWebp(); + Wand.SetMagickThreadCount(1); } private bool _webpAvailable = true; diff --git a/Emby.Drawing/packages.config b/Emby.Drawing/packages.config index 35c98e592f..acbd2ee3ac 100644 --- a/Emby.Drawing/packages.config +++ b/Emby.Drawing/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/MediaBrowser.Api/StartupWizardService.cs b/MediaBrowser.Api/StartupWizardService.cs index 4655f2c6f9..6ee8d36035 100644 --- a/MediaBrowser.Api/StartupWizardService.cs +++ b/MediaBrowser.Api/StartupWizardService.cs @@ -66,6 +66,7 @@ namespace MediaBrowser.Api _config.Configuration.EnableStandaloneMetadata = true; _config.Configuration.EnableLibraryMetadataSubFolder = true; _config.Configuration.EnableUserSpecificUserViews = true; + _config.Configuration.EnableCustomPathSubFolders = true; _config.SaveConfiguration(); } diff --git a/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs b/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs index c53947e443..1b9146644a 100644 --- a/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs +++ b/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs @@ -164,9 +164,22 @@ namespace MediaBrowser.Common.Implementations.Configuration /// private void UpdateCachePath() { - ((BaseApplicationPaths)CommonApplicationPaths).CachePath = string.IsNullOrEmpty(CommonConfiguration.CachePath) ? - null : - CommonConfiguration.CachePath; + string cachePath; + + if (string.IsNullOrWhiteSpace(CommonConfiguration.CachePath)) + { + cachePath = null; + } + else if (CommonConfiguration.EnableCustomPathSubFolders) + { + cachePath = Path.Combine(CommonConfiguration.CachePath, "cache"); + } + else + { + cachePath = CommonConfiguration.CachePath; + } + + ((BaseApplicationPaths)CommonApplicationPaths).CachePath = cachePath; } /// diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs index 19620890e7..ca9db0bf08 100644 --- a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs +++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs @@ -50,6 +50,12 @@ namespace MediaBrowser.Model.Configuration /// The cache path. public string CachePath { get; set; } + /// + /// Gets or sets a value indicating whether [enable custom path sub folders]. + /// + /// true if [enable custom path sub folders]; otherwise, false. + public bool EnableCustomPathSubFolders { get; set; } + /// /// Initializes a new instance of the class. /// diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index ac9bd6b08f..8a3a2a3e43 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -185,8 +185,6 @@ namespace MediaBrowser.Model.Configuration public MetadataOptions[] MetadataOptions { get; set; } - public string TranscodingTempPath { get; set; } - public bool EnableAutomaticRestart { get; set; } public bool EnableRealtimeMonitor { get; set; } diff --git a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs index bb9e9057a3..bf199503be 100644 --- a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs +++ b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs @@ -101,9 +101,22 @@ namespace MediaBrowser.Server.Implementations.Configuration /// private void UpdateMetadataPath() { - ((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath = string.IsNullOrEmpty(Configuration.MetadataPath) ? - GetInternalMetadataPath() : - Configuration.MetadataPath; + string metadataPath; + + if (string.IsNullOrWhiteSpace(Configuration.MetadataPath)) + { + metadataPath = GetInternalMetadataPath(); + } + else if (Configuration.EnableCustomPathSubFolders) + { + metadataPath = Path.Combine(Configuration.MetadataPath, "metadata"); + } + else + { + metadataPath = Configuration.MetadataPath; + } + + ((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath = metadataPath; if (Configuration.MergeMetadataAndImagesByName) { @@ -130,7 +143,7 @@ namespace MediaBrowser.Server.Implementations.Configuration ((ServerApplicationPaths)ApplicationPaths).TranscodingTempPath = string.IsNullOrEmpty(encodingConfig.TranscodingTempPath) ? null : - encodingConfig.TranscodingTempPath; + Path.Combine(encodingConfig.TranscodingTempPath, "transcoding-temp"); } protected override void OnNamedConfigurationUpdated(string key, object configuration) diff --git a/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs b/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs index 992f1d16c0..0bc527ed56 100644 --- a/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs +++ b/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs @@ -1,5 +1,5 @@ -using System.Collections.Generic; -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; +using System.Collections.Generic; namespace MediaBrowser.Server.Implementations.Sync { @@ -31,13 +31,13 @@ namespace MediaBrowser.Server.Implementations.Sync DirectPlayProfiles = new[] { - new DirectPlayProfile - { - Container = "mkv", - VideoCodec = "h264,mpeg4", - AudioCodec = mkvAudio, - Type = DlnaProfileType.Video - }, + //new DirectPlayProfile + //{ + // Container = "mkv", + // VideoCodec = "h264,mpeg4", + // AudioCodec = mkvAudio, + // Type = DlnaProfileType.Video + //}, new DirectPlayProfile { Container = "mp4,mov,m4v", diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index 0579967394..1a20f7431c 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -357,10 +357,7 @@ namespace MediaBrowser.Server.Startup.Common private void PerformPostInitMigrations() { - var migrations = new List - { - new MigrateTranscodingPath(ServerConfigurationManager) - }; + var migrations = new List(); foreach (var task in migrations) { diff --git a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj index fb49692b54..4653e6ac77 100644 --- a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj +++ b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj @@ -66,7 +66,6 @@ - diff --git a/MediaBrowser.Server.Startup.Common/Migrations/MigrateTranscodingPath.cs b/MediaBrowser.Server.Startup.Common/Migrations/MigrateTranscodingPath.cs deleted file mode 100644 index 88f60841de..0000000000 --- a/MediaBrowser.Server.Startup.Common/Migrations/MigrateTranscodingPath.cs +++ /dev/null @@ -1,30 +0,0 @@ -using MediaBrowser.Common.Configuration; -using MediaBrowser.Controller.Configuration; -using MediaBrowser.Model.Configuration; - -namespace MediaBrowser.Server.Startup.Common.Migrations -{ - public class MigrateTranscodingPath : IVersionMigration - { - private readonly IServerConfigurationManager _config; - - public MigrateTranscodingPath(IServerConfigurationManager config) - { - _config = config; - } - - public void Run() - { - if (!string.IsNullOrWhiteSpace(_config.Configuration.TranscodingTempPath)) - { - var newConfig = _config.GetConfiguration("encoding"); - - newConfig.TranscodingTempPath = _config.Configuration.TranscodingTempPath; - _config.SaveConfiguration("encoding", newConfig); - - _config.Configuration.TranscodingTempPath = null; - _config.SaveConfiguration(); - } - } - } -} diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj index 5c4a15d70a..7e150248e3 100644 --- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj +++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj @@ -60,9 +60,8 @@ true - - False - ..\packages\ImageMagickSharp.1.0.0.15\lib\net45\ImageMagickSharp.dll + + ..\packages\ImageMagickSharp.1.0.0.16\lib\net45\ImageMagickSharp.dll ..\packages\MediaBrowser.IsoMounting.3.0.69\lib\net45\MediaBrowser.IsoMounter.dll diff --git a/MediaBrowser.ServerApplication/packages.config b/MediaBrowser.ServerApplication/packages.config index 6c69a853d6..5007cf8af3 100644 --- a/MediaBrowser.ServerApplication/packages.config +++ b/MediaBrowser.ServerApplication/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file