From 73555df2ea69b55a488c722355a3b0ec11c06149 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 3 Jan 2022 21:26:54 -0800 Subject: [PATCH] Omit volume label for "Audio CD" (fixes #343) --- CHANGELIST.md | 1 + MPF.Library/InfoTool.cs | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index ba328ef7..b855be58 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -24,6 +24,7 @@ - Fix newline skipping - Add missing continue statement - Add newlines for mutliline special fields +- Omit volume label for "Audio CD" ### 2.2 (2021-12-30) - Fix Saturn header finding diff --git a/MPF.Library/InfoTool.cs b/MPF.Library/InfoTool.cs index 2107ed2c..a159261b 100644 --- a/MPF.Library/InfoTool.cs +++ b/MPF.Library/InfoTool.cs @@ -104,8 +104,12 @@ namespace MPF.Library info.TracksAndWriteOffsets.ClrMameProData = null; // Add the volume label to comments, if possible - if (!string.IsNullOrWhiteSpace(drive?.VolumeLabel) && !info.CommonDiscInfo.CommentsSpecialFields.ContainsKey(SiteCode.VolumeLabel)) + if (!string.IsNullOrWhiteSpace(drive?.VolumeLabel) + && !drive.VolumeLabel.Equals("Audio CD", StringComparison.OrdinalIgnoreCase) + && !info.CommonDiscInfo.CommentsSpecialFields.ContainsKey(SiteCode.VolumeLabel)) + { info.CommonDiscInfo.CommentsSpecialFields[SiteCode.VolumeLabel] = drive.VolumeLabel; + } // Extract info based generically on MediaType switch (mediaType)