From 9ef7ccfc125d00c0a0ce789626db258a4cb51f2f Mon Sep 17 00:00:00 2001 From: gnattu Date: Mon, 30 Sep 2024 10:21:46 +0800 Subject: Add perf tradeoff mode to image extractor (#12744) --- .../Extensions/ConfigurationExtensions.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs') 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 @@ -39,6 +39,11 @@ namespace MediaBrowser.Controller.Extensions /// public const string FfmpegAnalyzeDurationKey = "FFmpeg:analyzeduration"; + /// + /// The key for the FFmpeg image extraction performance tradeoff option. + /// + public const string FfmpegImgExtractPerfTradeoffKey = "FFmpeg:imgExtractPerfTradeoff"; + /// /// The key for the FFmpeg path option. /// @@ -107,6 +112,14 @@ namespace MediaBrowser.Controller.Extensions public static bool GetFFmpegSkipValidation(this IConfiguration configuration) => configuration.GetValue(FfmpegSkipValidationKey); + /// + /// Gets a value indicating whether the server should trade off for performance during FFmpeg image extraction. + /// + /// The configuration to read the setting from. + /// true if the server should trade off for performance during FFmpeg image extraction, otherwise false. + public static bool GetFFmpegImgExtractPerfTradeoff(this IConfiguration configuration) + => configuration.GetValue(FfmpegImgExtractPerfTradeoffKey); + /// /// Gets a value indicating whether playlists should allow duplicate entries from the . /// -- cgit v1.2.3