More gracefully handle "missing" media types

This commit is contained in:
Matt Nadareski
2025-10-08 09:29:34 -04:00
parent 9770b7c917
commit 78df92e5d3
2 changed files with 5 additions and 1 deletions

View File

@@ -27,6 +27,7 @@
- Finalize wire-through and clean up
- Minor cleanup on interactive modes
- Add more useful credentials inputs for Check
- More gracefully handle "missing" media types
### 3.4.2 (2025-09-30)

View File

@@ -356,6 +356,9 @@ namespace MPF.Frontend
// If we're on an unsupported type, update the status accordingly
return mediaType switch
{
// Null means it will be handled by the program
null => ResultEventArgs.Success("Ready to dump"),
// Fully supported types
MediaType.BluRay
or MediaType.CDROM
@@ -377,7 +380,7 @@ namespace MPF.Frontend
MediaType.UMD => ResultEventArgs.Failure($"{mediaType.LongName()} supported for submission info parsing"),
// Specifically unknown type
MediaType.NONE => ResultEventArgs.Failure($"Please select a valid media type"),
MediaType.NONE => ResultEventArgs.Failure("Please select a valid media type"),
// Undumpable but recognized types
_ => ResultEventArgs.Failure($"{mediaType.LongName()} media are not supported for dumping"),