Image gallery#158
Conversation
|
Just realized that we don't really need to rename the column in the database |
|
Also I realized that I had 2 branches still in the repo from when I made PRs to littleraisins, so I now added the last changes from a zip downloads of his repo when it was delisted, so we have a backup with atleast a little bit of git history of his fork |
|
Can't wait to give it a spin, and would love to see a proper working slideshow (running on the same monitor as where the checker is open.) One thing I hope you'll find a fix for, when I used that feature on the copy I played with, I always got logged out in the forum. I suspect the forum software has some kind of built-in detection for images getting downloaded other than through the forum itself. |
| globals.refresh_progress += 1 | ||
|
|
||
|
|
||
| async def download_game_attachments(game: Game): |
There was a problem hiding this comment.
When looking at this function, my OCD is kicking in and I feel that the last piece of code in the if branch in full_check
if fetch_image and image_url and image_url != "missing":
//starting from this line
with images:
...
// upto and including this line
await asyncio.shield(set_image_and_update_game())
should be converted to a function analogue to this one... I would almost say, combine it into a single function.
However, the TODO implies you want to make it part of the refresh cycle. This means ALL attachment images get checked and possibly redownloaded during a full refresh. Going by my own experience with LR's implementation, I fear that this too will cause the forum to get pissed and log you out. It will certainly cause a big performance hit if additional images aren't already present the first time a bunch of games gets a full refresh, and the forum software may not like that... There's folks out there that have over a 1000 games in their checker.
It might be wiser to just give users the option to do it only for selected games, analogue to how LR had it implemented.
Started backporting and refactoring littleraisins' code for image gallery the other day, putting it here to keep track.
Still not 100% sure on a few things, I'm figuring them out as I go. For now, banner images stay as
[id].ext, new images go to[id]/[index].extstarting from 0 (as opposed to raisins' breaking change of moving banners too), a little more convoluted but worth it for tidyness and backwards compatibility.It is not ready to run in current state, don't even try.