Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Games are not showing up #125

Closed
HommeCrabe opened this issue Jul 6, 2020 · 6 comments
Closed

Games are not showing up #125

HommeCrabe opened this issue Jul 6, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@HommeCrabe
Copy link

HommeCrabe commented Jul 6, 2020

Describe the bug
After adding the plugin through Settings > Integrations, I log in my Humble Bundle account which contains hundreds of DRM-free games. The config window shows up. I check "drm-free". After that, nothing happens and zero games are added to my library.
Also, I don't have a "trove" option in the config window, though I'm subscribed, only "drm-free" and "keys". Version displayed in changelog is 0.8.

Expected behavior
All my games should be listed.

Plugin installed
Directly from Galaxy.

Provide logs
plugin-humble-f0ca3d80-a432-4d35-a9e3-60f27161ac3a.log
I've hidden my order keys, there were a lot. There is one error in the log :
galaxy.api.jsonrpc - ERROR - Unexpected exception raised in plugin handler
ValueError: 'other' is not a valid HP

Thank you for your help!

@HommeCrabe HommeCrabe added the bug Something isn't working label Jul 6, 2020
@cyotek
Copy link

cyotek commented Jul 10, 2020

I ha(ve|d) the same issue. After looking at the stack trace from my own log and backtracking, I edited %LOCALAPPDATA%\GOG.com\Galaxy\plugins\installed\humble_f0ca3d80-a432-4d35-a9e3-60f27161ac3a\model\types.py and modified the HP enumeration to add an extra item (I added OTHER = 'other' to line 17 after the VIVE entry.)

class HP(enum.Enum):
    WINDOWS = 'windows'
    MAC = 'mac'
    LINUX = 'linux'
    ANDROID = 'android'
    AUDIO = 'audio'
    EBOOK = 'ebook'
    ASMJS = 'asmjs'
    UNITYWASM = 'unitywasm'
    VIDEO = 'video'
    COMEDY = 'comedy'
    OCULUS = 'oculus-rift'
    VIVE = 'vive'
    OTHER = 'other' # <- manually added

    def __eq__(self, other):
        if type(other) == str:
            return self.value == other
        return super().__eq__(other)

    def __hash__(self):
        return hash(self.value)

On restarting Galaxy it woke up and started populating my HB purchases. I still can't see subscriptions, but at least the games have come back.

Not hugely familiar with Python so I don't know if this is the appropriate fix (hence no PR) but this does seem to have worked, or at least partially given I still can't see subs.

Hope this helps anyone else with the same issue!

Edit: No idea why but I noted today after booting up and running Galaxy, the HB importer popped up again and I can now see subscriptions as well. I'm happy to make a PR if this is the only thing that needs changing but I have no idea about Python testing so probably wouldn't be able to do a decent test case.

@UncleGoogle
Copy link
Owner

Hi, thanks for report guys. @cyotek you're solution is right.
I've also added default type in case another platform type will appear in humble API.

I wonder which game has platform "other". You can check in there is such filer in humblebundle.com/home/library

@UncleGoogle
Copy link
Owner

UncleGoogle commented Jul 11, 2020

Edit: No idea why but I noted today after booting up and running Galaxy, the HB importer popped up again and I can now see subscriptions as well.

Subscription games are in different interface, it is up to Galaxy to request them from plugin. Maybe they were blocked by previous error in user owned games, and then a Galaxy restart was required?

I'm happy to make a PR if this is the only thing that needs changing but I have no idea about Python testing so probably wouldn't be able to do a decent test case.

Next time you're welcome I will be glad to help you with tests, Python is easy:)
I've not added tests for this simple change as I need to do bigger refactor anyway, see #107 for now API model is somehow mixed with other modules, ugly things.

@HommeCrabe

Also, I don't have a "trove" option in the config window

Trove games are no longer configurable via plugin settings. They should appear if you're subscriber (and if not, you can still show then via Galaxy Settings - Feature.

@HommeCrabe
Copy link
Author

Thank you @cyotek, it's working! I'm missing some games but it seems that it's a GOG database issue.
The "other" platform games are not even games: "Hamble Coloring Pages" and "Hamble Wallpaper Pack" from HIB 21.

@cyotek
Copy link

cyotek commented Jul 11, 2020

I checked my library as well, and in addition to the two items @HommeCrabe mentioned, I also have a number of audio resources from the Big Music Bundle in May. Not Sure why for those at least they didn't use the existing audio category 🤷

@UncleGoogle
Copy link
Owner

I've got tempted to create somehow strict model for humble API, but this is another time returned values cannot be trusted. Another problem is that some games keys not contain human_name - I've reported that to humble support and they fixed one of them, but there is more.

Anyway, I'll release 8.1 probably this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants