hide jellyfin timing stats by default; enable with env var (#2756)

This commit is contained in:
Jason Dove
2026-01-06 12:08:55 -06:00
committed by GitHub
parent 5c42609527
commit cc521326d9
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- `ETV_SLOW_API_MS` - milliseconds threshold for logging slow API calls (at DEBUG level)
- This is currently limited to *Jellyfin*
- `ETV_JF_PAGE_SIZE` - page size for library scan API calls to Jellyfin; default value is 10
- `ETV_JF_ENABLE_STATS` - enables logging timing information related to Jellyfin show library scans
- Add `Select All` button to media pages by @Erotemic
### Fixed
+3
View File
@@ -56,6 +56,8 @@ public class SystemEnvironment
}
JellyfinPageSize = jellyfinPageSize;
JellyfinEnableStats = !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("ETV_JF_ENABLE_STATS"));
}
public static string BaseUrl { get; }
@@ -68,4 +70,5 @@ public class SystemEnvironment
public static int? SlowDbMs { get; }
public static int? SlowApiMs { get; }
public static int JellyfinPageSize { get; }
public static bool JellyfinEnableStats { get; }
}
+2 -1
View File
@@ -1,5 +1,6 @@
using System.Collections.Concurrent;
using System.Diagnostics;
using ErsatzTV.Core;
namespace ErsatzTV.Infrastructure;
@@ -16,7 +17,7 @@ public static class ScanProfiler
public static void LogStatistics(Action<string> logAction)
{
if (Measurements.IsEmpty)
if (!SystemEnvironment.JellyfinEnableStats || Measurements.IsEmpty)
{
return;
}