JamesReviewsMusic
JRM-4Fix album result count ignoring the search filter
Description
In AlbumModel.getPaginatedAlbums (backend/src/api/models/Album.ts), the totalCount query only applies the genre filter, never the search term. So when a search is active, the "Showing N results" text and the page total in the pagination controls are calculated from the full unfiltered album count.
- Apply the same conditions to the count query as the main query (worth building the conditions once and sharing them after the JRM-3 fix)
- While in here, the frontend calculates total pages with a hardcoded
/ 35in three routes. Export the page size from shared and use it in both places so they can't drift
Sub-tickets
0No sub-tickets yet.
Links
No links.
Comments
0No comments yet.