updated image magick

pull/702/head
Luke Pulverenti 10 years ago
parent a639d32454
commit 6d983daf78

@ -32,8 +32,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ImageMagickSharp">
<HintPath>..\packages\ImageMagickSharp.1.0.0.13\lib\net45\ImageMagickSharp.dll</HintPath>
<Reference Include="ImageMagickSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ImageMagickSharp.1.0.0.14\lib\net45\ImageMagickSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -64,12 +65,13 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ImageMagick\UnplayedCountIndicator.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ImageMagick\fonts\MontserratLight.otf" />
<EmbeddedResource Include="ImageMagick\fonts\robotoregular.ttf" />
<EmbeddedResource Include="ImageMagick\fonts\webdings.ttf" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">

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

@ -1646,16 +1646,11 @@ namespace MediaBrowser.Controller.Entities
return ImageInfos.Where(i => i.Type == imageType);
}
public bool AddImages(ImageType imageType, List<FileInfo> images)
public bool AddImages(ImageType imageType, IEnumerable<FileInfo> images)
{
return AddImages(imageType, images.Cast<FileSystemInfo>().ToList());
}
public bool AddImages(ImageType imageType, IEnumerable<FileSystemInfo> images)
{
return AddImages(imageType, images.ToList());
}
/// <summary>
/// Adds the images.
/// </summary>

@ -1,10 +1,9 @@
using System;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Model.Dto;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Model.Dto;
namespace MediaBrowser.Controller.LiveTv
{

@ -305,7 +305,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer
var operationName = httpReq.OperationName;
var localPath = url.LocalPath;
if (string.Equals(localPath, "/mediabrowser/", StringComparison.OrdinalIgnoreCase))
if (string.Equals(localPath, "/mediabrowser/", StringComparison.OrdinalIgnoreCase) ||
string.Equals(localPath, "/emby/", StringComparison.OrdinalIgnoreCase))
{
httpRes.RedirectToUrl(DefaultRedirectPath);
return Task.FromResult(true);
@ -315,6 +316,11 @@ namespace MediaBrowser.Server.Implementations.HttpServer
httpRes.RedirectToUrl("mediabrowser/" + DefaultRedirectPath);
return Task.FromResult(true);
}
if (string.Equals(localPath, "/emby", StringComparison.OrdinalIgnoreCase))
{
httpRes.RedirectToUrl("emby/" + DefaultRedirectPath);
return Task.FromResult(true);
}
if (string.Equals(localPath, "/", StringComparison.OrdinalIgnoreCase))
{
httpRes.RedirectToUrl(DefaultRedirectPath);
@ -384,6 +390,12 @@ namespace MediaBrowser.Server.Implementations.HttpServer
foreach (var route in clone)
{
routes.Add(new RouteAttribute(NormalizeEmbyRoutePath(route.Path), route.Verbs)
{
Notes = route.Notes,
Priority = route.Priority,
Summary = route.Summary
});
routes.Add(new RouteAttribute(NormalizeRoutePath(route.Path), route.Verbs)
{
Notes = route.Notes,
@ -398,11 +410,37 @@ namespace MediaBrowser.Server.Implementations.HttpServer
Priority = route.Priority,
Summary = route.Summary
});
routes.Add(new RouteAttribute(DoubleNormalizeEmbyRoutePath(route.Path), route.Verbs)
{
Notes = route.Notes,
Priority = route.Priority,
Summary = route.Summary
});
}
return routes.ToArray();
}
private string NormalizeEmbyRoutePath(string path)
{
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
{
return "/emby" + path;
}
return "emby/" + path;
}
private string DoubleNormalizeEmbyRoutePath(string path)
{
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
{
return "/emby/emby" + path;
}
return "emby/emby/" + path;
}
private string NormalizeRoutePath(string path)
{
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))

@ -1212,8 +1212,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
var days = Math.Round(((double)maxPrograms) / programsPerDay);
// No less than 2, no more than 7
return Math.Max(2, Math.Min(days, 7));
return Math.Max(3, Math.Min(days, 14));
}
private async Task<IEnumerable<Tuple<string, ChannelInfo>>> GetChannels(ILiveTvService service, CancellationToken cancellationToken)

@ -62,7 +62,7 @@
<ItemGroup>
<Reference Include="ImageMagickSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ImageMagickSharp.1.0.0.13\lib\net45\ImageMagickSharp.dll</HintPath>
<HintPath>..\packages\ImageMagickSharp.1.0.0.14\lib\net45\ImageMagickSharp.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.IsoMounter">
<HintPath>..\packages\MediaBrowser.IsoMounting.3.0.69\lib\net45\MediaBrowser.IsoMounter.dll</HintPath>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ImageMagickSharp" version="1.0.0.13" targetFramework="net45" />
<package id="ImageMagickSharp" version="1.0.0.14" 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" />
</packages>
Loading…
Cancel
Save