diff options
Diffstat (limited to 'MediaBrowser.Api')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryHelpers.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Api/UserService.cs | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/MediaBrowser.Api/Library/LibraryHelpers.cs b/MediaBrowser.Api/Library/LibraryHelpers.cs index 2a3a04537e..e956e214db 100644 --- a/MediaBrowser.Api/Library/LibraryHelpers.cs +++ b/MediaBrowser.Api/Library/LibraryHelpers.cs @@ -98,16 +98,15 @@ namespace MediaBrowser.Api.Library if (!Directory.Exists(path)) { - throw new DirectoryNotFoundException("The media folder does not exist"); + throw new DirectoryNotFoundException(string.Format("The media collection {0} does not exist", virtualFolderName)); } var shortcut = Directory.EnumerateFiles(path, "*.lnk", SearchOption.AllDirectories).FirstOrDefault(f => FileSystem.ResolveShortcut(f).Equals(mediaPath, StringComparison.OrdinalIgnoreCase)); - if (string.IsNullOrEmpty(shortcut)) + if (!string.IsNullOrEmpty(shortcut)) { - throw new DirectoryNotFoundException("The media folder does not exist"); + File.Delete(shortcut); } - File.Delete(shortcut); } /// <summary> diff --git a/MediaBrowser.Api/UserService.cs b/MediaBrowser.Api/UserService.cs index d4442ff448..d43eded296 100644 --- a/MediaBrowser.Api/UserService.cs +++ b/MediaBrowser.Api/UserService.cs @@ -314,6 +314,8 @@ namespace MediaBrowser.Api var newUser = _userManager.CreateUser(dtoUser.Name).Result; + newUser.UpdateConfiguration(dtoUser.Configuration, _xmlSerializer); + var result = new DtoBuilder(Logger).GetDtoUser(newUser); return ToOptimizedResult(result); |
