diff options
| author | Bond_009 <bond.009@outlook.com> | 2020-05-02 00:54:04 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-05-02 00:54:04 +0200 |
| commit | 15634a1913e8c1ad4e921364f30055794644d0bd (patch) | |
| tree | f0dfb3502728e4786de32c0cb4eaabd06f8e2d87 /Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs | |
| parent | 407f54e7764a6bfd8e4ccc0df897fac7e8c658b4 (diff) | |
| parent | 62e251663fce8216cea529f85382299ac2f39fbc (diff) | |
Merge branch 'master' into websocket
Diffstat (limited to 'Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs')
| -rw-r--r-- | Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs b/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs new file mode 100644 index 000000000..6f8e4a8ff --- /dev/null +++ b/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs @@ -0,0 +1,33 @@ +using System; +using MediaBrowser.Common.Configuration; +using MediaBrowser.Model.Configuration; +using Microsoft.Extensions.Logging; + +namespace Jellyfin.Server.Migrations.Routines +{ + /// <summary> + /// Disable transcode throttling for all installations since it is currently broken for certain video formats. + /// </summary> + internal class DisableTranscodingThrottling : IMigrationRoutine + { + /// <inheritdoc/> + public Guid Id => Guid.Parse("{4124C2CD-E939-4FFB-9BE9-9B311C413638}"); + + /// <inheritdoc/> + public string Name => "DisableTranscodingThrottling"; + + /// <inheritdoc/> + public void Perform(CoreAppHost host, ILogger logger) + { + // Set EnableThrottling to false since it wasn't used before and may introduce issues + var encoding = ((IConfigurationManager)host.ServerConfigurationManager).GetConfiguration<EncodingOptions>("encoding"); + if (encoding.EnableThrottling) + { + logger.LogInformation("Disabling transcoding throttling during migration"); + encoding.EnableThrottling = false; + + host.ServerConfigurationManager.SaveConfiguration("encoding", encoding); + } + } + } +} |
