Skip to content

Conversation

@KingYamato
Copy link

@KingYamato KingYamato commented May 31, 2020

Toggleable option to download from alternative source for HD card images

image

Closes #174

@kevinlul kevinlul self-assigned this May 31, 2020
@kevinlul kevinlul changed the title Feat/add hq picture option Feature: add hq card image source May 31, 2020
@kevinlul kevinlul changed the title Feature: add hq card image source Feature: add HQ card image source May 31, 2020
if (configs->toggle_hd_card_pics) {
#ifdef DEFAULT_HD_PIC_URL
imageDownloader->AddDownloadResource({ DEFAULT_HD_PIC_URL, ImageDownloader::ART });
#else
Copy link
Owner

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

Copy link
Author

@KingYamato KingYamato May 31, 2020

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.

  1. 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?
  2. 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
  3. 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

Copy link
Owner

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.

Copy link
Author

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.

@edo9300 edo9300 force-pushed the master branch 3 times, most recently from 8f49f56 to 9904d4d Compare June 1, 2023 20:16
@edo9300 edo9300 force-pushed the master branch 4 times, most recently from 1a62005 to ef39fc3 Compare June 4, 2023 11:28
@edo9300 edo9300 force-pushed the master branch 2 times, most recently from 96c64ac to 1ac735e Compare December 3, 2024 20:25
@edo9300 edo9300 force-pushed the master branch 2 times, most recently from 0bc55af to 0013228 Compare February 22, 2025 17:39
@enzodiaz25
Copy link

Will this ever be considered? It would honestly be such a great addition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toggle high/low-quality pic source

4 participants