UncleGoogle / galaxy-integration-humblebundle

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

Disable Install button for Humble library games that cannot be installed (os compatibility for keys) #82

Closed branflaker closed 4 years ago

branflaker commented 4 years ago

Describe the bug Own a console-only game in your Humble Bundle library. It cannot be downloaded or installed from Humble Bundle. It only has a key. Sync your Humble Bundle library with GOG Galaxy 2.0 using the plugin. The Install button is enabled for all synced games, including those that cannot be downloaded, like the console-only games.

Expected behavior The Install button should be disabled, as when dealing with games that cannot be installed.

Plugin installed manually from your repository releases

Provide logs This log shows the output of trying to install a game that cannot be installed. In this case, it's Okami HD for PS3. plugin-humble-f0ca3d80-a432-4d35-a9e3-60f27161ac3a.zip

UncleGoogle commented 4 years ago

Thanks for report!

os_compatibility is already implemented but from your logs I see that the real problem is here #62

Actual proper behavior should be displaying minimal GUI with information about the key.

Can you restart Galaxy and try again? (answer in #62 please, I'm closing this)

branflaker commented 4 years ago

Even after restarting, I still have the Install button enabled.

The example I used, Okami HD, is filtered as a Windows compatible game.

UncleGoogle commented 4 years ago

I read your report once again and see that you're using v5.0 and there are some errors in the log file that should be fixed in newer version. FriendsOfGalaxy version (that is available via Galaxy install) is autoupdating so may be better solution.

Expected behavior The Install button should be disabled, as when dealing with games that cannot be installed.

I'm not sure about this in general. because this plugin treats all keys as special type - so in current implementation clicking "Install" should display the key like that: ac1846a3176ca949d06c2292b2d36b73

So there are two solutions:

  1. keys should be always OS agnostic (in the future it may open steam probably or other funny things from this little gui?)
  2. keys should be treated as the rest of games and shows "Install" available when a game is available on current system

Currently plugin sends always "None" as an answer to get_os_compatibility for keys. https://github.com/UncleGoogle/galaxy-integration-humblebundle/blob/3cd5db5548075a781250a80e47f57a9284895e57/src/plugin.py#L199

API:

OSCompatibility flags indicating compatible OSs, or None if compatibility is not known

I didn't check what will happen for returning OSCompatibility(0)

So probably Galaxy fallbacks to their gamesdb that fetches from idgb as far as I know - and apparently your game is available there (in general) for Windows: https://www.igdb.com/games/okami-hd

I would rather go to solution 1, than 2, as current functionality of "keys" has other meaning for "Install" button that is OS agnostic.

What do you think?

UncleGoogle commented 4 years ago

So, @branflaker how do you think? 1, 2 or do nothing (leaving decision to Galaxy/igdb)? If OsCompatibility serves only to disable/enable Install button I would do 1 (enable for all keys) just for consistency & to be able to show small GUI with additional information (the proper name, key for which provider and if it is revealed or not). But as it also serves for filtering games in Galaxy UI, I'm not so sure.

branflaker commented 4 years ago

This is a generally special case for Humble Bundle integration, since it provides game downloads while also being a storefront for other stores (it's not always Steam). Handling it yourself using a popup seems like the ideal option (option 1).

We likely shouldn't expect Galaxy to be able to handle keys, that seems out of scope of the application.

Additionally, not all keys are for Steam, so opening up in Steam may not be the right choice 100% of the time.

Lastly, what do you think of not returning keys that have already been redeemed? This may be a good idea for a separate GitHub issue.

UncleGoogle commented 4 years ago

Handling it yourself using a popup seems like the ideal option (option 1).

I'll do that.

We likely shouldn't expect Galaxy to be able to handle keys, that seems out of scope of the application.

I wish we have support for keys at some point. humble is not special here, there are plenty key resellers, some of them are already in API list of PLATFORM_IDS, like gg, playfire.

Additionally, not all keys are for Steam, so opening up in Steam may not be the right choice 100% of the time.

The key info from humble bundle API contain information about key type. I'm displaying this info, it is not hardcoded.

Lastly, what do you think of not returning keys that have already been redeemed? This may be a good idea for a separate GitHub issue.

This is quite old feature ;) #6 Open config to select proper checkbox.