From 554d1b2ca8868e7aeb1fa9acac75cb8ce423796a Mon Sep 17 00:00:00 2001 From: Stanislav Ionascu Date: Tue, 4 Jan 2022 21:52:52 +0000 Subject: Fix #7100 by catching the exception on opening invalid UDF images When an invalid UDF image is opened by the UdfReader, it may throw and exception. This change is to catch and log the exception. --- Emby.Server.Implementations/Library/Resolvers/ExtraResolver.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Emby.Server.Implementations/Library/Resolvers/ExtraResolver.cs') diff --git a/Emby.Server.Implementations/Library/Resolvers/ExtraResolver.cs b/Emby.Server.Implementations/Library/Resolvers/ExtraResolver.cs index 807913b5d..408e640f9 100644 --- a/Emby.Server.Implementations/Library/Resolvers/ExtraResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/ExtraResolver.cs @@ -6,6 +6,7 @@ using Emby.Naming.Video; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Resolvers; using MediaBrowser.Model.Entities; +using Microsoft.Extensions.Logging; using static Emby.Naming.Video.ExtraRuleResolver; namespace Emby.Server.Implementations.Library.Resolvers @@ -22,12 +23,13 @@ namespace Emby.Server.Implementations.Library.Resolvers /// /// Initializes a new instance of the class. /// + /// The logger. /// An instance of . - public ExtraResolver(NamingOptions namingOptions) + public ExtraResolver(ILogger logger, NamingOptions namingOptions) { _namingOptions = namingOptions; - _trailerResolvers = new IItemResolver[] { new GenericVideoResolver(namingOptions) }; - _videoResolvers = new IItemResolver[] { new GenericVideoResolver