Skip trying to set speeds if no drives

This commit is contained in:
Matt Nadareski
2025-09-29 10:43:12 -04:00
parent 3236223e3f
commit cf01095623
2 changed files with 5 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
- Remove SkipMediaTypeDetection option, cleanup options window
- Minor tweaks to frontend code
- Default to CD speed range
- Skip trying to set speeds if no drives
### 3.4.0 (2025-09-25)

View File

@@ -2103,6 +2103,10 @@ namespace MPF.Frontend.ViewModels
/// </summary>
public void SetSupportedDriveSpeed()
{
// Skip trying to set speeds if no drives
if (Drives.Count == 0)
return;
// Set the drive speed list that's appropriate
DriveSpeeds = InterfaceConstants.GetSpeedsForMediaType(CurrentMediaType);
VerboseLogLn($"Supported media speeds: {string.Join(", ", [.. DriveSpeeds.ConvertAll(ds => ds.ToString())])}");