UncleGoogle / galaxy-integration-humblebundle

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

The plugin shows trove games even though I am not a monthly subscriber #14

Closed Itay080 closed 5 years ago

Itay080 commented 5 years ago

Describe the bug The plugin shows trove games even though I am not a monthly subscriber

Expected behavior Only show trove games if the user is a monthly subscriber

Screenshots Irrelevant

Attach logs plugin-humble-f0ca3d80-a432-4d35-a9e3-60f27161ac3a.zip

UncleGoogle commented 5 years ago

Thanks for report. I need more info though:

  1. Have you ever been HB subscriber?
  2. What will happen when you try to download a trove game?
  3. What you get when going to subscriber page? Follow below steps:
    • go to humblebundle.com and log in
    • open devtools (ctrl+shift+I), navigate to "Network" submenu in devtools
    • in the same browser tab go to https://www.humblebundle.com/monthly/subscriber
    • what is the Status and result of "subscriber" item? Look at mine result below (302):

Screenshot from Gyazo

Itay080 commented 5 years ago

Thanks for the reply :)

  1. I have been a HB subscriber multiple times in the past, but not right now.
  2. Nothing, the browser won't even open
  3. This is what I get (Status 200) image
UncleGoogle commented 5 years ago

Ok, so looks like I made false assumption when coding this. Will search for better method to verify subscriber than dummy redirection ;)

Itay080 commented 5 years ago

Thank you :)

Lahiri commented 5 years ago

Would it be possible to have the Trove as a separate plugin? I have duplicates of many games in my HB library because (I think) one copy is the drm-free version I bought in bundles and one copy is from the Trove. I am not even a subscriber btw. Since it's in fact a separate library it would be nice to have it as a different platform.

For some games I even have 3 copies, I'm not sure why, maybe because I have "multiple copies" if the game was in multiple bundles. Would it be possible to merge duplicates? The download link could be any of the of n available since they al download the same package.

UncleGoogle commented 5 years ago

@Lahiri I'm aware of the duplicates issue between trove and rest of items. I've planned to deduplicate them with priority to non-trove games, as access to them is not related to subscription. What do you think?

Currently it is not possible to make separate plugin for trove as there is no such id in the API list https://galaxy-integrations-python-api.readthedocs.io/en/latest/overview.html And im not sure if it is convenient as the login is exactly the same. On the other hand information about game source is important and another plugin will be the only way to do it in current Galaxy implementation. I don't know...

You have raised another issue about deduplication between different bundles/single store purchases /widget (direct purchases from developer) games. It is doable if the games IDs has the same beggining or dowbload links are the same. Please, open another issue for this.

Lahiri commented 5 years ago

@Lahiri I'm aware of the duplicates issue between trove and rest of items. I've planned to deduplicate them with priority to non-trove games, as access to them is not related to subscription. What do you think?

Definitely, non-trove games are a more reliable source.

nduriez commented 5 years ago

@UncleGoogle What about releasing 2 script and let the users download the one they need ?

1 script for non trove subscriber and 1for Trove Subscriber ?

It isn't a perfect solution obviously because users would have to delete the one extension to install the others if they decide to subscribe or unsubscribe, but until you find a better solution i think it could do the trick.

UncleGoogle commented 5 years ago

@JigAma I will just detect if the user has active subscription. I can even scrap html to check for subscriber icon or sth like that - but on first place I will try to do it without web scrapping.

@Lahiri I need your log file to fix your 3 games duplication issue. You can create an issue or send me an email.

You have raised another issue about deduplication between different bundles/single store purchases /widget (direct purchases from developer) games. It is doable if the games IDs has the same beggining or dowbload links are the same. Please, open another issue for this.

Lahiri commented 5 years ago

@UncleGoogle I can't find where the log is saved, can you point me in the right direction? Thanks

Itay080 commented 5 years ago

@Lahiri You need all plugin-humble-f0ca3d80-a432-4d35-a9e3-60f27161ac3a files located at: %programdata%\GOG.com\Galaxy\logs

Lahiri commented 5 years ago

@Itay080 @UncleGoogle I created an issue with logs and screenshots here: https://github.com/UncleGoogle/galaxy-integration-humblebundle/issues/19

UncleGoogle commented 5 years ago

Thanks Lahiri, I will do it soon.

I've dig into current issue today and here is what I've decided:

The default I've chosen is because if someone has installed Trove games, and then his/shes subscription has expired, the plugin shouldn't remove it from library. It is DMR free - that means you should be able to play it at any point of time, not only when subscribed. The second reason is console plugins (PSN/XBOX) still shows all games even if they are not installable. The last, but not least is although HumbleBundle has no social features, I think Galaxy guys will eventually add gametime tracking for plugins like HumbleBundle just because they can do it by checking if you click "play". In this case keeping Trove games will save your gaming history.

It's not totally ready but if you have a time, please test it now:

20

zip: humblebundle_0.4b.zip

After first Galaxy run, the config.toml file will be created in the plugin directory (installed). Just change the show_trove_games to false. (the other option for revealed keys does now work yet). Galaxy restart shouldn't be required.

EDIT: fixed crash

Lahiri commented 5 years ago

@UncleGoogle I just tested it and it seems to work as expected. I had to disconnect and then reconnect the integration for it to properly remove Trove games from the library. Before that it was not removing all of them, just a part or no one (I tried enabling/disabling a few times). Maybe if I was more patient it would have fixed it by itself (I assume there is some caching involved?). After the reconnection enabling/disabling Trove seems to work flawlessly, so I only had to do it after switching to the new version of the integration. I have used Cog -> Refresh Integrations after each change.

Good work!

Itay080 commented 5 years ago

@UncleGoogle It works flawlessly, thank you very much! :) I think this issue can be closed now but I'll leave it up to you, maybe you want to wait until you fully release version 0.4

UncleGoogle commented 5 years ago

@Itay080 yes, I'll provide more features before 0.4 release.

@Lahiri "refresh integrations" is not needed (in fact it blocks the actual changes). All you need should be: change the config and save it. When modification time of the config file is changing it is checked for differences. Anyway it need some love before release (caching to make it faster), thanks for checking!

UncleGoogle commented 5 years ago

FYI 0.4.0 released. Config file format has changed, so in case of any problems, please disconnect plugin

Itay080 commented 5 years ago

0.4.0 works great, thank you for your work @UncleGoogle ! :)

UncleGoogle commented 5 years ago

You're welcome :)