Fix: magic shelf filter not working for "unset" read status (#1599)

This commit is contained in:
Aditya Chandel
2025-11-21 09:31:02 -07:00
committed by GitHub
parent 379e9f745e
commit ab2992ed82
@@ -46,7 +46,7 @@ export class BookRuleEvaluatorService {
case 'tags':
return (book.metadata?.tags ?? []).map(t => t.toLowerCase());
case 'readStatus':
return [String(book.readStatus).toLowerCase()];
return [String(book.readStatus ?? 'UNSET').toLowerCase()];
case 'fileType':
return [String(this.getFileExtension(book.fileName) ?? '').toLowerCase()];
case 'library':
@@ -193,7 +193,7 @@ export class BookRuleEvaluatorService {
case 'library':
return book.libraryId;
case 'readStatus':
return book.readStatus;
return book.readStatus ?? 'UNSET';
case 'fileType':
return this.getFileExtension(book.fileName)?.toLowerCase() ?? null;
case 'fileSize':