• Sign in to comment and vote. Sign in by email
  • Tuesday J W suggested this task

  • Wednesday Josh Sharp approved this task

  • avatar

    I’m having trouble finding it in the docs, so J W, maybe you can tell me — is there anything exposed for tracking time in games? I’m open to writing a plugin, but can’t see exactly where we’d get the data we need.

    Wednesday
  • avatar

    You can create a plugin with an OnGameStopped event which returns the number of seconds spent in a game. This can then be converted into minutes and posted to the API. I’m probably going to write a few extensions myself for other functions, so I can do this myself if you like, or I can let you handle it if you prefer. https://api.playnite.link/docs/api/Playnite.SDK.Events.OnGameStoppedEventArgs.html#Playnite_SDK_Events_OnGameStoppedEventArgs_ElapsedSeconds

    Thursday
  • avatar

    Thanks! If you’re doing it already, I won’t say no :) This would have to be a separate plugin using our API via OAuth2 anyway, so shouldn’t matter if it’s third- or first-party, I’d have to write it the same way and don’t have any specific benefit.

    Appreciate it!

    Thursday
  • Friday