The Free Software Media System - Server Backend & API
add error handling
Luke Pulverentidb4290c74cd0
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.csindex 71ba465df4..c59a22884c 100644--- a/Emby.Server.Implementations/Library/LibraryManager.cs+++ b/Emby.Server.Implementations/Library/LibraryManager.cs@@ -2593,7 +2593,7 @@ namespace Emby.Server.Implementations.Library{foreach (var pathInfo in libraryOptions.PathInfos){- if (string.IsNullOrWhiteSpace(pathInfo.NetworkPath))+ if (string.IsNullOrWhiteSpace(pathInfo.Path) || string.IsNullOrWhiteSpace(pathInfo.NetworkPath)){continue;}@@ -2621,10 +2621,13 @@ namespace Emby.Server.Implementations.Libraryforeach (var map in ConfigurationManager.Configuration.PathSubstitutions){- var substitutionResult = SubstitutePathInternal(path, map.From, map.To);- if (substitutionResult.Item2)+ if (!string.IsNullOrWhiteSpace(map.From)){- return substitutionResult.Item1;+ var substitutionResult = SubstitutePathInternal(path, map.From, map.To);+ if (substitutionResult.Item2)+ {+ return substitutionResult.Item1;+ }}}