stumpapp / stump

A free and open source comics, manga and digital book server with OPDS support (WIP)
https://stumpapp.dev
MIT License
863 stars 34 forks source link

✨ Select custom thumbnails #167

Closed aaronleopold closed 9 months ago

aaronleopold commented 9 months ago

Resolves #166

PR adds logic to pick a page from a book to use as the thumbnail for itself of its associated series/library. After the initial release, I'll be sure to refactor this implementation to be more resilient against regeneration (e.g. so you don't have to manually select your override whenever you force-regenerate thumbnails)

For media and series, they are getting their own new management pages. Rather than adding a bunch of modals for future features, e.g. metadata management, all similar items will live there. For library thumbnails, it will go in the existing library management page.

Note that EPUB files won't be supported for this feature at this time. In the future, it could be possible to extend this to query for all image resources inside the EPUB and select from that, but I don't want to prioritize figuring that out now.

aaronleopold commented 9 months ago

I'm going to eagerly merge this after it passes CI again, there is a bit of duplication for some of the UI logic, and it doesn't look perfect IMO, but I'll tackle that another day so I can focus on other non-UI things for now.

This PR was adjusted to also add a fix for an unsafe unwrap, and the order_by clause that was missing on thumbnail API calls. Regarding the first one, before a release I should do a search and replace for all of the old unwraps that might be left from when I first started the project 😅