update active recordings

This commit is contained in:
Luke Pulverenti
2017-08-24 15:52:19 -04:00
parent 5e0f8fd8c4
commit e441e2f53d
157 changed files with 568 additions and 654 deletions

View File

@@ -6,13 +6,13 @@ namespace Emby.Drawing.ImageMagick
{
internal static class ImageHelpers
{
internal static List<string> ProjectPaths(List<string> paths, int count)
internal static List<string> ProjectPaths(string[] paths, int count)
{
if (count <= 0)
{
throw new ArgumentOutOfRangeException("count");
}
if (paths.Count == 0)
if (paths.Length == 0)
{
throw new ArgumentOutOfRangeException("paths");
}
@@ -24,7 +24,7 @@ namespace Emby.Drawing.ImageMagick
return list.Take(count).ToList();
}
private static void AddToList(List<string> list, List<string> paths, int count)
private static void AddToList(List<string> list, string[] paths, int count)
{
while (list.Count < count)
{

View File

@@ -7,7 +7,6 @@ using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Logging;
using System;
using System.IO;
using System.Linq;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.System;
@@ -306,15 +305,15 @@ namespace Emby.Drawing.ImageMagick
if (ratio >= 1.4)
{
new StripCollageBuilder(_appPaths, _fileSystem).BuildThumbCollage(options.InputPaths.ToList(), options.OutputPath, options.Width, options.Height);
new StripCollageBuilder(_appPaths, _fileSystem).BuildThumbCollage(options.InputPaths, options.OutputPath, options.Width, options.Height);
}
else if (ratio >= .9)
{
new StripCollageBuilder(_appPaths, _fileSystem).BuildSquareCollage(options.InputPaths.ToList(), options.OutputPath, options.Width, options.Height);
new StripCollageBuilder(_appPaths, _fileSystem).BuildSquareCollage(options.InputPaths, options.OutputPath, options.Width, options.Height);
}
else
{
new StripCollageBuilder(_appPaths, _fileSystem).BuildPosterCollage(options.InputPaths.ToList(), options.OutputPath, options.Width, options.Height);
new StripCollageBuilder(_appPaths, _fileSystem).BuildPosterCollage(options.InputPaths, options.OutputPath, options.Width, options.Height);
}
}

View File

@@ -19,7 +19,7 @@ namespace Emby.Drawing.ImageMagick
_fileSystem = fileSystem;
}
public void BuildPosterCollage(List<string> paths, string outputPath, int width, int height)
public void BuildPosterCollage(string[] paths, string outputPath, int width, int height)
{
using (var wand = BuildPosterCollageWand(paths, width, height))
{
@@ -27,7 +27,7 @@ namespace Emby.Drawing.ImageMagick
}
}
public void BuildSquareCollage(List<string> paths, string outputPath, int width, int height)
public void BuildSquareCollage(string[] paths, string outputPath, int width, int height)
{
using (var wand = BuildSquareCollageWand(paths, width, height))
{
@@ -35,7 +35,7 @@ namespace Emby.Drawing.ImageMagick
}
}
public void BuildThumbCollage(List<string> paths, string outputPath, int width, int height)
public void BuildThumbCollage(string[] paths, string outputPath, int width, int height)
{
using (var wand = BuildThumbCollageWand(paths, width, height))
{
@@ -43,7 +43,7 @@ namespace Emby.Drawing.ImageMagick
}
}
private MagickWand BuildPosterCollageWand(List<string> paths, int width, int height)
private MagickWand BuildPosterCollageWand(string[] paths, int width, int height)
{
var inputPaths = ImageHelpers.ProjectPaths(paths, 3);
using (var wandImages = new MagickWand(inputPaths.ToArray()))
@@ -108,7 +108,7 @@ namespace Emby.Drawing.ImageMagick
}
}
private MagickWand BuildThumbCollageWand(List<string> paths, int width, int height)
private MagickWand BuildThumbCollageWand(string[] paths, int width, int height)
{
var inputPaths = ImageHelpers.ProjectPaths(paths, 4);
using (var wandImages = new MagickWand(inputPaths.ToArray()))
@@ -173,7 +173,7 @@ namespace Emby.Drawing.ImageMagick
}
}
private MagickWand BuildSquareCollageWand(List<string> paths, int width, int height)
private MagickWand BuildSquareCollageWand(string[] paths, int width, int height)
{
var inputPaths = ImageHelpers.ProjectPaths(paths, 4);
var outputWand = new MagickWand(width, height, new PixelWand("none", 1));