Fix: magic shelf filter not working for "unset" read status (#1599)
This commit is contained in:
@@ -46,7 +46,7 @@ export class BookRuleEvaluatorService {
|
|||||||
case 'tags':
|
case 'tags':
|
||||||
return (book.metadata?.tags ?? []).map(t => t.toLowerCase());
|
return (book.metadata?.tags ?? []).map(t => t.toLowerCase());
|
||||||
case 'readStatus':
|
case 'readStatus':
|
||||||
return [String(book.readStatus).toLowerCase()];
|
return [String(book.readStatus ?? 'UNSET').toLowerCase()];
|
||||||
case 'fileType':
|
case 'fileType':
|
||||||
return [String(this.getFileExtension(book.fileName) ?? '').toLowerCase()];
|
return [String(this.getFileExtension(book.fileName) ?? '').toLowerCase()];
|
||||||
case 'library':
|
case 'library':
|
||||||
@@ -193,7 +193,7 @@ export class BookRuleEvaluatorService {
|
|||||||
case 'library':
|
case 'library':
|
||||||
return book.libraryId;
|
return book.libraryId;
|
||||||
case 'readStatus':
|
case 'readStatus':
|
||||||
return book.readStatus;
|
return book.readStatus ?? 'UNSET';
|
||||||
case 'fileType':
|
case 'fileType':
|
||||||
return this.getFileExtension(book.fileName)?.toLowerCase() ?? null;
|
return this.getFileExtension(book.fileName)?.toLowerCase() ?? null;
|
||||||
case 'fileSize':
|
case 'fileSize':
|
||||||
|
|||||||
Reference in New Issue
Block a user