Join us on the Linux Gaming community on Lemmy, the federated open source alternative to Reddit.
Anyone know how to keep the Lutris game playtime tracking after installing the game on another machine?
I have a drmfree windows game running on Linux via Lutris.
I want to install that drmfree Lutris game on another machine, keeping the playtime already tracked in the first machine.

Anyone know how to do that?
This topic has an answer marked - jump to answer.
tuubi 3 May
Quoting: Comandante ÑoñardoI have a drmfree windows game running on Linux via Lutris.
I want to install that drmfree Lutris game on another machine, keeping the playtime already tracked in the first machine.

Anyone know how to do that?
Apparently lutris stores its data in an sqlite database in "~/.local/share/lutris/pga.db". Just install the game on the other machine and then edit the game's entry in the "games" table of this database (with sqlitebrowser). Hours played is stored as a decimal value in the "playtime" field.

If you need further instructions on how to do that, just ask.
Thanks!
And How to translate hours, minutes, seconds, day, month, year to decimal (and vice versa)
tuubi 3 May
Quoting: Comandante ÑoñardoThanks!
And How to translate hours, minutes, seconds, day, month, year to decimal (and vice versa)
I meant that the "hours played" value seems to be straight up hours as a decimal number, and you'll have to convert the minutes and seconds to hours in the usual way. For example 30 minutes = 30/60 = 0.5 hours. And 45 seconds = 45/60/60 = 0.0125 hours. This means a playtime of 15 hours 30 minutes and 45 seconds is 15 + 0.5 + 0.0125 = 15.5125 (hours) in the database.

Obviously the easiest way to carry over the exact amount you had before is to simply check the value in the old database and copy it over. No need to convert anything.
And for curiosity, how to convert date, month, year to decimal.?

For example, the Lutris game say:
Installed at

02:23:49 22/05/20

and the database entry value say 1590125029

I like to be able to manipulate that.
dpanter 3 May
I believe that number is the amount of seconds since UNIX Epoch time, 00:00:00 UTC on 1 January 1970

Find a time calculator online. ;)

Last edited by dpanter on 3 May 2021 at 6:51 pm UTC
tuubi 3 May
Hey, I thought we were Linux nerds!
 
$ date -d '2020-05-22 02:23:49 -03:00' +%s
1590125029


I had to guess your timezone to get the correct result, so keep that in mind.

But online converters will do the job just fine.
Thanks for your help, people!
While you're here, please consider supporting GamingOnLinux on:

Patreon, Liberapay or PayPal Donation.

We have no adverts, no paywalls, no timed exclusive articles. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register

Or login with...
Sign in with Steam Sign in with Twitter Sign in with Google
Social logins require cookies to stay logged in.