aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-06-21 10:51:11 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-06-21 10:51:11 -0400
commit98ee28bda46eed9d3cceaf963a3808ae1f3de0be (patch)
tree9ec017de4d172be3b973b3208f0b328a7788f9e1
parent7815d65e5c315990086c84e440cae125c77b3687 (diff)
update image magick encoder
-rw-r--r--Emby.Drawing.ImageMagick/ImageMagickEncoder.cs17
-rw-r--r--Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs14
-rw-r--r--Emby.Server.Implementations/LiveTv/LiveTvManager.cs2
-rw-r--r--MediaBrowser.Controller/Entities/Movies/BoxSet.cs5
-rw-r--r--MediaBrowser.Server.Mono/ImageEncoderHelper.cs6
5 files changed, 31 insertions, 13 deletions
diff --git a/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs b/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs
index 958ca85fd..ea8687de0 100644
--- a/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs
+++ b/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs
@@ -9,6 +9,7 @@ using System;
using System.IO;
using System.Linq;
using MediaBrowser.Model.IO;
+using MediaBrowser.Model.System;
namespace Emby.Drawing.ImageMagick
{
@@ -18,13 +19,15 @@ namespace Emby.Drawing.ImageMagick
private readonly IApplicationPaths _appPaths;
private readonly Func<IHttpClient> _httpClientFactory;
private readonly IFileSystem _fileSystem;
+ private readonly IEnvironmentInfo _environment;
- public ImageMagickEncoder(ILogger logger, IApplicationPaths appPaths, Func<IHttpClient> httpClientFactory, IFileSystem fileSystem)
+ public ImageMagickEncoder(ILogger logger, IApplicationPaths appPaths, Func<IHttpClient> httpClientFactory, IFileSystem fileSystem, IEnvironmentInfo environment)
{
_logger = logger;
_appPaths = appPaths;
_httpClientFactory = httpClientFactory;
_fileSystem = fileSystem;
+ _environment = environment;
LogVersion();
}
@@ -337,7 +340,17 @@ namespace Emby.Drawing.ImageMagick
public bool SupportsImageCollageCreation
{
- get { return true; }
+ get
+ {
+ // too heavy. seeing crashes on RPI.
+ if (_environment.SystemArchitecture == Architecture.Arm ||
+ _environment.SystemArchitecture == Architecture.Arm64)
+ {
+ return false;
+ }
+
+ return true;
+ }
}
public bool SupportsImageEncoding
diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
index 97197a0ab..e12acf140 100644
--- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
+++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
@@ -237,8 +237,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
private bool IsMovie(ScheduleDirect.ProgramDetails programInfo)
{
- var showType = programInfo.showType ?? string.Empty;
- return showType.IndexOf("movie", StringComparison.OrdinalIgnoreCase) != -1 || showType.IndexOf("film", StringComparison.OrdinalIgnoreCase) != -1;
+ return string.Equals(programInfo.entityType, "movie", StringComparison.OrdinalIgnoreCase);
}
private ProgramInfo GetProgram(string channelId, ScheduleDirect.Program programInfo, ScheduleDirect.ProgramDetails details)
@@ -280,8 +279,6 @@ namespace Emby.Server.Implementations.LiveTv.Listings
episodeTitle = details.episodeTitle150;
}
- var showType = details.showType ?? string.Empty;
-
var info = new ProgramInfo
{
ChannelId = channelId,
@@ -294,11 +291,11 @@ namespace Emby.Server.Implementations.LiveTv.Listings
EpisodeTitle = episodeTitle,
Audio = audioType,
IsRepeat = repeat,
- IsSeries = showType.IndexOf("series", StringComparison.OrdinalIgnoreCase) != -1,
+ IsSeries = string.Equals(details.entityType, "episode", StringComparison.OrdinalIgnoreCase),
ImageUrl = details.primaryImage,
ThumbImageUrl = details.thumbImage,
IsKids = string.Equals(details.audience, "children", StringComparison.OrdinalIgnoreCase),
- IsSports = showType.IndexOf("sports", StringComparison.OrdinalIgnoreCase) != -1,
+ IsSports = string.Equals(details.entityType, "sports", StringComparison.OrdinalIgnoreCase),
IsMovie = IsMovie(details),
Etag = programInfo.md5
};
@@ -882,7 +879,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
foreach (ScheduleDirect.Map map in root.map)
{
var channelNumber = GetChannelNumber(map);
-
+
var station = allStations.FirstOrDefault(item => string.Equals(item.stationID, map.stationID, StringComparison.OrdinalIgnoreCase));
if (station == null)
{
@@ -906,7 +903,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
{
channelInfo.Name = station.name;
}
-
+
channelInfo.Id = station.stationID;
channelInfo.CallSign = station.callsign;
@@ -1199,6 +1196,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
public List<ContentRating> contentRating { get; set; }
public List<Cast> cast { get; set; }
public List<Crew> crew { get; set; }
+ public string entityType { get; set; }
public string showType { get; set; }
public bool hasImageArtwork { get; set; }
public string primaryImage { get; set; }
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
index 8f62670e4..69def362b 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -742,7 +742,7 @@ namespace Emby.Server.Implementations.LiveTv
else
{
// Increment this whenver some internal change deems it necessary
- var etag = info.Etag + "5";
+ var etag = info.Etag + "6";
if (!string.Equals(etag, item.ExternalEtag, StringComparison.OrdinalIgnoreCase))
{
diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs
index 406a99f8b..8d440e51b 100644
--- a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs
+++ b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs
@@ -118,6 +118,11 @@ namespace MediaBrowser.Controller.Entities.Movies
{
get
{
+ if (string.IsNullOrWhiteSpace(Path))
+ {
+ return false;
+ }
+
return !FileSystem.ContainsSubPath(ConfigurationManager.ApplicationPaths.DataPath, Path);
}
}
diff --git a/MediaBrowser.Server.Mono/ImageEncoderHelper.cs b/MediaBrowser.Server.Mono/ImageEncoderHelper.cs
index 02593fb67..a74a18f37 100644
--- a/MediaBrowser.Server.Mono/ImageEncoderHelper.cs
+++ b/MediaBrowser.Server.Mono/ImageEncoderHelper.cs
@@ -9,6 +9,7 @@ using MediaBrowser.Controller.Drawing;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
using Emby.Drawing.Skia;
+using MediaBrowser.Model.System;
namespace MediaBrowser.Server.Startup.Common
{
@@ -19,7 +20,8 @@ namespace MediaBrowser.Server.Startup.Common
IFileSystem fileSystem,
StartupOptions startupOptions,
Func<IHttpClient> httpClient,
- IApplicationPaths appPaths)
+ IApplicationPaths appPaths,
+ IEnvironmentInfo environment)
{
if (!startupOptions.ContainsOption("-enablegdi"))
{
@@ -34,7 +36,7 @@ namespace MediaBrowser.Server.Startup.Common
try
{
- return new ImageMagickEncoder(logManager.GetLogger("ImageMagick"), appPaths, httpClient, fileSystem);
+ return new ImageMagickEncoder(logManager.GetLogger("ImageMagick"), appPaths, httpClient, fileSystem, environment);
}
catch
{