-
Notifications
You must be signed in to change notification settings - Fork 75
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
Feature: add HQ card image source #186
base: master
Are you sure you want to change the base?
Conversation
gframe/data_handler.cpp
Outdated
if (configs->toggle_hd_card_pics) { | ||
#ifdef DEFAULT_HD_PIC_URL | ||
imageDownloader->AddDownloadResource({ DEFAULT_HD_PIC_URL, ImageDownloader::ART }); | ||
#else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#elseif is a thing, also, this isn't a proper approach, it should be implemented by adding a new field to the json file, then teh client will choose the sources that have that field set/unset depending on the user setting. with this, the user will be stuck with only the hardcoded hq sources and also this change will only apply oncve the game is restarted, not at runtime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are both details I had considered while making this.
- New field on JSON file: Is it really something we have to implement? Having a new field for solely the distinction of HD sources of card art (which would be specific to card art and not field or cover which doesn't make sense) a sensible thing to add?
- Image sources currently cannot have runtime distinction as the program always uses the first source it finds which matches the image type regardless. A new field would allow to select it at runtime but for this use case it would need to hard check if it's both 'card art' and 'hd' if there exists an hd source and prioritize that one
- I did some testing and it seemed like card art downloads would not 'reset' if you already downloaded a picture but then deleted it afterwards, but I'll check it again. If so, then it would be pointless to change sources at runtimd because already downloaded card images would leave the image stuck as blank
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of the json itself is to be able to add new fields more easily, and the client aims into customizability, so yes, a new field is needed, because in that way you could make your custom packs and provide proper image sources as well, that's the primary goal of all this customizability.
For the runtime behaviour, it would really be a matter of just checking if the setting is toggled, and switch to the hq sources accordingly, handling previously downloaded images shouldn't be our problem.
For the "reset", do you mean when a pic is downloaded, then it won't be downloaded again if missing? That's still intended behaviour, the client shouldn't download a pic indefinitely if it's for example deleted by the antivirus, that would only waste resources, and if it weirdly disappeared, then it would be a bigger issue than the handling in the client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior you just mentioned has been implemented in the commits below, thanks for the feedback.
b5a0e3f
to
8ebbe1f
Compare
da29766
to
a4d64fe
Compare
c792ea4
to
0ed7d71
Compare
bda58a3
to
bb89d0f
Compare
8f49f56
to
9904d4d
Compare
1a62005
to
ef39fc3
Compare
Toggleable option to download from alternative source for HD card images
Closes #174