updated ImageMagickSharp

This commit is contained in:
Luke Pulverenti 2015-04-23 22:15:29 -04:00
parent 6f01652520
commit db66b73a4f
14 changed files with 56 additions and 59 deletions

View File

@ -34,7 +34,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="ImageMagickSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ImageMagickSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ImageMagickSharp.1.0.0.15\lib\net45\ImageMagickSharp.dll</HintPath> <HintPath>..\packages\ImageMagickSharp.1.0.0.16\lib\net45\ImageMagickSharp.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />

View File

@ -63,6 +63,7 @@ namespace Emby.Drawing.ImageMagick
{ {
_logger.Info("ImageMagick version: " + Wand.VersionString); _logger.Info("ImageMagick version: " + Wand.VersionString);
TestWebp(); TestWebp();
Wand.SetMagickThreadCount(1);
} }
private bool _webpAvailable = true; private bool _webpAvailable = true;

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="ImageMagickSharp" version="1.0.0.15" targetFramework="net45" /> <package id="ImageMagickSharp" version="1.0.0.16" targetFramework="net45" />
</packages> </packages>

View File

@ -66,6 +66,7 @@ namespace MediaBrowser.Api
_config.Configuration.EnableStandaloneMetadata = true; _config.Configuration.EnableStandaloneMetadata = true;
_config.Configuration.EnableLibraryMetadataSubFolder = true; _config.Configuration.EnableLibraryMetadataSubFolder = true;
_config.Configuration.EnableUserSpecificUserViews = true; _config.Configuration.EnableUserSpecificUserViews = true;
_config.Configuration.EnableCustomPathSubFolders = true;
_config.SaveConfiguration(); _config.SaveConfiguration();
} }

View File

@ -164,9 +164,22 @@ namespace MediaBrowser.Common.Implementations.Configuration
/// </summary> /// </summary>
private void UpdateCachePath() private void UpdateCachePath()
{ {
((BaseApplicationPaths)CommonApplicationPaths).CachePath = string.IsNullOrEmpty(CommonConfiguration.CachePath) ? string cachePath;
null :
CommonConfiguration.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;
} }
/// <summary> /// <summary>

View File

