Repository navigation
fix: handle cached image load failures correctly - #345
Conversation
|
Oh damn I accidentally removed the cache put operation on the normal codepath :( Thanks for putting it back in. Regarding the other fixes though, looks like that'll disable the instant-retry logic when we fall into the "mentioned in DB but doesn't exist on disk" case, i.e. it requires a second image request to fill the image in; this would then leave placeholders on the screen without further retry/load attempts until the user at least scrolls away and back (correct me if I understood it wrongly). Not sure if it's necessary to restore that since I'm kinda biased toward what I wrote, but I'd like to have your confirmation that you are aware of this and think it's a fair removal. I was totally unaware of the WebP issue though. It's weird as on my Arch Linux machine, GTK4 apps load WebP perfectly fine without |
It removes the recursive instant retry, but that retry only repeated the database lookup as in it was not responsible for fetching the replacement. When the file is missing,
Arch already provides GTK with WebP support through the glycin loader built into GdkPixbuf, so it is not listed separately. |
That's a relief to hear. I'll leave the deps unchanged then. The rest looks good so I'll be merging now. Thanks a lot for both fixes! |
When GTK fails to load a cached image, such as a WebP file for which GdkPixbuf may have no loader for, or a damaged or inaccessible file, Euphonica incorrectly treats the error as if the file were missing. It removes the database entry and downloads the cover again without deleting the existing file, so the cycle repeats on subsequent disk loads.
This PR fixes the cache behavior:
This issue surfaced at NixOS/nixpkgs#557510.