aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Library/LibraryHelpers.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-05-04 12:33:22 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-05-04 12:33:22 -0400
commit107d1fc4f136813eed648dda5d18f433ed9302e2 (patch)
treeb4430e17ca0e43fae5369ee01c2b54c7eb495560 /MediaBrowser.Api/Library/LibraryHelpers.cs
parent2eef80f96e484292a6416dec4bc69079710ff0f2 (diff)
move media path methods to core
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryHelpers.cs')
-rw-r--r--MediaBrowser.Api/Library/LibraryHelpers.cs35
1 files changed, 0 insertions, 35 deletions
diff --git a/MediaBrowser.Api/Library/LibraryHelpers.cs b/MediaBrowser.Api/Library/LibraryHelpers.cs
index 46ec4f270..22a88e2bf 100644
--- a/MediaBrowser.Api/Library/LibraryHelpers.cs
+++ b/MediaBrowser.Api/Library/LibraryHelpers.cs
@@ -50,40 +50,5 @@ namespace MediaBrowser.Api.Library
fileSystem.DeleteFile(shortcut);
}
}
-
- /// <summary>
- /// Adds an additional mediaPath to an existing virtual folder, within either the default view or a user view
- /// </summary>
- /// <param name="fileSystem">The file system.</param>
- /// <param name="virtualFolderName">Name of the virtual folder.</param>
- /// <param name="path">The path.</param>
- /// <param name="appPaths">The app paths.</param>
- public static void AddMediaPath(IFileSystem fileSystem, string virtualFolderName, string path, IServerApplicationPaths appPaths)
- {
- if (string.IsNullOrWhiteSpace(path))
- {
- throw new ArgumentNullException("path");
- }
-
- if (!fileSystem.DirectoryExists(path))
- {
- throw new DirectoryNotFoundException("The path does not exist.");
- }
-
- var rootFolderPath = appPaths.DefaultUserViewsPath;
- var virtualFolderPath = Path.Combine(rootFolderPath, virtualFolderName);
-
- var shortcutFilename = fileSystem.GetFileNameWithoutExtension(path);
-
- var lnk = Path.Combine(virtualFolderPath, shortcutFilename + ShortcutFileExtension);
-
- while (fileSystem.FileExists(lnk))
- {
- shortcutFilename += "1";
- lnk = Path.Combine(virtualFolderPath, shortcutFilename + ShortcutFileExtension);
- }
-
- fileSystem.CreateShortcut(lnk, path);
- }
}
}