make library scan a bit more hands off
This commit is contained in:
@@ -39,14 +39,11 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
|
||||
progress.Report(2);
|
||||
var numComplete = 0;
|
||||
var count = items.Count;
|
||||
|
||||
foreach (var name in items)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
try
|
||||
{
|
||||
var itemByName = _libraryManager.GetMusicGenre(name);
|
||||
@@ -66,9 +63,9 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
|
||||
numComplete++;
|
||||
double percent = numComplete;
|
||||
percent /= count;
|
||||
percent *= 90;
|
||||
percent *= 100;
|
||||
|
||||
progress.Report(percent + 10);
|
||||
progress.Report(percent);
|
||||
}
|
||||
|
||||
progress.Report(100);
|
||||
|
||||
Reference in New Issue
Block a user