question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Potential Enhancements to PlayniteApi.MainView.SelectGame()

See original GitHub issue

When 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():

  1. Select the game like it does currently
  2. Scroll the list to display the selected game (Fix #2493)
  3. 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:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
JosefNemeccommented, Feb 12, 2022

Closing, I’ve added new ways of selecting games and P10 has filters completely exposed in the SDK.

0reactions
JosefNemeccommented, Oct 28, 2021

Ok, so will adding separate API function to explicitly reset filters be enough?

Read more comments on GitHub >

github_iconTop Results From Across the Web

You can add the same path in external extensions multiple ...
Describe the bug. You can add the same path in external extensions multiple times. Ideally it shouldn't let you add it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found