playnite-non-steam-shortcuts
playnite-non-steam-shortcuts copied to clipboard
Add category to games imported
Hi, would it be possible to update the script so the imported games are added to a category? The same notion exists on Playnite so it could copy it over from it or simply use the platform as a category.
Are you wanting Playnite categories to become Steam collections? Or do you want all created shortcuts placed in the same Steam collection?
I think this might be possible, there is a tags
field in the entries of shortcuts.vdf
but I haven't tested it. I'm not sure if these tags
become Steam collections.
I think they are called categories now on Steam as well. And yes, that would be adding each game to a category that matches the one on Playnite so they can be filter by console. I know it's possible because there is an app called Steam Rom Manager that does that. It even scraps grid, logo and icon images from SteamGridDB and passes them onto Steam so games seem to be Steam ones. I don't know if on Playnite these grid images are scraped, I think I read something about it on Discord but if they are available, copying them as well would be an awesome feature.
I would love this feature as well, currently everything is just thrown into the big pile of "Uncategorized" games in Steam. So i would suggest either (or both with setting booleans at the top of the script) of those ideas:
- Add every game imported from playnite into a "Playnite" collection.
- Add every game to a collection that matches it's source ("Oculus", "itch.io", etc..)
Forwarding from @bburky on discord:
Hmm, the customizability is the hard part there. Currently this plugin has no UI at all. I may provide a few choices like "all in one Playnite category" and "map collections to playnite collections".
The logic I was thinking about was perhaps adding this here:
shortcut.tags = CATEGORY_MAPPING(game)
where
CATEGORY_MAPPING
is a user configured lambda:# Everything in a Playnite category: CATEGORY_MAPPING = lambda game: ["Playnite"] # Each game in one per-source category ("Playnite", "Epic", etc): CATEGORY_MAPPING = lambda game: [game.Source.Name] # Map all Playnite categories to Steam categories: CATEGORY_MAPPING = lambda game: [cat.Name for cat in game.categories]
I could provide a few sample mappings like that all commented out and allow the user to pick.
Oh no, as of the new Steam redesign you have to create categories in localconfig.vdf
, setting them in the tags
field of shortcuts.vdf
is not enough. Or at least that's what Steam Rom Manager does. Currently this extension only modifies shortcuts.vdf
.
I don't know that I'll actually implement categories in this extension then. I made a categories branch with my half finished implementation which sets tags
based on a CATEGORY_MAPPING
lambda function.
I'm going to leave this issue open, but I'm not sure I'll implement this. So far I have avoided localconfig.vdf
in this extension.
Can you try what happens if you set the tags and have the collection created in Steam beforehand?
Doesn't work, I tried. If you do add categories to a shortcut in Steam, it actually populates tags
. But it doesn't read that data as far as I can tell. You have to add everything to localconfig.vdf
.
You can try out the code in the categories branch, I think it does everything for populating tags
. Just doesn't work because I didn't know about localconfig.vdf
being needed.
damnit :/