FriendsOfGalaxy / galaxy-integration-uplay

uplay integration with g2.0
MIT License
116 stars 20 forks source link

Playtime for Trackmania is twice the time shown in UPlay #27

Open foxi opened 3 years ago

foxi commented 3 years ago

As shown in the attached Screenshot, UPlay tracks the playtime for Trackmania as a) Total b) Split times for various game modes

It appears that all of those are added together for the playtime shown in galaxy, counting the "total" twice.

gog_galaxy_uplay_playtime_bug

FriendsOfGalaxy commented 3 years ago

@foxi thank you for reporting that!

Is it possible that you have this game owned in also another plugin?

foxi commented 3 years ago

For reference, the statscards JSON looks like:

TotalPlaytime value matches expected total time in game.

TotalPlaytime is a bit higher than the sum of the individuals, I guess that's just the time in main menus outside any tracked game mode.

2021-06-01 00:00:24,690 - root - INFO - RESPONSE: {'Statscards': [
{'statName': 'AuthorMedalCount', 'displayName': 'Total author medal count', 'locale': 'en-US', 'value': '196', 'obj': '196', 'ordinal': 10, 'format': 'Integer', 'unit': '', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T00:28:00.156Z', 'endDate': None, 'lastModified': '2021-05-31T21:28:52.971Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}, 
{'statName': 'BronzeMedalCount', 'displayName': 'Total bronze medal count', 'locale': 'en-US', 'value': '775', 'obj': '775', 'ordinal': 7, 'format': 'Integer', 'unit': '', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T00:27:00.124Z', 'endDate': None, 'lastModified': '2021-05-31T21:27:04.754Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}, 
{'statName': 'ClubPlaytime', 'displayName': 'Total play time in Club', 'locale': 'en-US', 'value': '146203', 'obj': '146203', 'ordinal': 3, 'format': 'LongTimespan', 'unit': 'Seconds', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T00:23:00.131Z', 'endDate': None, 'lastModified': '2021-05-30T13:19:26.788Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}, 
{'statName': 'CreatePlaytime', 'displayName': 'Total play time in Create', 'locale': 'en-US', 'value': '145648', 'obj': '145648', 'ordinal': 5, 'format': 'LongTimespan', 'unit': 'Seconds', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T00:25:00.685Z', 'endDate': None, 'lastModified': '2021-05-24T17:18:13.616Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}, 
{'statName': 'GoldMedalCount', 'displayName': 'Total gold medal count', 'locale': 'en-US', 'value': '528', 'obj': '528', 'ordinal': 9, 'format': 'Integer', 'unit': '', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T00:30:00.562Z', 'endDate': None, 'lastModified': '2021-05-31T21:28:52.971Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}, 
{'statName': 'LivePlaytime', 'displayName': 'Total play time in Live', 'locale': 'en-US', 'value': '1498309', 'obj': '1498309', 'ordinal': 2, 'format': 'LongTimespan', 'unit': 'Seconds', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T00:19:00.358Z', 'endDate': None, 'lastModified': '2021-05-31T22:00:01.376Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}, 
{'statName': 'LocalPlaytime', 'displayName': 'Total play time in Local', 'locale': 'en-US', 'value': '2875', 'obj': '2875', 'ordinal': 4, 'format': 'LongTimespan', 'unit': 'Seconds', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T00:24:00.522Z', 'endDate': None, 'lastModified': '2020-10-29T19:44:50.242Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}, 
{'statName': 'MapCreatedCount', 'displayName': 'Total created map count', 'locale': 'en-US', 'value': '6', 'obj': '', 'ordinal': 11, 'format': 'Integer', 'unit': '', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T23:10:00.921Z', 'endDate': None, 'lastModified': '2020-10-06T17:47:44.589Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}, 
{'statName': 'SilverMedalCount', 'displayName': 'Total silver medal count', 'locale': 'en-US', 'value': '687', 'obj': '687', 'ordinal': 8, 'format': 'Integer', 'unit': '', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T00:31:00.550Z', 'endDate': None, 'lastModified': '2021-05-31T21:27:04.754Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}, 
{'statName': 'SoloPlaytime', 'displayName': 'Total play time in Solo', 'locale': 'en-US', 'value': '489734', 'obj': '489734', 'ordinal': 1, 'format': 'LongTimespan', 'unit': 'Seconds', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T00:17:00.489Z', 'endDate': None, 'lastModified': '2021-05-31T18:44:35.555Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}, 
{'statName': 'TotalMedalCount', 'displayName': 'Total medal count', 'locale': 'en-US', 'value': '2186', 'obj': '2186', 'ordinal': 6, 'format': 'Integer', 'unit': '', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T00:26:00.175Z', 'endDate': None, 'lastModified': '2021-05-31T21:28:52.971Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}, 
{'statName': 'TotalPlaytime', 'displayName': 'Total play time', 'locale': 'en-US', 'value': '2290493', 'obj': '2290493', 'ordinal': 0, 'format': 'LongTimespan', 'unit': 'Seconds', 'semantic': 'Best', 'sort': 'Descending', 'startDate': '2020-06-27T00:13:00.766Z', 'endDate': None, 'lastModified': '2021-05-31T22:00:01.376Z', 'periodDuration': None, 'periodLength': None, 'periodLifespan': None, 'pastPeriods': None}]}

## sum of *Playtime except TotalPlaytime: 146203 + 145648 + 528 + 1498309 + 2875 + 489734 = 2283297
## TotalPlaytime 2290493 s = 38174.8 min

2021-06-01 00:00:24,692 - root - INFO - Stats for Trackmania: playtime: 76221, last_played: 1622498401
foxi commented 3 years ago

To answer your question. Galaxy is only showing it for UPlay, but in the Tooltip overlay there is an empty second UPlay entry. Trackmania itself is only available on UPlay and Epic, I have never installed it via Epic and Epic isn't showing it for me.

The game however is free-to-play for the base version with an additional subscription service for "Club" features. Maybe that's creating an issue?

For comparison there I attached another screenshot for "Trackmania Turbo", which I have listed in Galaxy under Uplay and Steam.

galaxy_trackmania_played_uplayonly galaxy_trackmania_turbo_played_uplay_and_steam

FriendsOfGalaxy commented 3 years ago

Ok, I found where is the problem, we've just sum all of them instead of taking "total play time". Fix should be released soon.

FriendsOfGalaxy commented 3 years ago

@foxi the fix was released. Do you confirm the problem no longer occurs?

StillGreen-san commented 3 years ago

Total playtime reports correctly for me now.

But it did not fix itself, I had to reconnect the integration.

I also noticed that my total playtime (~74h) has now appeared spread over the past 4 days: 2021-08-16_16-23-30_GalaxyClient Maybe thats todo with it not reporting any playtime at all before. (not sure when that started)