From 2c5ee7e2cf45b6d70c2c64dfe2372d420aa3aa14 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 15 Oct 2015 23:17:42 -0400 Subject: restore library editor --- MediaBrowser.Api/Library/LibraryStructureService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Api/Library/LibraryStructureService.cs') diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs index 96af5240e..76abfb743 100644 --- a/MediaBrowser.Api/Library/LibraryStructureService.cs +++ b/MediaBrowser.Api/Library/LibraryStructureService.cs @@ -204,9 +204,17 @@ namespace MediaBrowser.Api.Library if (_fileSystem.DirectoryExists(virtualFolderPath)) { - throw new ArgumentException("There is already a media collection with the name " + name + "."); + throw new ArgumentException("There is already a media library with the name " + name + "."); } + if (!string.IsNullOrWhiteSpace(request.Path)) + { + if (!_fileSystem.DirectoryExists(request.Path)) + { + throw new DirectoryNotFoundException("The specified folder does not exist."); + } + } + _libraryMonitor.Stop(); try -- cgit v1.2.3