added auto-organize setting

This commit is contained in:
Luke Pulverenti
2015-08-22 15:46:55 -04:00
parent de8bf2b396
commit 795a8ab33b
4 changed files with 59 additions and 19 deletions

View File

@@ -48,8 +48,6 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
progress.Report(10);
var scanLibrary = false;
if (eligibleFiles.Count > 0)
{
var numComplete = 0;
@@ -61,12 +59,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
try
{
var result = await organizer.OrganizeEpisodeFile(file.FullName, options, options.OverwriteExistingEpisodes, cancellationToken).ConfigureAwait(false);
if (result.Status == FileSortingStatus.Success)
{
scanLibrary = true;
}
await organizer.OrganizeEpisodeFile(file.FullName, options, options.OverwriteExistingEpisodes, cancellationToken).ConfigureAwait(false);
}
catch (Exception ex)
{
@@ -106,12 +99,6 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
}
}
if (scanLibrary)
{
await _libraryManager.ValidateMediaLibrary(new Progress<double>(), CancellationToken.None)
.ConfigureAwait(false);
}
progress.Report(100);
}