add error handling

pull/1154/head
Luke Pulverenti 8 years ago
parent 045fdaf387
commit db4290c74c

@ -2593,7 +2593,7 @@ namespace Emby.Server.Implementations.Library
{ {
foreach (var pathInfo in libraryOptions.PathInfos) foreach (var pathInfo in libraryOptions.PathInfos)
{ {
if (string.IsNullOrWhiteSpace(pathInfo.NetworkPath)) if (string.IsNullOrWhiteSpace(pathInfo.Path) || string.IsNullOrWhiteSpace(pathInfo.NetworkPath))
{ {
continue; continue;
} }
@ -2620,6 +2620,8 @@ namespace Emby.Server.Implementations.Library
} }
foreach (var map in ConfigurationManager.Configuration.PathSubstitutions) foreach (var map in ConfigurationManager.Configuration.PathSubstitutions)
{
if (!string.IsNullOrWhiteSpace(map.From))
{ {
var substitutionResult = SubstitutePathInternal(path, map.From, map.To); var substitutionResult = SubstitutePathInternal(path, map.From, map.To);
if (substitutionResult.Item2) if (substitutionResult.Item2)
@ -2627,6 +2629,7 @@ namespace Emby.Server.Implementations.Library
return substitutionResult.Item1; return substitutionResult.Item1;
} }
} }
}
return path; return path;
} }

Loading…
Cancel
Save