Skip to content

Image gallery#158

Draft
WillyJL wants to merge 9 commits into
mainfrom
image-gallery
Draft

Image gallery#158
WillyJL wants to merge 9 commits into
mainfrom
image-gallery

Conversation

@WillyJL

@WillyJL WillyJL commented May 10, 2024

Copy link
Copy Markdown
Owner

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].ext starting 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.

@WillyJL WillyJL added the feature New feature or request label May 10, 2024
@WillyJL

WillyJL commented May 10, 2024

Copy link
Copy Markdown
Owner Author

Just realized that we don't really need to rename the column in the database

@WillyJL

WillyJL commented May 10, 2024

Copy link
Copy Markdown
Owner Author

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

@FaceCrap

FaceCrap commented May 10, 2024

Copy link
Copy Markdown
Contributor

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.

Comment thread modules/api.py
globals.refresh_progress += 1


async def download_game_attachments(game: Game):

@FaceCrap FaceCrap Aug 25, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

WillyJL added a commit that referenced this pull request Dec 10, 2024
@WillyJL WillyJL mentioned this pull request Dec 10, 2024
@WillyJL WillyJL self-assigned this Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants