Potential Enhancements to PlayniteApi.MainView.SelectGame()
See original GitHub issueWhen implementing my Playlist extension, I didn’t want to reimplement the entire Library UI. Instead, I added a “Show in Library” button that takes the selected games in the Playlist view and selects them in the Library. Then the user can see more information about the game or make batch modifications to multiple games.
There are some minor issues though:
- There’s currently a bug that only the Details view correctly scrolls the selection into view. See #2493
- I can only select one game with this API, I might want to set the selection to multiple games
- The selected game might be excluded from the current set of filters.
I’m thinking an improvement might be to have PlayniteApi.MainView.SelectGame()
:
- Select the game like it does currently
- Scroll the list to display the selected game (Fix #2493)
- If (and only if) the current filters exclude the selection, clear the filters
Not sure how to handle multiple games with that, maybe just use the first game in the list for step 2. And passing in a list is a breaking API change, whereas the rest of that isn’t. (Multiple selection is probably a lower priority concern, I suppose the only use case is batch modification.)
I could try writing PR for the “clear filters if selection is excluded” bit if you want me to. Not sure where you would want that though, maybe the setter for SelectedGame
in DesktopAppViewModel
?
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Closing, I’ve added new ways of selecting games and P10 has filters completely exposed in the SDK.
Ok, so will adding separate API function to explicitly reset filters be enough?