aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
authorTim Hobbs <jesus.tesh@gmail.com>2014-03-05 04:27:13 -0800
committerTim Hobbs <jesus.tesh@gmail.com>2014-03-05 04:27:13 -0800
commit482fde658746750075ff8a562ca1fb88f1739ef4 (patch)
tree7bd5084ffa6be20a4533eb37d94f852f2d888a84 /MediaBrowser.Server.Implementations/Library/LibraryManager.cs
parent604f971477da4dca5247f7d531323175ad044150 (diff)
parent9396f16aed2f304789324afc83e0c9f385c5f00a (diff)
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Conflicts: MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 66e9e4fa1..6e9d803bf 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -451,7 +451,7 @@ namespace MediaBrowser.Server.Implementations.Library
}
}
- if (options.DeleteFileLocation && (locationType == LocationType.FileSystem || locationType == LocationType.Offline))
+ if (options.DeleteFileLocation && locationType != LocationType.Remote && locationType != LocationType.Virtual)
{
foreach (var path in item.GetDeletePaths().ToList())
{
@@ -922,6 +922,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidatePeople(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.PeoplePath);
+
return new PeopleValidator(this, _logger).ValidatePeople(cancellationToken, progress);
}
@@ -933,6 +936,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidateArtists(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.ArtistsPath);
+
return new ArtistsValidator(this, _userManager, _logger).Run(progress, cancellationToken);
}
@@ -944,6 +950,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidateMusicGenres(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.MusicGenrePath);
+
return new MusicGenresValidator(this, _userManager, _logger).Run(progress, cancellationToken);
}
@@ -955,6 +964,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidateGameGenres(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.GameGenrePath);
+
return new GameGenresValidator(this, _userManager, _logger).Run(progress, cancellationToken);
}
@@ -966,6 +978,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidateStudios(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.StudioPath);
+
return new StudiosValidator(this, _userManager, _logger).Run(progress, cancellationToken);
}
@@ -977,6 +992,9 @@ namespace MediaBrowser.Server.Implementations.Library
/// <returns>Task.</returns>
public Task ValidateGenres(CancellationToken cancellationToken, IProgress<double> progress)
{
+ // Ensure the location is unavailable.
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.GenrePath);
+
return new GenresValidator(this, _userManager, _logger).Run(progress, cancellationToken);
}