[PR #578] [MERGED] Improve check for which program supports which media #1048

Closed
opened 2026-01-29 16:25:05 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/SabreTools/MPF/pull/578
Author: @Deterous
Created: 10/13/2023
Status: Merged
Merged: 10/13/2023
Merged by: @mnadareski

Base: masterHead: supported-media


📝 Commits (3)

  • 9a2c577 Move ProgramSupportsMedia to MPF.Core.Utilities.Tools
  • 279e16d Implement ProgramSupportsMedia slightly less naively
  • a32bccd ProgramSupportsMedia only considers MPF-supported types

📊 Changes

2 files changed (+94 additions, -30 deletions)

View changed files

📝 MPF.Core/UI/ViewModels/MainViewModel.cs (+1 -30)
📝 MPF.Core/Utilities/Tools.cs (+93 -0)

📄 Description

Slightly less naive solution, perhaps easier to read and improve later

  • Move helper function into MPF.Core.Utilities.Tools (where GetSupportStatus lives)
  • Change from a deny-list to an allow-list, media types must be explicitly defined as supported by each program
  • Only consider media types which MPF currently supports for dumping
  • Attempt to use switch expressions to remove some messages for .NET6/7 (although still using the outer switch statement as they're nested)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SabreTools/MPF/pull/578 **Author:** [@Deterous](https://github.com/Deterous) **Created:** 10/13/2023 **Status:** ✅ Merged **Merged:** 10/13/2023 **Merged by:** [@mnadareski](https://github.com/mnadareski) **Base:** `master` ← **Head:** `supported-media` --- ### 📝 Commits (3) - [`9a2c577`](https://github.com/SabreTools/MPF/commit/9a2c5775b3e6e3211042eea89717ba61572a3004) Move ProgramSupportsMedia to MPF.Core.Utilities.Tools - [`279e16d`](https://github.com/SabreTools/MPF/commit/279e16db93cb099166c8fb26d409555c37a8e047) Implement ProgramSupportsMedia slightly less naively - [`a32bccd`](https://github.com/SabreTools/MPF/commit/a32bccd8a2f8ddd337278c76dca3f135da8d9155) ProgramSupportsMedia only considers MPF-supported types ### 📊 Changes **2 files changed** (+94 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `MPF.Core/UI/ViewModels/MainViewModel.cs` (+1 -30) 📝 `MPF.Core/Utilities/Tools.cs` (+93 -0) </details> ### 📄 Description Slightly less naive solution, perhaps easier to read and improve later - Move helper function into `MPF.Core.Utilities.Tools` (where `GetSupportStatus` lives) - Change from a deny-list to an allow-list, media types must be explicitly defined as supported by each program - Only consider media types which MPF currently supports for dumping - Attempt to use switch expressions to remove some messages for .NET6/7 (although still using the outer switch statement as they're nested) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 16:25:05 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#1048