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

Add category to games imported #7

Open
juanma-cvega opened this issue May 9, 2020 · 8 comments
Open

Add category to games imported #7

juanma-cvega opened this issue May 9, 2020 · 8 comments

Comments

@juanma-cvega
Copy link

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.

@bburky
Copy link
Owner

bburky commented May 11, 2020

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.

@juanma-cvega
Copy link
Author

juanma-cvega commented May 12, 2020

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.

@Bluscream
Copy link

Bluscream commented May 15, 2020

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..)

@Bluscream
Copy link

Bluscream commented May 15, 2020

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.

@bburky
Copy link
Owner

bburky commented May 16, 2020

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.

@Bluscream
Copy link

Bluscream commented May 16, 2020

Can you try what happens if you set the tags and have the collection created in Steam beforehand?

@bburky
Copy link
Owner

bburky commented May 16, 2020

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.

@Bluscream
Copy link

damnit :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants