From 961f48f5bcc8e4f1e0c3ac5e3c2757bbd14b6a9d Mon Sep 17 00:00:00 2001 From: Patrick Barron Date: Sun, 5 Apr 2020 12:45:01 -0400 Subject: Use ? and ?? where applicable --- MediaBrowser.Api/Library/LibraryStructureService.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'MediaBrowser.Api/Library/LibraryStructureService.cs') 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 -- cgit v1.2.3