Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Playnite Support #200

Closed
NightHammer1000 opened this issue Aug 7, 2022 · 19 comments
Closed

[Feature Request] Playnite Support #200

NightHammer1000 opened this issue Aug 7, 2022 · 19 comments
Labels
enhancement New feature or request

Comments

@NightHammer1000
Copy link

I tried to code this myself but due to lack of time and health I have to put a nail into it.

Just can't sit long enough at a desk to pull it off, so I put this up here to pick up if interested.

The Support for Playnite would be Awesome. Its an wonderfull Library Manager and Multi Launcher. Even usable under Linux with Wine. Its also great for Emulation. So this would be a great way to get Emulation Support into BoilR

Playnite stores all the Game Entries in a LiteDB Database "games.db" in the "library" folder. In Portable Mode this Folder is in the Playnite Folder itself. In Installed Mode it's in the Playnite Folder under %appdata%. The games.db has everything in it, we need. Even pointers to the Artwork already downloaded in Playnite. So, we don't need to search SteamGridDB for Artwork if it already exists in Playnite.

For Launch Options a checkbox for "Launch via Playnite" and "Launch directly" would be awesome. Quite like It's already there for Heroic.

@PhilipK
Copy link
Owner

PhilipK commented Jan 4, 2023

I am looking into this, you are right, everything seem to be there, I do see a couple of potential problems:

  • Playnite uses LiteDB which is C# only no-sql database, I might be able to scrape it with Nom that I have used to scrape other binary files with before, I will give it a try.
  • If Playnite is running it locks the db files, so it should have to be turned off for BoilR to be able to pick up the games.
  • It does not look like the games names are always stored in the games.db file, might have to do some guesswork.
  • I don't know for sure how I would make this work on Linux, so I think that I will start with Windows only support, but I guess if you install Playnite through proton it would be possible to look for the games.db file in all compat folders.

I will keep this issue updated.

@PhilipK
Copy link
Owner

PhilipK commented Jan 4, 2023

@NightHammer1000 I have created an early beta version of BoilR with playnite support, can you give it a try and see if it works for you as well?

I only have access to 1 windows machine, so would be nice with some more testers before it is merged into main.

https://github.com/PhilipK/BoilR/releases/tag/playnite-beta-v1

@NightHammer1000
Copy link
Author

Wow. That was fast. :D
I would love to test it out, but my Instance is sadly portable because I actually have two on my PC.
One for the PC Games and a separate one for Emulation.

@NightHammer1000
Copy link
Author

Will setup a Installed Instance tomorrow to test around a bit.

@PhilipK
Copy link
Owner

PhilipK commented Jan 5, 2023 via email

@NightHammer1000
Copy link
Author

It does indeed work and imports both installed and Uninstalled Games.

I have tested:
Games that are imported into Playnite from EA, Ubi and GoG.
Games that are manually added to Playnite

This is Great.

Some Suggestions for the Future would be:
Import only Installed
Use Playnite Artwork

@PhilipK
Copy link
Owner

PhilipK commented Jan 5, 2023

@NightHammer1000 cool, I think I will put this out as a real release then (maybe still mark Playnite as Beta in the settings menu).
Then I can start looking at your other suggestions.

I think the priorities are:
Working on the portable version (specify the location in settings)
Import only installed
Working on Linux (installed through Proton)

@NightHammer1000
Copy link
Author

Great!

@PhilipK
Copy link
Owner

PhilipK commented Jan 5, 2023

Alright, import only installed setting is implemented now
#313

@PhilipK
Copy link
Owner

PhilipK commented Jan 5, 2023

And now portable version as well:
#314

@PhilipK
Copy link
Owner

PhilipK commented Jan 5, 2023

The newest version has support for Playnite
https://github.com/PhilipK/BoilR/releases/tag/v.1.7.19

@PhilipK PhilipK closed this as completed Jan 5, 2023
@NightHammer1000
Copy link
Author

NightHammer1000 commented Jan 5, 2023

Done a bit of testing on my around 600 Games Playnite Install.

It went through quite well.
But some games only show up as a Single Number.
I got one entry in the list simply named "Id"

And one big thing I found...
It imports Steam Games... Into Steam :P

@NightHammer1000
Copy link
Author

I can donate my db file it that would help.

@darklinkpower
Copy link

Hi, just a a recommendation, I would suggest if it's possible for you that it's not recommended to parse the database files directly and instead use the Playnite SDK to access the database. The reason is that you don't know when the database might change and break external software and this has already happened in the past when Playnite changed database formats, which will require re-implementing the parsing functionality to the new format.

It's also planned that Playnite will change its database format for the next major release in Playnite 11. If it's not possible then I'll suggest to keep an eye on Playnite releases to rework it.

@PhilipK
Copy link
Owner

PhilipK commented Jan 6, 2023

I did not know that there was an sdk!
That would be much better because yeah, parsing a databse is pretty flaky.
Do you have a link to information about the sdk?

@darklinkpower
Copy link

https://playnite.link/docs/master/tutorials/extensions/intro.html

https://playnite.link/docs/master/tutorials/extensions/library.html

Depending on what you need, perhaps a Powershell extension might be enough and recommended since it's easier to create and maintain. If you have questions or need any help feel free to join the Discord server and ask there

@NightHammer1000
Copy link
Author

Isnt the SDK only for Extensions inside of Playnite?
Not Ideal here because most of them break totaly when run inside Wine on Linux.

@darklinkpower
Copy link

Isnt the SDK only for Extensions inside of Playnite? Not Ideal here because most of them break totaly when run inside Wine on Linux.

Correct. I don't know the circumstances of this software, just wanted to give an advice because the current implementation will require reworking it from time to time to keep up with Playnite changes.

@cuesta4
Copy link

cuesta4 commented Nov 3, 2023

Hello! Great little extension you have here. I'd like to suggest an alternative method to import Playnite ROMs into Steam, so I can run the game through Playnite, and still have Steam Input. Maybe importing the play action as an executable .bat? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants