mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-04 05:35:52 +00:00
Ensure volume label is trimmed if used in filenames
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
- Path scan after image scan
|
||||
- Update Redumper to build 663
|
||||
- Name some type parameters
|
||||
- Ensure volume label is trimmed if used in filenames
|
||||
|
||||
### 3.5.0 (2025-10-10)
|
||||
|
||||
|
||||
@@ -49,6 +49,9 @@ namespace MPF.Frontend.Tools
|
||||
if (string.IsNullOrEmpty(volumeLabel))
|
||||
return null;
|
||||
|
||||
// Trim the volume label
|
||||
volumeLabel = volumeLabel!.Trim();
|
||||
|
||||
// Audio CD
|
||||
if (volumeLabel!.Equals("Audio CD", StringComparison.OrdinalIgnoreCase))
|
||||
return RedumpSystem.AudioCD;
|
||||
|
||||
@@ -665,6 +665,7 @@ namespace MPF.Frontend.Tools
|
||||
/// </summary>
|
||||
/// <param name="original">Source dictionary to add to</param>
|
||||
/// <param name="add">Second dictionary to add from</param>
|
||||
/// TODO: Remove from here when IO is updated
|
||||
private static void MergeDictionaries(Dictionary<string, List<string>> original, Dictionary<string, List<string>> add)
|
||||
{
|
||||
// Ignore if there are no values to append
|
||||
|
||||
@@ -2010,7 +2010,7 @@ namespace MPF.Frontend.ViewModels
|
||||
return DiscNotDetectedValue;
|
||||
|
||||
// Use internal serials where appropriate
|
||||
string? volumeLabel = string.IsNullOrEmpty(drive.VolumeLabel) ? null : drive.VolumeLabel;
|
||||
string? volumeLabel = string.IsNullOrEmpty(drive.VolumeLabel) ? null : drive.VolumeLabel!.Trim();
|
||||
switch (GetRedumpSystem(drive))
|
||||
{
|
||||
case RedumpSystem.SonyPlayStation:
|
||||
|
||||
Reference in New Issue
Block a user