diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-24 21:51:17 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-24 21:51:17 -0400 |
| commit | 2765ff58bcf6b8edb539f6e9045c93e39a4fe3f6 (patch) | |
| tree | db8308f2a34de0aded6dd0c2d1fbc16b9688794b | |
| parent | 41e3b2fb3aaeb688ba6c6078e79c3543baf8ca1e (diff) | |
show messages the first time folder rips are streamed
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryHelpers.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Library/LibraryHelpers.cs b/MediaBrowser.Api/Library/LibraryHelpers.cs index 8abdc4df5..ab7449273 100644 --- a/MediaBrowser.Api/Library/LibraryHelpers.cs +++ b/MediaBrowser.Api/Library/LibraryHelpers.cs @@ -182,6 +182,8 @@ namespace MediaBrowser.Api.Library throw new ArgumentException(string.Format("The path cannot be added to the library because {0} already exists.", duplicate)); } + // Don't allow duplicate sub-paths within the same user library, or it will result in duplicate items + // See comments in IsNewPathValid duplicate = Directory.EnumerateFiles(currentViewRootFolderPath, "*.lnk", SearchOption.AllDirectories) .Select(FileSystem.ResolveShortcut) .FirstOrDefault(p => !IsNewPathValid(mediaPath, p, true)); @@ -221,7 +223,7 @@ namespace MediaBrowser.Api.Library return true; } - // Validate the D:\Movies\Kids scenario + // If enforceSubPathRestriction is true, validate the D:\Movies\Kids scenario if (enforceSubPathRestriction && newPath.StartsWith(existingPath.TrimEnd(Path.DirectorySeparatorChar) + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase)) { return false; |
