From 07ab6a19e25b722513cf4731427ca04a08c6cb86 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 10 Jul 2017 03:37:00 -0400 Subject: [PATCH] 3.2.24.1 --- .../BaseApplicationHost.cs | 21 ++++++++++++++----- .../Localization/Ratings/es.txt | 5 +++++ MediaBrowser.Controller/Entities/Video.cs | 16 ++++++++++++++ MediaBrowser.Model/Sync/SyncJob.cs | 5 ++++- .../TV/TheMovieDb/MovieDbEpisodeProvider.cs | 2 -- SharedVersion.cs | 2 +- 6 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 Emby.Server.Implementations/Localization/Ratings/es.txt diff --git a/Emby.Common.Implementations/BaseApplicationHost.cs b/Emby.Common.Implementations/BaseApplicationHost.cs index d16afbce3..847eeca64 100644 --- a/Emby.Common.Implementations/BaseApplicationHost.cs +++ b/Emby.Common.Implementations/BaseApplicationHost.cs @@ -169,14 +169,15 @@ namespace Emby.Common.Implementations { _deviceId = new DeviceId(ApplicationPaths, LogManager.GetLogger("SystemId"), FileSystemManager); } - + return _deviceId.Value; } } public PackageVersionClass SystemUpdateLevel { - get { + get + { #if BETA return PackageVersionClass.Beta; @@ -216,7 +217,7 @@ namespace Emby.Common.Implementations // hack alert, until common can target .net core BaseExtensions.CryptographyProvider = CryptographyProvider; - + XmlSerializer = new MyXmlSerializer(fileSystem, logManager.GetLogger("XmlSerializer")); FailedAssemblies = new List(); @@ -565,7 +566,10 @@ namespace Emby.Common.Implementations try { - return assembly.GetTypes(); + // This null checking really shouldn't be needed but adding it due to some + // unhandled exceptions in mono 5.0 that are a little hard to hunt down + var types = assembly.GetTypes() ?? new Type[] { }; + return types.Where(t => t != null); } catch (ReflectionTypeLoadException ex) { @@ -578,7 +582,14 @@ namespace Emby.Common.Implementations } // If it fails we can still get a list of the Types it was able to resolve - return ex.Types.Where(t => t != null); + var types = ex.Types ?? new Type[] { }; + return types.Where(t => t != null); + } + catch (Exception ex) + { + Logger.ErrorException("Error loading types from assembly", ex); + + return new List(); } } diff --git a/Emby.Server.Implementations/Localization/Ratings/es.txt b/Emby.Server.Implementations/Localization/Ratings/es.txt new file mode 100644 index 000000000..1ba24fb99 --- /dev/null +++ b/Emby.Server.Implementations/Localization/Ratings/es.txt @@ -0,0 +1,5 @@ +ES-A,1 +ES-7,3 +ES-12,6 +ES-16,8 +ES-18,11 \ No newline at end of file diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 7978f4761..c5d9b9203 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -57,6 +57,22 @@ namespace MediaBrowser.Controller.Entities { get { + var extraType = ExtraType; + if (extraType.HasValue) + { + if (extraType.Value == Model.Entities.ExtraType.Sample) + { + return false; + } + if (extraType.Value == Model.Entities.ExtraType.ThemeVideo) + { + return false; + } + if (extraType.Value == Model.Entities.ExtraType.Trailer) + { + return false; + } + } return true; } } diff --git a/MediaBrowser.Model/Sync/SyncJob.cs b/MediaBrowser.Model/Sync/SyncJob.cs index 6709426b8..f0e262c50 100644 --- a/MediaBrowser.Model/Sync/SyncJob.cs +++ b/MediaBrowser.Model/Sync/SyncJob.cs @@ -59,7 +59,7 @@ namespace MediaBrowser.Model.Sync /// Gets or sets the status. /// /// The status. - public SyncJobStatus Status { get; set; } + public SyncJobStatus Status { get; set; } /// /// Gets or sets the user identifier. /// @@ -105,9 +105,12 @@ namespace MediaBrowser.Model.Sync public string PrimaryImageItemId { get; set; } public string PrimaryImageTag { get; set; } + public bool EnableAutomaticResync { get; set; } + public SyncJob() { RequestedItemIds = new List(); + EnableAutomaticResync = true; } } } diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs index 2e549f610..618a4df45 100644 --- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs @@ -196,8 +196,6 @@ namespace MediaBrowser.Providers.TV } catch (HttpException ex) { - Logger.Error("No metadata found for {0}", seasonNumber.Value); - if (ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.NotFound) { return result; diff --git a/SharedVersion.cs b/SharedVersion.cs index 0e07c788d..42b8a9abb 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.23.1")] +[assembly: AssemblyVersion("3.2.24.1")]