aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Library/LibraryStructureService.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2020-04-15 11:09:14 +0200
committerBond_009 <bond.009@outlook.com>2020-04-15 11:09:14 +0200
commitfc049caba2ed4db499bd53a2e521550bc45b6ebe (patch)
tree95c4870cda0783f51dd8207a86fd5ae906054f77 /MediaBrowser.Api/Library/LibraryStructureService.cs
parent9cca964b0880dc41792fe27ee03e69609ff2ac7e (diff)
parent2eb5775ee3fc0bd98f88e7208798dec4aa63c724 (diff)
Merge branch 'master' into nullable3
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryStructureService.cs')
-rw-r--r--MediaBrowser.Api/Library/LibraryStructureService.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs
index c071b42f7..1e300814f 100644
--- a/MediaBrowser.Api/Library/LibraryStructureService.cs
+++ b/MediaBrowser.Api/Library/LibraryStructureService.cs
@@ -327,15 +327,11 @@ namespace MediaBrowser.Api.Library
try
{
- var mediaPath = request.PathInfo;
-
- if (mediaPath == null)
+ var mediaPath = request.PathInfo ?? new MediaPathInfo
{
- mediaPath = new MediaPathInfo
- {
- Path = request.Path
- };
- }
+ Path = request.Path
+ };
+
_libraryManager.AddMediaPath(request.Name, mediaPath);
}
finally