Omit volume label for "Audio CD" (fixes #343)

This commit is contained in:
Matt Nadareski
2022-01-03 21:26:54 -08:00
parent 3ca78604fd
commit 73555df2ea
2 changed files with 6 additions and 1 deletions

View File

@@ -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

View File

@@ -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)