mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-28 05:10:30 +00:00
fix: suppress repeated PriorityClass warning in MediaEncoder
When Jellyfin runs without permission to set process priority (e.g. Docker), StartProcess() logged a warning for every file probed during a library scan. Add a _canSetProcessPriority flag: warn once on first failure, skip all subsequent attempts. Fixes #15287
This commit is contained in:
parent
8b84bf6e21
commit
80a552a35d
1 changed files with 12 additions and 6 deletions
|
|
@ -85,6 +85,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
private bool _isVaapiDeviceSupportVulkanDrmModifier = false;
|
||||
private bool _isVaapiDeviceSupportVulkanDrmInterop = false;
|
||||
|
||||
private bool _canSetProcessPriority = true;
|
||||
|
||||
private bool _isVideoToolboxAv1DecodeAvailable = false;
|
||||
|
||||
private static string[] _vulkanImageDrmFmtModifierExts =
|
||||
|
|
@ -1123,13 +1125,17 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
{
|
||||
process.Process.Start();
|
||||
|
||||
try
|
||||
if (_canSetProcessPriority)
|
||||
{
|
||||
process.Process.PriorityClass = ProcessPriorityClass.BelowNormal;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Unable to set process priority to BelowNormal for {ProcessFileName}", process.Process.StartInfo.FileName);
|
||||
try
|
||||
{
|
||||
process.Process.PriorityClass = ProcessPriorityClass.BelowNormal;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_canSetProcessPriority = false;
|
||||
_logger.LogWarning(ex, "Unable to set process priority to BelowNormal for {ProcessFileName}. Further attempts will be skipped.", process.Process.StartInfo.FileName);
|
||||
}
|
||||
}
|
||||
|
||||
lock (_runningProcessesLock)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue