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

Set "lastplaytime" to playnites last reported playtime #9

Open
Bluscream opened this issue May 15, 2020 · 2 comments
Open

Set "lastplaytime" to playnites last reported playtime #9

Bluscream opened this issue May 15, 2020 · 2 comments

Comments

@Bluscream
Copy link

@bburky
Copy link
Owner

bburky commented May 15, 2020

This is possible I think, shortcuts.vdf supports it. But what happens after the initial import? If you play a game from steam, does it update the value inside shortcuts.vdf with the added playtime?

Or are you okay with this becoming very out of sync until the user regenerates the shortcuts? (It's theoretically possible to hook the on_game_stopped Playnite event and detect the changed playtime. But you can't really update shortcuts.vdf in the background I don't think. If the user is currently modifying their shortcuts in the Steam UI, we don't want to clobber changes, and Steam only reloads shortcuts.vdf on launch. This extension doesn't do updates in the background.)

@Bluscream
Copy link
Author

Bluscream commented May 15, 2020

How hard are you regenerating the shortcuts.vdf file?
If you can read the value for each game in there before overwriting it should be as easy as if (vdf.shortcut[current].lastplaytime == 0) overwriteWithPlayNiteLastPlayTime() so after handing once to steam it takes care of it since it will see all playtime of the internal shortcut anyway ^^

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

No branches or pull requests

2 participants