@ -50,6 +50,12 @@ namespace MediaBrowser.Model.Configuration
/// <value>The cache path.</value> /// <value>The cache path.</value>
public string CachePath { get; set; } public string CachePath { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [enable custom path sub folders].
/// </summary>
/// <value><c>true</c> if [enable custom path sub folders]; otherwise, <c>false</c>.</value>
public bool EnableCustomPathSubFolders { get; set; }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="BaseApplicationConfiguration" /> class. /// Initializes a new instance of the <see cref="BaseApplicationConfiguration" /> class.
/// </summary> /// </summary>

View File

@ -185,8 +185,6 @@ namespace MediaBrowser.Model.Configuration
public MetadataOptions[] MetadataOptions { get; set; } public MetadataOptions[] MetadataOptions { get; set; }
public string TranscodingTempPath { get; set; }
public bool EnableAutomaticRestart { get; set; } public bool EnableAutomaticRestart { get; set; }
public bool EnableRealtimeMonitor { get; set; } public bool EnableRealtimeMonitor { get; set; }

View File

@ -101,9 +101,22 @@ namespace MediaBrowser.Server.Implementations.Configuration
/// </summary> /// </summary>
private void UpdateMetadataPath() private void UpdateMetadataPath()
{ {
((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath = string.IsNullOrEmpty(Configuration.MetadataPath) ? string metadataPath;
GetInternalMetadataPath() :
Configuration.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) if (Configuration.MergeMetadataAndImagesByName)
{ {
@ -130,7 +143,7 @@ namespace MediaBrowser.Server.Implementations.Configuration
((ServerApplicationPaths)ApplicationPaths).TranscodingTempPath = string.IsNullOrEmpty(encodingConfig.TranscodingTempPath) ? ((ServerApplicationPaths)ApplicationPaths).TranscodingTempPath = string.IsNullOrEmpty(encodingConfig.TranscodingTempPath) ?
null : null :
encodingConfig.TranscodingTempPath; Path.Combine(encodingConfig.TranscodingTempPath, "transcoding-temp");
} }
protected override void OnNamedConfigurationUpdated(string key, object configuration) protected override void OnNamedConfigurationUpdated(string key, object configuration)

View File

@ -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 namespace MediaBrowser.Server.Implementations.Sync
{ {
@ -31,13 +31,13 @@ namespace MediaBrowser.Server.Implementations.Sync
DirectPlayProfiles = new[] DirectPlayProfiles = new[]
{ {
new DirectPlayProfile //new DirectPlayProfile
{ //{
Container = "mkv", // Container = "mkv",
VideoCodec = "h264,mpeg4", // VideoCodec = "h264,mpeg4",
AudioCodec = mkvAudio, // AudioCodec = mkvAudio,
Type = DlnaProfileType.Video // Type = DlnaProfileType.Video
}, //},
new DirectPlayProfile new DirectPlayProfile
{ {
Container = "mp4,mov,m4v", Container = "mp4,mov,m4v",

View File

@ -357,10 +357,7 @@ namespace MediaBrowser.Server.Startup.Common
private void PerformPostInitMigrations() private void PerformPostInitMigrations()
{ {
var migrations = new List<IVersionMigration> var migrations = new List<IVersionMigration>();
{
new MigrateTranscodingPath(ServerConfigurationManager)
};
foreach (var task in migrations) foreach (var task in migrations)
{ {

View File

@ -66,7 +66,6 @@
<Compile Include="Migrations\DeleteDlnaProfiles.cs" /> <Compile Include="Migrations\DeleteDlnaProfiles.cs" />
<Compile Include="Migrations\DeprecatePlugins.cs" /> <Compile Include="Migrations\DeprecatePlugins.cs" />
<Compile Include="Migrations\IVersionMigration.cs" /> <Compile Include="Migrations\IVersionMigration.cs" />
<Compile Include="Migrations\MigrateTranscodingPath.cs" />
<Compile Include="Migrations\MigrateUserFolders.cs" /> <Compile Include="Migrations\MigrateUserFolders.cs" />
<Compile Include="Migrations\RenameXbmcOptions.cs" /> <Compile Include="Migrations\RenameXbmcOptions.cs" />
<Compile Include="Migrations\RenameXmlOptions.cs" /> <Compile Include="Migrations\RenameXmlOptions.cs" />

View File

@ -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<EncodingOptions>("encoding");
newConfig.TranscodingTempPath = _config.Configuration.TranscodingTempPath;
_config.SaveConfiguration("encoding", newConfig);
_config.Configuration.TranscodingTempPath = null;
_config.SaveConfiguration();
}
}
}
}

View File

@ -60,9 +60,8 @@
<Prefer32Bit>true</Prefer32Bit> <Prefer32Bit>true</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ImageMagickSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ImageMagickSharp">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\ImageMagickSharp.1.0.0.16\lib\net45\ImageMagickSharp.dll</HintPath>
<HintPath>..\packages\ImageMagickSharp.1.0.0.15\lib\net45\ImageMagickSharp.dll</HintPath>
</Reference> </Reference>
<Reference Include="MediaBrowser.IsoMounter"> <Reference Include="MediaBrowser.IsoMounter">
<HintPath>..\packages\MediaBrowser.IsoMounting.3.0.69\lib\net45\MediaBrowser.IsoMounter.dll</HintPath> <HintPath>..\packages\MediaBrowser.IsoMounting.3.0.69\lib\net45\MediaBrowser.IsoMounter.dll</HintPath>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="ImageMagickSharp" version="1.0.0.15" targetFramework="net45" /> <package id="ImageMagickSharp" version="1.0.0.16" targetFramework="net45" />
<package id="MediaBrowser.IsoMounting" version="3.0.69" targetFramework="net45" /> <package id="MediaBrowser.IsoMounting" version="3.0.69" targetFramework="net45" />
<package id="System.Data.SQLite.Core" version="1.0.94.0" targetFramework="net45" /> <package id="System.Data.SQLite.Core" version="1.0.94.0" targetFramework="net45" />
</packages> </packages>