Closed klablabla closed 1 year ago
In commit e606f52 I improved the raidpicture.php to no longer crash when the gym image fails to load, and it now uses the fallback image instead.
Unfortunately the portal import functionality doesn't save the gym image URLs that we could use to redownload all the images. Adding such functionality would require querying Ingress API with the portal ID somehow, I don't know if that is possible.
But saving the gym image URL shouldn't be an issue in general and pretty easy to solve.
We just need to extend the gyms table with a new column (e.g. web_url or something like that as we a already have img_url) and always save the url then there. Won't update existing gyms of course.
Anyway, we require a new column in gyms table and need to store $portal_image (https://github.com/pokepark/PokemonRaidBot/blob/main/mods/importal.php#L40) independently from $config->RAID_PICTURE_STORE_GYM_IMAGES_LOCALLY in the new column. Anything else can stay as it is.
Once that is done we need the function to redownload all the missing gym images and also save/update the url in the new (web_url) column. That said, I don't know how easy it might is to do that.
To reproduce: Add gym with portal bot. Delete the picture manuel and eave the img_url in the database. Cou can't share any raid on that gym anymore.
Possible solutions: