diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-15 23:17:42 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-15 23:17:42 -0400 |
| commit | 2c5ee7e2cf45b6d70c2c64dfe2372d420aa3aa14 (patch) | |
| tree | 2151b437d68879b11cd93c56fec3deb8e89be5c1 /MediaBrowser.Api/Library/LibraryStructureService.cs | |
| parent | bd0ad4a5cd87fca5b75ee8eacdc76fe6cf2a287c (diff) | |
restore library editor
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryStructureService.cs')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryStructureService.cs | 10 |
1 files changed, 9 insertions, 1 deletions
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 |
