swccgpc / swccg-card-json

JSON database for Star Wars CCG
MIT License
10 stars 11 forks source link

Card Image Urls #49

Closed scottrick closed 3 years ago

scottrick commented 3 years ago

While discussing #46, @DevoKun mentioned that the image url linked by @thomasmarlin was incorrect. This seems like a great opportunity to discuss card images, how they are updated, and their urls.

  1. Currently, the json references image urls which are all similar to "https://res.starwarsccg.org/cards/Images-HT/starwars/Premiere-Dark/large/darthvader.gif" and seem to work fine. "https://res.starwarsccg.org/cards/Premiere-Dark/large/darthvader.gif" also works. Which is correct?
  2. How are these images updated? When an errata occurs, how can we be sure that Scomp Link / Comlink are pulling the latest image?
  3. Is raw=true needed in the urls? Seems to work fine without it?
  4. What about legacy images? Obviously this is a pretty low priority, but the data is in the json along with the image urls. Are the images actually there, just without read permissions to the public?

If we need to update the image urls to the new url format mentioned by @DevoKun, I'm happy to make the change. I just want to make sure we are aligned before doing so.

DevoKun commented 3 years ago
  1. The outdated image urls are a legacy from the original move of Scomp from the old webserver to being hosted on s3. The res.starwarsccg.org/cards/Images-HT/starwars/ path has not been updated since 2020-05-13 when they were originally uploaded there. The scomp repo has a fork of the card db so this repo never received the path updates.
  2. The images are automatically uploaded by a GitHub action in the holotable repo.
  3. no. raw=true is a legacy of how holotable.exe will load images from GitHub.
  4. The legacy images are not in the path as identified. As holotable is the source of truth, and the images uploaded from Holotable to res.starwarsccg.org/cards/, we will need to add the legacy images to the holotable repo and then update the paths to match.
scottrick commented 3 years ago

Okay, awesome. I will update all the image urls in the json to point to the res.starwarsccg.org/cards/ endpoints and remove the raw=true reference at the same time. This is a couple of items down on my todo list, but I will get to it in the next week or so.

Also, don't worry about pulling in the legacy image right now, I was mainly just curious more than anything.

thomasmarlin commented 3 years ago

Thanks for your ambition for doing all of this cleanup Scott!

scottrick commented 3 years ago

FWIW, the res.starwarsccg.org/cards/Images-HT/starwars/ images look to have been updated at some point. For example, the October Errata changes (https://www.starwarsccg.org/flattening-the-curve-errata/) have been made.

https://res.starwarsccg.org/cards/Images-HT/starwars/Virtual8-Dark/large/kirkanos.gif?raw=true https://res.starwarsccg.org/cards/Virtual8-Dark/large/kirkanos.gif?raw=true

DevoKun commented 3 years ago

Yes. I believe somebody with s3 access has been doing that manually not realizing that the process is automated.

thomasmarlin commented 3 years ago

Yup - that has been me. Do we know if people are actually updating holotable with all of the changes?

for a long while, images would get added into GEMP, but not to holotable, so I had to upload the GEMP images manually.

we should be 100% sure that everything in holotable has been updated before we do any switch-over. Not sure the best way to do that.

scottrick commented 3 years ago

I did compare several of the recently errata'd card images, and they were both updated. 

DevoKun commented 3 years ago

Yes. Holotable has been updated. There is an initiative underway to update gemp to use images from res.starwarsccg.org instead of serving them off the application server. To ensure that holotable was the source of truth, I went through and compared everything on the gemp server to the holotable repo. I had to add some images from gemp, but holotable is now the source for truth and up to date.

thomasmarlin commented 3 years ago

Awesome. Thanks for doing that @DevoKun !