diff options
| author | gnattu <gnattu@users.noreply.github.com> | 2024-09-30 10:21:46 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-29 20:21:46 -0600 |
| commit | 9ef7ccfc125d00c0a0ce789626db258a4cb51f2f (patch) | |
| tree | 667d2421149b9dbe1586b60457a5f1d5f77cc552 /MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | |
| parent | 77420739e6303787109b0f7e81ea067f7cd6b9f1 (diff) | |
Add perf tradeoff mode to image extractor (#12744)
Diffstat (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs')
| -rw-r--r-- | MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index 7ca508426..f8049cd48 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -40,6 +40,11 @@ namespace MediaBrowser.Controller.Extensions public const string FfmpegAnalyzeDurationKey = "FFmpeg:analyzeduration"; /// <summary> + /// The key for the FFmpeg image extraction performance tradeoff option. + /// </summary> + public const string FfmpegImgExtractPerfTradeoffKey = "FFmpeg:imgExtractPerfTradeoff"; + + /// <summary> /// The key for the FFmpeg path option. /// </summary> public const string FfmpegPathKey = "ffmpeg"; @@ -108,6 +113,14 @@ namespace MediaBrowser.Controller.Extensions => configuration.GetValue<bool>(FfmpegSkipValidationKey); /// <summary> + /// Gets a value indicating whether the server should trade off for performance during FFmpeg image extraction. + /// </summary> + /// <param name="configuration">The configuration to read the setting from.</param> + /// <returns><c>true</c> if the server should trade off for performance during FFmpeg image extraction, otherwise <c>false</c>.</returns> + public static bool GetFFmpegImgExtractPerfTradeoff(this IConfiguration configuration) + => configuration.GetValue<bool>(FfmpegImgExtractPerfTradeoffKey); + + /// <summary> /// Gets a value indicating whether playlists should allow duplicate entries from the <see cref="IConfiguration"/>. /// </summary> /// <param name="configuration">The configuration to read the setting from.</param> |
