Don't set MediaType if parameters ambiguous (#720)

This commit is contained in:
Deterous
2024-07-07 11:28:04 +09:00
committed by GitHub
parent 7cd25dae1c
commit 1baef4440a
2 changed files with 6 additions and 2 deletions

View File

@@ -37,6 +37,7 @@
- Fix CLI help text alignment
- Bring Check and CLI in parity with param processing
- Remove now-unncessary names
- Don't set MediaType if parameters ambiguous
### 3.2.0 (2024-06-20)

View File

@@ -1820,8 +1820,11 @@ namespace MPF.Frontend.ViewModels
if (MediaTypes != null)
{
MediaType? mediaType = _environment.GetMediaType();
int mediaTypeIndex = MediaTypes.FindIndex(m => m == mediaType);
this.CurrentMediaType = (mediaTypeIndex > -1 ? MediaTypes[mediaTypeIndex] : MediaTypes[0]);
if (mediaType != null)
{
int mediaTypeIndex = MediaTypes.FindIndex(m => m == mediaType);
this.CurrentMediaType = (mediaTypeIndex > -1 ? MediaTypes[mediaTypeIndex] : MediaTypes[0]);
}
}
// Reenable change handling