diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 6fb6235541..1ab376001c 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -710,10 +710,10 @@ namespace Emby.Server.Implementations.Library } /// - /// Creates the root media folder + /// Creates the root media folder. /// /// AggregateFolder. - /// Cannot create the root folder until plugins have loaded + /// Cannot create the root folder until plugins have loaded. public AggregateFolder CreateRootFolder() { var rootFolderPath = ConfigurationManager.ApplicationPaths.RootFolderPath; @@ -824,7 +824,6 @@ namespace Emby.Server.Implementations.Library { // If this returns multiple items it could be tricky figuring out which one is correct. // In most cases, the newest one will be and the others obsolete but not yet cleaned up - if (string.IsNullOrEmpty(path)) { throw new ArgumentNullException(nameof(path)); @@ -844,7 +843,7 @@ namespace Emby.Server.Implementations.Library } /// - /// Gets a Person + /// Gets the person. /// /// The name. /// Task{Person}. @@ -854,7 +853,7 @@ namespace Emby.Server.Implementations.Library } /// - /// Gets a Studio + /// Gets the studio. /// /// The name. /// Task{Studio}. @@ -879,7 +878,7 @@ namespace Emby.Server.Implementations.Library } /// - /// Gets a Genre + /// Gets the genre. /// /// The name. /// Task{Genre}. @@ -889,7 +888,7 @@ namespace Emby.Server.Implementations.Library } /// - /// Gets the genre. + /// Gets the music genre. /// /// The name. /// Task{MusicGenre}. @@ -899,7 +898,7 @@ namespace Emby.Server.Implementations.Library } /// - /// Gets a Year + /// Gets the year. /// /// The value. /// Task{Year}. @@ -1076,9 +1075,9 @@ namespace Emby.Server.Implementations.Library var innerProgress = new ActionableProgress(); - innerProgress.RegisterAction(pct => progress.Report(pct * .96)); + innerProgress.RegisterAction(pct => progress.Report(pct * pct * 0.96)); - // Now validate the entire media library + // Validate the entire media library await RootFolder.ValidateChildren(innerProgress, cancellationToken, new MetadataRefreshOptions(new DirectoryService(_fileSystem)), recursive: true).ConfigureAwait(false); progress.Report(96); @@ -1087,7 +1086,6 @@ namespace Emby.Server.Implementations.Library innerProgress.RegisterAction(pct => progress.Report(96 + (pct * .04))); - // Run post-scan tasks await RunPostScanTasks(innerProgress, cancellationToken).ConfigureAwait(false); progress.Report(100); @@ -1138,7 +1136,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError(ex, "Error running postscan task"); + _logger.LogError(ex, "Error running post-scan task"); } numComplete++; diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index 656eeb1459..9dbd48bfc8 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -291,10 +291,11 @@ namespace Emby.Server.Implementations.Library && authenticationProvider != null && !(authenticationProvider is DefaultAuthenticationProvider)) { - // We should trust the user that the authprovider says, not what was typed + // Trust the username returned by the authentication provider username = updatedUsername; - // Search the database for the user again; the authprovider might have created it + // Search the database for the user again + // the authentication provider might have created it user = Users .FirstOrDefault(i => string.Equals(username, i.Name, StringComparison.OrdinalIgnoreCase)); diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs index ecd5262510..5822c467b7 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs @@ -70,7 +70,7 @@ namespace Emby.Server.Implementations.ScheduledTasks } /// - /// Returns the task to be executed + /// Returns the task to be executed. /// /// The cancellation token. /// The progress. @@ -89,7 +89,6 @@ namespace Emby.Server.Implementations.ScheduledTasks SourceTypes = new SourceType[] { SourceType.Library }, HasChapterImages = false, IsVirtualItem = false - }) .OfType