[Enhancement]: Book Cover Square/Rectangle Pref w/ smallest to largest sub-sorting. #2777

Open
opened 2026-04-25 00:10:32 +02:00 by adam · 0 comments
Owner

Originally created by @tagmeh on GitHub (May 17, 2025).

Type of Enhancement

Web Interface/Frontend

Describe the Feature/Enhancement

When searching for a book cover, It'd be nice to see the square or rectangle covers presented first, based on the library-specific setting "Use square book covers".

It would also be nice to have the book covers intentionally sorted from smallest to largest. Or for there to be a setting in the modal or library setting to sort ascending or descending.

Why would this be helpful?

Currently the application is designed to favor rectangle or square book covers based on a library-specific setting. So, when I'm looking for a higher quality or more accurate book cover, I don't necessarily want to see or dig through covers I don't prefer. On top of that, it doesn't appear there is any size/ratio sorting. The book covers generally go from smallest to largest, but that's largely due to the order by which the 3rd party APIs are called.

I'm aware some books simply don't have one type of cover (usually square), so the rectangle cover has to do. That's fine. I just think the preferred ratio should be sorted on top, if available.

TL;DR: Ease of use, more consistent and intentional design.

Future Implementation (Screenshot)

I thought I'd try my hand at working on the solution, but decided to raise an issue for discussion purposes when things felt like they started to get messy.

Initial implementation: Minimal script change, no html change, adds a bit of tech debt by way of duplicated work.

Image
(Notice the first images are square, ascending in size, until it resets to the first and smallest rectangle image. There are no UI elements to indicate the change in cover ratio)

Second implementation: Script and html change, same tech debt as above.

Image
(The divider will only show if there are covers of the non-preferred type. Otherwise it would appear exactly the same as it does now, except sorted.)

Tech debt explanation: In order for the model-cover tab (Cover.vue) to sort the covers, it has to have access to the height/width of each image. So the model-cover makes an api call to get the image information. It's my understanding (I'm no JavaScript, Vue.js, or Nuxt expert) that the covers-preview-cover component is also making this api call for each image being displayed. I tried to remove this logic, but backtracked when I realized this component was being used in multiple other components.

Note, the images sorted first (square/not-square) change automatically when the library-specific setting "Use Square Book Covers" is changed.

Audiobookshelf Server Version

v2.21.0

Current Implementation (Screenshot)

Updating book covers, trying to find themed/consistent/fan covers and straining my eyes trying to hunt down only the square ones.

Image

Then I noticed they aren't actually sorted smallest to largest, and that it probably wouldn't be too much harder to sort by square/not-square then by width or height.

Originally created by @tagmeh on GitHub (May 17, 2025). ### Type of Enhancement Web Interface/Frontend ### Describe the Feature/Enhancement When searching for a book cover, It'd be nice to see the square or rectangle covers presented first, based on the library-specific setting "Use square book covers". It would also be nice to have the book covers intentionally sorted from smallest to largest. Or for there to be a setting in the modal or library setting to sort ascending or descending. ### Why would this be helpful? Currently the application is designed to favor rectangle or square book covers based on a library-specific setting. So, when I'm looking for a higher quality or more accurate book cover, I don't necessarily want to see or dig through covers I don't prefer. On top of that, it doesn't appear there is any size/ratio sorting. The book covers generally go from smallest to largest, but that's largely due to the order by which the 3rd party APIs are called. I'm aware some books simply don't have one type of cover (usually square), so the rectangle cover has to do. That's fine. I just think the preferred ratio should be sorted on top, if available. TL;DR: Ease of use, more consistent and intentional design. ### Future Implementation (Screenshot) I thought I'd try my hand at working on the solution, but decided to raise an issue for discussion purposes when things felt like they started to get messy. Initial implementation: Minimal script change, no html change, adds a bit of tech debt by way of duplicated work. ![Image](https://github.com/user-attachments/assets/d98fe0af-979d-4790-8f2b-46b8c6f0200f) (Notice the first images are square, ascending in size, until it resets to the first and smallest rectangle image. There are no UI elements to indicate the change in cover ratio) Second implementation: Script and html change, same tech debt as above. ![Image](https://github.com/user-attachments/assets/45615b84-0ff7-4ef8-b602-97a5b82c8523) (The divider will only show if there are covers of the non-preferred type. Otherwise it would appear exactly the same as it does now, except sorted.) Tech debt explanation: In order for the model-cover tab (Cover.vue) to sort the covers, it has to have access to the height/width of each image. So the model-cover makes an api call to get the image information. It's my understanding (I'm no JavaScript, Vue.js, or Nuxt expert) that the covers-preview-cover component is also making this api call for each image being displayed. I tried to remove this logic, but backtracked when I realized this component was being used in multiple other components. Note, the images sorted first (square/not-square) change automatically when the library-specific setting "Use Square Book Covers" is changed. ### Audiobookshelf Server Version v2.21.0 ### Current Implementation (Screenshot) Updating book covers, trying to find themed/consistent/fan covers and straining my eyes trying to hunt down only the square ones. ![Image](https://github.com/user-attachments/assets/10eba778-3d05-4a97-a5be-bca3a9d2aef2) Then I noticed they aren't actually sorted smallest to largest, and that it probably wouldn't be too much harder to sort by square/not-square then by width or height.
adam added the enhancement label 2026-04-25 00:10:32 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2777