UncleGoogle / galaxy-integration-humblebundle

Humble Bundle integration for GOG Galaxy 2.0
GNU General Public License v3.0
185 stars 19 forks source link

Owned Games Not Showing all Games Owned from Humble Choice #109

Closed phillipd-porch closed 4 years ago

phillipd-porch commented 4 years ago

Describe the bug I'm not seeing all of the games I own under "Owned" for Humble Choice subscriptions. I see them under subscriptions but not owned.

Expected behavior I would expect that at the very least games that I own (claimed, extras that are automatically included) would show up under owned. But it also makes sense to show all the possible choices here since I could claim any of them.

For example, in March I have claimed Planet Coaster. And there are three extras listed. One is a DLC but I'm still expecting to see the other one. And Planet Coaster. And the other unclaimed games. I only see One Step from Eden.

Plugin installed https://github.com/UncleGoogle/galaxy-integration-humblebundle/files/4625015/humblebundle.zip

Provide logs PhillipHumbleGogLogs2.zip

UncleGoogle commented 4 years ago

I log I can see:

2020-05-17 20:33:52,709 - galaxy.api.jsonrpc - INFO - Sending notification: method=subscription_games_import_success, params={'subscription_name': 'Humble Choice 2020-04', 'subscription_games': [SubscriptionGame(game_title='Opus Magnum', game_id='opusmagnum', start_time=None, end_time=None), SubscriptionGame(game_title='Driftland: The Magic Revival', game_id='driftland_themagicrevival', start_time=None, end_time=None), SubscriptionGame(game_title='GRIS', game_id='gris', start_time=None, end_time=None), SubscriptionGame(game_title="Raiden V: Director's Cut | 雷電 V Director's Cut | 雷電V:導演剪輯版", game_id='raiden5_directorscut', start_time=None, end_time=None), SubscriptionGame(game_title='This Is the Police 2', game_id='thisisthepolice2', start_time=None, end_time=None), SubscriptionGame(game_title='HITMAN 2', game_id='hitman2', start_time=None, end_time=None), SubscriptionGame(game_title="The Bard's Tale IV: Director's Cut", game_id='thebardstaleiv_directorscut', start_time=None, end_time=None), SubscriptionGame(game_title='MOLEK-SYNTEZ', game_id='molek_syntez', start_time=None, end_time=None), SubscriptionGame(game_title='Capitalism 2', game_id='capitalism2', start_time=None, end_time=None), SubscriptionGame(game_title='Truberbrook / Trüberbrook', game_id='truberbrook', start_time=None, end_time=None), SubscriptionGame(game_title='Turok 2: Seeds of Evil', game_id='turok2seedsofevil', start_time=None, end_time=None), SubscriptionGame(game_title='Shoppe Keep 2', game_id='shoppekeep2', start_time=None, end_time=None), SubscriptionGame(game_title='Divinoids', game_id='divinoids', start_time=None, end_time=None), SubscriptionGame(game_title='Ring of Pain Exclusive Sneak Peek', game_id='ringofpain_exclusivedemo', start_time=None, end_time=None), SubscriptionGame(game_title='Train Valley 2', game_id='trainvalley2_choice_steam', start_time=None, end_time=None), SubscriptionGame(game_title='Train Valley 2 - DRM-free build', game_id='trainvalley2_drm_freebuild_ObHto', start_time=None, end_time=None)]}
(...)
2020-05-17 20:33:53,104 - galaxy.api.jsonrpc - INFO - Sending notification: method=subscription_games_import_success, params={'subscription_name': 'Humble Choice 2020-05', 'subscription_games': [SubscriptionGame(game_title='Heave Ho', game_id='heaveho', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='XCOM® 2 + 2 DLC', game_id='xcom2', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='Niche - a genetics survival game', game_id='niche_ageneticssurvivalgame', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='Rise of Industry', game_id='riseofindustry', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='MO:Astray', game_id='mo_astray', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='Jurassic World Evolution + 1 DLC', game_id='jurassicworldevolution', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='NEOVERSE', game_id='neoverse', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title="The Swords of Ditto: Mormo's Curse", game_id='theswordsofditto', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='Horace', game_id='horace', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='Chess Ultra', game_id='chessultra', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='Warhammer 40,000: Gladius - Relics of War', game_id='warhammer40000_gladius_relicsofwar', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='WARSAW', game_id='warsaw', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='Rainy Season', game_id='rainyseason', start_time=1588377600.0, end_time=None), SubscriptionGame(game_title='Fae Tactics Sneak Peek', game_id='faetactics_sneakpeek', start_time=1588377600.0, end_time=None)]}
2020-05-17 20:33:53,104 - galaxy.api.jsonrpc - DEBUG - Sending 1482 bytes of data
2020-05-17 20:33:53,104 - galaxy.api.jsonrpc - INFO - Sending notification: method=subscription_games_partial_import_finished, params={'subscription_name': 'Humble Choice 2020-05'}
2020-05-17 20:33:53,104 - galaxy.api.jsonrpc - DEBUG - Sending 133 bytes of data
2020-05-17 20:33:53,121 - urllib3.connectionpool - DEBUG - https://sentry.io:443 "POST /api/1764525/store/ HTTP/1.1" 403 61
2020-05-17 20:33:53,155 - galaxy.api.jsonrpc - INFO - Sending notification: method=subscription_games_import_success, params={'subscription_name': 'Humble Choice 2020-01', 'subscription_games': [SubscriptionGame(game_title='GRIP + 1 DLC', game_id='grip', start_time=None, end_time=None), SubscriptionGame(game_title='Graveyard Keeper', game_id='graveyardkeeper', start_time=None, end_time=None), SubscriptionGame(game_title="Them's Fightin' Herds", game_id='themsfightinherds', start_time=None, end_time=None), SubscriptionGame(game_title='Bad North: Jotunn Edition', game_id='badnorth_jotunnedition', start_time=None, end_time=None), SubscriptionGame(game_title='Middle-earth™: Shadow of War™', game_id='middleearth_shadowofwar', start_time=None, end_time=None), SubscriptionGame(game_title='DiRT Rally 2.0 + 3 DLCs', game_id='dirtrally2', start_time=None, end_time=None), SubscriptionGame(game_title='Two Point Hospital', game_id='twopointhospital', start_time=None, end_time=None), SubscriptionGame(game_title='Street Fighter V', game_id='streetfighter5', start_time=None, end_time=None), SubscriptionGame(game_title='Whispers of a Machine', game_id='whispersofamachine', start_time=None, end_time=None), SubscriptionGame(game_title='Trailmakers', game_id='trailmakers', start_time=None, end_time=None), SubscriptionGame(game_title='Mages of Mystralia', game_id='magesofmystralia', start_time=None, end_time=None), SubscriptionGame(game_title='Unrailed!', game_id='unrailed', start_time=None, end_time=None), SubscriptionGame(game_title='Unparallel', game_id='unparallel', start_time=None, end_time=None), SubscriptionGame(game_title='Dirt Rally 2.0 - Porsche 911 RGT Rally Spec', game_id='dirtrally2_theporsche911rgt_choice_steam', start_time=None, end_time=None), SubscriptionGame(game_title='DiRT Rally 2.0 - Opel Manta 400', game_id='dirtrally2_theopelmanta400_choice_steam', start_time=None, end_time=None), SubscriptionGame(game_title='DiRT Rally 2.0 - H2 RWD Double Pack', game_id='dirtrally2_h2rwddoublepack_choice_steam', start_time=None, end_time=None)]}
2020-05-17 20:33:53,156 - galaxy.api.jsonrpc - DEBUG - Sending 1358 bytes of data
2020-05-17 20:33:53,156 - galaxy.api.jsonrpc - INFO - Sending notification: method=subscription_games_partial_import_finished, params={'subscription_name': 'Humble Choice 2020-01'}
2020-05-17 20:33:53,156 - galaxy.api.jsonrpc - DEBUG - Sending 133 bytes of data
2020-05-17 20:33:53,179 - urllib3.connectionpool - DEBUG - https://sentry.io:443 "POST /api/1764525/store/ HTTP/1.1" 403 61
2020-05-17 20:33:53,210 - galaxy.api.jsonrpc - INFO - Sending notification: method=subscription_games_import_success, params={'subscription_name': 'Humble Choice 2020-02', 'subscription_games': [SubscriptionGame(game_title='Warstone TD', game_id='warstonetd', start_time=None, end_time=None), SubscriptionGame(game_title='Eliza', game_id='eliza', start_time=None, end_time=None), SubscriptionGame(game_title='Underhero', game_id='underhero', start_time=None, end_time=None), SubscriptionGame(game_title='Pathfinder: Kingmaker Explorer Edition', game_id='pathfinder_kingmaker', start_time=None, end_time=None), SubscriptionGame(game_title='SHENZHEN I/O', game_id='shenzhen_io', start_time=None, end_time=None), SubscriptionGame(game_title='Okami HD', game_id='okami_hd', start_time=None, end_time=None), SubscriptionGame(game_title='Night Call', game_id='nightcall', start_time=None, end_time=None), SubscriptionGame(game_title='CryoFall', game_id='cryofall', start_time=None, end_time=None), SubscriptionGame(game_title='The Hex', game_id='thehex', start_time=None, end_time=None), SubscriptionGame(game_title='Book of Demons', game_id='bookofdemons', start_time=None, end_time=None), SubscriptionGame(game_title='Project Warlock', game_id='projectwarlock', start_time=None, end_time=None), SubscriptionGame(game_title='Frostpunk + 1 DLC', game_id='frostpunk', start_time=None, end_time=None), SubscriptionGame(game_title='Eliza', game_id='eliza_Go42u', start_time=None, end_time=None), SubscriptionGame(game_title='Tales From Off-Peak City Vol. 1', game_id='talesfromoffpeakcity_vol1', start_time=None, end_time=None), SubscriptionGame(game_title='Eliza', game_id='eliza_Go42u', start_time=None, end_time=None)]}

Looks like quite a few games are send. What do you see in Galaxy?

phillipd-porch commented 4 years ago

Under owned games, this is what I'm seeing: image

Planet Coaster does show up if I search for it under Steam but it's not associated with the bundle and there's only 1-2 showing up for each month.

UncleGoogle commented 4 years ago

Hmm, that strange, I've just unlocked Planet Coaster and it reproduced exactly the same way.

But you should be able to see all subscription games under "Subscriptions" tab, not under Humble Bundle. Or select filter "subscriptions" from under Humble Bundle

Selected picks should be returned as owned games "for free" - I do not need to handle anything separately. The problem is in old code, not the new feature for Choice support. A need to dig into this more.

UncleGoogle commented 4 years ago

Ok, I've found a problem. Plugin returned games from state before you have unlocked some games.

That was because I've assumed "order" content is not evolving in time (despite state of revealed keys) and put it in cache to not ask API all the time again. Now if I see that "order" comes from Humble Choice and "remaining_choices" are not 0, this order wan't be cached as can evolve in time.

Now I feel this cache was like premature optimization and became source of bugs.

Anyways will be released in 0.8 soon