From ac09136a3d73d97956efa9253951d66fdffc7504 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 22 Oct 2017 17:38:03 -0400 Subject: [PATCH] restore GetImageSize method --- Emby.Drawing/ImageProcessor.cs | 5 +++++ .../LiveTv/Listings/SchedulesDirect.cs | 6 ++++++ MediaBrowser.Controller/Drawing/IImageProcessor.cs | 2 ++ MediaBrowser.Controller/Entities/Audio/Audio.cs | 6 ++++++ MediaBrowser.Controller/Entities/BaseItem.cs | 2 +- MediaBrowser.Controller/Entities/Game.cs | 6 ++++++ MediaBrowser.Controller/Entities/Movies/BoxSet.cs | 6 ++++++ MediaBrowser.Controller/Entities/TV/Episode.cs | 6 ++++++ MediaBrowser.Controller/Entities/TV/Season.cs | 6 ++++++ MediaBrowser.Controller/Entities/TV/Series.cs | 6 ++++++ MediaBrowser.Controller/Entities/Video.cs | 6 ++++++ MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs | 2 +- 12 files changed, 57 insertions(+), 2 deletions(-) diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index 6bdb06c83e..1c60abfb5b 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -477,6 +477,11 @@ namespace Emby.Drawing return size; } + public ImageSize GetImageSize(string path) + { + return GetImageSize(path, true); + } + /// /// Gets the size of the image. /// diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index 136d0cc7fe..b3c7ecc9f3 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -650,6 +650,9 @@ namespace Emby.Server.Implementations.LiveTv.Listings bool enableRetry, ListingsProviderInfo providerInfo) { + // Schedules direct requires that the client support compression and will return a 400 response without it + options.EnableHttpCompression = true; + try { return await _httpClient.Post(options).ConfigureAwait(false); @@ -678,6 +681,9 @@ namespace Emby.Server.Implementations.LiveTv.Listings bool enableRetry, ListingsProviderInfo providerInfo) { + // Schedules direct requires that the client support compression and will return a 400 response without it + options.EnableHttpCompression = true; + try { return await _httpClient.SendAsync(options, "GET").ConfigureAwait(false); diff --git a/MediaBrowser.Controller/Drawing/IImageProcessor.cs b/MediaBrowser.Controller/Drawing/IImageProcessor.cs index 40ab71be81..0bc92ac7e7 100644 --- a/MediaBrowser.Controller/Drawing/IImageProcessor.cs +++ b/MediaBrowser.Controller/Drawing/IImageProcessor.cs @@ -26,6 +26,8 @@ namespace MediaBrowser.Controller.Drawing /// The image enhancers. IImageEnhancer[] ImageEnhancers { get; } + ImageSize GetImageSize(string path); + /// /// Gets the size of the image. /// diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs index 02a9f15a95..16fd75d2e9 100644 --- a/MediaBrowser.Controller/Entities/Audio/Audio.cs +++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs @@ -60,6 +60,12 @@ namespace MediaBrowser.Controller.Entities.Audio } } + [IgnoreDataMember] + public override bool SupportsPeople + { + get { return false; } + } + [IgnoreDataMember] public override bool SupportsAddingToPlaylist { diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 6898c01782..89d48ff90f 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1164,7 +1164,7 @@ namespace MediaBrowser.Controller.Entities [IgnoreDataMember] public virtual bool SupportsPeople { - get { return true; } + get { return false; } } [IgnoreDataMember] diff --git a/MediaBrowser.Controller/Entities/Game.cs b/MediaBrowser.Controller/Entities/Game.cs index fd45f7c823..bead0ef955 100644 --- a/MediaBrowser.Controller/Entities/Game.cs +++ b/MediaBrowser.Controller/Entities/Game.cs @@ -34,6 +34,12 @@ namespace MediaBrowser.Controller.Entities get { return true; } } + [IgnoreDataMember] + public override bool SupportsPeople + { + get { return false; } + } + /// /// Gets or sets the remote trailers. /// diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs index 0067515d88..268860ff01 100644 --- a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs +++ b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs @@ -45,6 +45,12 @@ namespace MediaBrowser.Controller.Entities.Movies } } + [IgnoreDataMember] + public override bool SupportsPeople + { + get { return true; } + } + public Guid[] LocalTrailerIds { get; set; } public Guid[] RemoteTrailerIds { get; set; } diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index c30e0ef8e7..3f52dfc934 100644 --- a/MediaBrowser.Controller/Entities/TV/Episode.cs +++ b/MediaBrowser.Controller/Entities/TV/Episode.cs @@ -78,6 +78,12 @@ namespace MediaBrowser.Controller.Entities.TV get { return true; } } + [IgnoreDataMember] + public override bool SupportsPeople + { + get { return true; } + } + [IgnoreDataMember] public int? AiredSeasonNumber { diff --git a/MediaBrowser.Controller/Entities/TV/Season.cs b/MediaBrowser.Controller/Entities/TV/Season.cs index bf6dc5678f..00bb75fa78 100644 --- a/MediaBrowser.Controller/Entities/TV/Season.cs +++ b/MediaBrowser.Controller/Entities/TV/Season.cs @@ -40,6 +40,12 @@ namespace MediaBrowser.Controller.Entities.TV } } + [IgnoreDataMember] + public override bool SupportsPeople + { + get { return true; } + } + [IgnoreDataMember] public override bool SupportsInheritedParentImages { diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index 5931c32e1b..1d09783d1f 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -64,6 +64,12 @@ namespace MediaBrowser.Controller.Entities.TV } } + [IgnoreDataMember] + public override bool SupportsPeople + { + get { return true; } + } + public Guid[] LocalTrailerIds { get; set; } public Guid[] RemoteTrailerIds { get; set; } diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 265e353414..52f1dd0514 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -44,6 +44,12 @@ namespace MediaBrowser.Controller.Entities } } + [IgnoreDataMember] + public override bool SupportsPeople + { + get { return true; } + } + [IgnoreDataMember] public override bool SupportsInheritedParentImages { diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs index aa6e5ad316..cb0075b335 100644 --- a/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs +++ b/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs @@ -123,7 +123,7 @@ namespace MediaBrowser.Providers.MediaInfo audio.Name = data.Name; } - if (!audio.LockedFields.Contains(MetadataFields.Cast)) + if (audio.SupportsPeople && !audio.LockedFields.Contains(MetadataFields.Cast)) { var people = new List();