Explorar el Código

add error handling

Luke Pulverenti hace 8 años
padre
commit
db4290c74c
Se han modificado 1 ficheros con 7 adiciones y 4 borrados
  1. 7 4
      Emby.Server.Implementations/Library/LibraryManager.cs

+ 7 - 4
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.Library
 
             foreach (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;
+                    }
                 }
             }