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

Auto-tagging based on library source #84

Closed
Kaylakaze opened this issue Jan 13, 2020 · 9 comments
Closed

Auto-tagging based on library source #84

Kaylakaze opened this issue Jan 13, 2020 · 9 comments
Labels
enhancement New feature or request gog-issue Issue caused, blocked by or related to GOG Galaxy or its API ideas Discussion about possible features

Comments

@Kaylakaze
Copy link

Right now, you can't really tell what is from Trove, DRM-Free, or a key. It'd be good if these could be tagged in some way (if tags themselves wouldn't work) so that they could be grouped or at least distinguished from each other.

@Kaylakaze Kaylakaze added the enhancement New feature or request label Jan 13, 2020
@Kaylakaze
Copy link
Author

Or, alternatively (and maybe better) could this be divided into separate integrations (one for keys, one for drm-free and Trove)?

@UncleGoogle
Copy link
Owner

Hey, I'm aware of this problem, refer to this issue: gogcom/galaxy-integrations-python-api#55

TLDR: they wrote that currently no plan for bookmark management from plugin side, but licenses will be supported in the future with custom names (in this case "Trove").

Tags could be OK-ish for keys, but tagging method has to be is triggered manually (each time) from settings window in Galaxy. So not very helpful. I cannot send auto-tagged games to Galaxy. But maybe it is better than nothing... what do you think?

@UncleGoogle UncleGoogle added the gog-issue Issue caused, blocked by or related to GOG Galaxy or its API label Jan 13, 2020
@Kaylakaze
Copy link
Author

Kaylakaze commented Jan 13, 2020

Actually, I think my updated idea about it being two separate integrations (if GOG would allow it) would be the optimal process since the DRM-free and Trove content is handled VERY differently than the key content. Plus it'd allow separate icons for each.

The license solution does sound good depending on how long it takes the GOG team to implement, especially since it'd be so useful for other stuff (like Origin as mentioned in the thread).

@UncleGoogle
Copy link
Owner

UncleGoogle commented Jan 13, 2020

DRM-free and Trove content is handled VERY differently than the key content

True. Initial plan was to show only DRM-free. And that the best fit to Galaxy philosophy (there are no pure-key stores ID in platforms ID list for possible integrations).

Then people wanted keys as an option - because it is handy. Technically is also very near - it's the same API call - in one order there are both keys and links to drm downloads. And login is common the same for trove. It is more handy to log in only once and it is easier to support one codebase.

Multiple integrations for the same platform are not supported in Galaxy. This closes the possibility of creating parallel integration.

@UncleGoogle UncleGoogle added the ideas Discussion about possible features label Jan 13, 2020
@Kaylakaze
Copy link
Author

And login is common the same for trove. It is more handy to log in only once and it is easier to support one codebase.

That's true, and the obvious major point of inefficiency. I do very much like the key functionality. Your code would give me a good place to start on making something that could, at the very least, create a Google Sheet of unused keys and URLs for getting them, if I can figure out the code (I've always hated Python and am not exceptionally well-versed in it). Being able to compare them with all your other libraries though is a nice unique functionality provided by Galaxy.

I just took a look at the integration Github and am completely flabbergasted by the lack of insight and forward-thinking of the GOG team. I can't even begin to fathom how they thought it was a good idea to predefine possible platforms.

@Kaylakaze
Copy link
Author

Kaylakaze commented Jan 14, 2020

After some experimentation, I found that you CAN have more than one plugin to the same integration (it's just that a single plugin can't do more than one integration). I currently have 2 copies of your Humble Bundle plugin running: one that pulls Keys and one that pulls Trove.

Unfortunately, this doesn't help too much since they still have the same icon and bookmark. But the data is being stored in separate databases.

Update: I took my "keys" plugin and changed the manifest to "totalwar" and the init to Platform.TotalWar and it loaded my Humble Bundle keys to the "Total War" bookmark and gave them a circular icon with lots of spacing. The Install button doesn't work, probably a result of the "features" for Total War integration not showing "Install Games" as an option when connecting. I'm not sure where those features are coming from.

@UncleGoogle
Copy link
Owner

UncleGoogle commented Feb 8, 2020

Hey. Sorry for late response.

Your code would give me a good place to start on making something that could, at the very least, create a Google Sheet of unused keys and URLs for getting them, if I can figure out the code (I've always hated Python and am not exceptionally well-versed in it).

Just replace _get_keys method in library.py file with sth like that, change CSV_NAME and restart Galaxy (keys should be included in config file; it can be open with double click on Install button of any game) :

    @staticmethod
    def _get_keys(orders: list, show_revealed_keys: bool) -> List[Key]:
        keys = []
        for details in orders:
            for tpks in details['tpkd_dict']['all_tpks']:
                try:
                    key = Key(tpks)
                except Exception as e:
                    logging.error(f"Error while parsing tpks {repr(e)}: {tpks}", extra={'tpks': tpks})
                else:
                    keys.append(key)

        CSV_NAME = 'C:\Users\me\Desktop\humble_keys.csv'
        with open(CSV_NAME, 'w') as f:
            for key in keys:
                print(key.human_name, key.key_val or 'not revealed', sep='\t', file=f)

        return keys

Unfortunately there is not separate link to activation, all it must be done manually in https://www.humblebundle.com/home/keys

After some experimentation, I found that you CAN have more than one plugin to the same integration (it's just that a single plugin can't do more than one integration).

Nice, how did you do that? Can you add a comment there: #30 ?

Update: I took my "keys" plugin and changed the manifest to "totalwar" (...)

Ah I see. Probably they store some information on backend. Maybe hardcode. Maybe such multiple games coming from totalwar are suspicious 😀

@UncleGoogle
Copy link
Owner

UncleGoogle commented Feb 8, 2020

I've added manual tags import. It will be released on 7.0 hopefully next week.

@UncleGoogle
Copy link
Owner

Released. Closing, as can't do more now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gog-issue Issue caused, blocked by or related to GOG Galaxy or its API ideas Discussion about possible features
Projects
None yet
Development

No branches or pull requests

2 participants