From c5c0f6a8b9f0d4bdb9a4efaf3628d1a73e0bac1a Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 1 Jul 2026 15:47:46 -0700 Subject: [PATCH] Show default/total track counts in the default-flags detection The redundant Default flags warning reported only the Default-flagged count per track type, so it was not clear why a track was flagged. Report the count over the total track count per type (e.g. Video: 1/1, Audio: 1/1, Subtitle: 0/2) so the reason is visible: 1/1 is a lone track, 2/4 is multiple defaults. Co-Authored-By: Claude Opus 4.8 (1M context) --- PlexCleaner/ProcessFile.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PlexCleaner/ProcessFile.cs b/PlexCleaner/ProcessFile.cs index 4e813c8f..d5a9bee9 100644 --- a/PlexCleaner/ProcessFile.cs +++ b/PlexCleaner/ProcessFile.cs @@ -609,12 +609,16 @@ public bool RepairDefaultFlags(ref bool modified) return true; } - // Detected: redundant Default flags, report the Default-flagged track count per type + // Detected: redundant Default flags, report Default-flagged count over total track count per + // type so the reason is visible (1/1 = lone track, 2/4 = multiple defaults) Log.Warning( - "Redundant Default flags detected : Video: {Video}, Audio: {Audio}, Subtitle: {Subtitle} : {FileName}", + "Redundant Default flags detected : Video: {VideoDefault}/{VideoTotal}, Audio: {AudioDefault}/{AudioTotal}, Subtitle: {SubtitleDefault}/{SubtitleTotal} : {FileName}", MkvMergeProps.Video.Count(item => item.Flags.HasFlag(TrackProps.FlagsType.Default)), + MkvMergeProps.Video.Count, MkvMergeProps.Audio.Count(item => item.Flags.HasFlag(TrackProps.FlagsType.Default)), + MkvMergeProps.Audio.Count, MkvMergeProps.Subtitle.Count(item => item.Flags.HasFlag(TrackProps.FlagsType.Default)), + MkvMergeProps.Subtitle.Count, FileInfo.Name );