Enable navigation by library, year, language, file type, and read status in metadata viewer (#1672)

This commit is contained in:
Aditya Chandel
2025-11-28 18:22:37 -07:00
committed by GitHub
parent 81c4424ae6
commit 806ffe22b4
9 changed files with 963 additions and 515 deletions
@@ -92,6 +92,11 @@ export class SideBarFilter implements BookFilter {
return filterValues.some(range => isRatingInRange(book.metadata?.hardcoverRating, range));
case 'personalRating':
return filterValues.some(range => isRatingInRange10(book.metadata?.personalRating, range));
case 'publishedYear':
const bookYear = book.metadata?.publishedDate
? new Date(book.metadata.publishedDate).getFullYear().toString()
: null;
return bookYear ? filterValues.includes(bookYear) : false;
case 'publishedDate':
return filterValues.includes(new Date(book.metadata?.publishedDate || '').getFullYear());
case 'fileSize':