aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-01-26 13:41:12 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-01-26 13:41:12 -0500
commitdb4290c74cd06815ba05165a79c95b89028cb678 (patch)
tree39aa1bb98f07eb2afbdae3f093aa082f83a46b80
parent045fdaf3874c9b57d80a97d0fefdcd3454f7c044 (diff)
add error handling
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 71ba465df..c59a22884 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.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;
+ }
}
}