diff options
| author | Luke Foust <luke@foust.com> | 2020-03-20 12:53:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-20 12:53:52 -0700 |
| commit | dcd0d93f44bf1befea5e61993bc868b5846102a0 (patch) | |
| tree | 740f132fce52947fc8a73621588ca36c3447922a /Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs | |
| parent | 80dfc78ba5ec3895fd374a5bd761d0d0e9e6a862 (diff) | |
| parent | e028fb6fdefa6120fc6109c63d883d21412c31bd (diff) | |
Merge pull request #1 from jellyfin/master
merge with upstream master
Diffstat (limited to 'Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs')
| -rw-r--r-- | Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs | 35 |
1 files changed, 35 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..673f0e415 --- /dev/null +++ b/Jellyfin.Server/Migrations/Routines/DisableTranscodingThrottling.cs @@ -0,0 +1,35 @@ +using System; +using System.IO; +using MediaBrowser.Common.Configuration; +using MediaBrowser.Model.Configuration; +using Microsoft.Extensions.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); + } + } + } +} |
