Documentation and log message cleanup

pull/2523/head
Mark Monteiro 4 years ago
parent 7ecb16a46e
commit 1295f6c79b

@ -15,7 +15,7 @@ namespace Jellyfin.Server.Migrations
#pragma warning disable CA1819 // Properties should not return arrays #pragma warning disable CA1819 // Properties should not return arrays
/// <summary> /// <summary>
/// Gets or sets he list of applied migration routine names. /// Gets or sets the list of applied migration routine names.
/// </summary> /// </summary>
public string[] Applied { get; set; } public string[] Applied { get; set; }
#pragma warning restore CA1819 // Properties should not return arrays #pragma warning restore CA1819 // Properties should not return arrays

@ -6,7 +6,7 @@ using Microsoft.Extensions.Logging;
namespace Jellyfin.Server.Migrations namespace Jellyfin.Server.Migrations
{ {
/// <summary> /// <summary>
/// The class that knows how migrate between different Jellyfin versions. /// The class that knows which migrations to apply and how to apply them.
/// </summary> /// </summary>
public sealed class MigrationRunner public sealed class MigrationRunner
{ {
@ -45,22 +45,22 @@ namespace Jellyfin.Server.Migrations
var updater = Migrations[i]; var updater = Migrations[i];
if (applied.Contains(updater.Name)) if (applied.Contains(updater.Name))
{ {
logger.LogDebug("Skipping migration {Name} as it is already applied", updater.Name); logger.LogDebug("Skipping migration '{Name}' since it is already applied", updater.Name);
continue; continue;
} }
logger.LogInformation("Applying migration {Name}", updater.Name); logger.LogInformation("Applying migration '{Name}'", updater.Name);
try try
{ {
updater.Perform(host, logger); updater.Perform(host, logger);
} }
catch (Exception ex) catch (Exception ex)
{ {
logger.LogError(ex, "Cannot apply migration {Name}", updater.Name); logger.LogError(ex, "Could not apply migration '{Name}'", updater.Name);
throw; throw;
} }
logger.LogInformation("Migration {Name} applied successfully", updater.Name); logger.LogInformation("Migration '{Name}' applied successfully", updater.Name);
applied.Add(updater.Name); applied.Add(updater.Name);
} }

@ -4,7 +4,7 @@ using MediaBrowser.Common.Configuration;
namespace Jellyfin.Server.Migrations namespace Jellyfin.Server.Migrations
{ {
/// <summary> /// <summary>
/// A factory that teachs Jellyfin how to find a peristent file which lists all applied migrations. /// A factory that can find a persistent file of the migration configuration, which lists all applied migrations.
/// </summary> /// </summary>
public class MigrationsFactory : IConfigurationFactory public class MigrationsFactory : IConfigurationFactory
{ {

@ -8,7 +8,7 @@ using Microsoft.Extensions.Logging;
namespace Jellyfin.Server.Migrations.Routines namespace Jellyfin.Server.Migrations.Routines
{ {
/// <summary> /// <summary>
/// Updater that takes care of bringing configuration up to 10.5.0 standards. /// Disable transcode throttling for all installations since it is currently broken for certain video formats.
/// </summary> /// </summary>
internal class DisableTranscodingThrottling : IUpdater internal class DisableTranscodingThrottling : IUpdater
{ {
@ -18,7 +18,7 @@ namespace Jellyfin.Server.Migrations.Routines
/// <inheritdoc/> /// <inheritdoc/>
public void Perform(CoreAppHost host, ILogger logger) public void Perform(CoreAppHost host, ILogger logger)
{ {
// Set EnableThrottling to false as it wasn't used before, and in 10.5.0 it may introduce issues // Set EnableThrottling to false since it wasn't used before and may introduce issues
var encoding = ((IConfigurationManager)host.ServerConfigurationManager).GetConfiguration<EncodingOptions>("encoding"); var encoding = ((IConfigurationManager)host.ServerConfigurationManager).GetConfiguration<EncodingOptions>("encoding");
if (encoding.EnableThrottling) if (encoding.EnableThrottling)
{ {

Loading…
Cancel
Save