feat(magic-shelf): add ISBN-10 and ISBN-13 metadata fields to book rules (#2196)

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
This commit is contained in:
Balázs Szücs
2026-01-07 14:16:12 -07:00
committed by GitHub
parent c7afe6ec13
commit 13a617a9e9
4 changed files with 19 additions and 1 deletions
@@ -52,6 +52,8 @@ export type RuleField =
| 'seriesTotal'
| 'pageCount'
| 'language'
| 'isbn13'
| 'isbn10'
| 'amazonRating'
| 'amazonReviewCount'
| 'goodreadsRating'
@@ -127,6 +129,8 @@ const FIELD_CONFIGS: Record<RuleField, FullFieldConfig> = {
personalRating: {label: 'Personal Rating', type: 'decimal', max: 10},
pageCount: {label: 'Page Count', type: 'number'},
language: {label: 'Language'},
isbn13: {label: 'ISBN-13'},
isbn10: {label: 'ISBN-10'},
seriesName: {label: 'Series Name'},
seriesNumber: {label: 'Series Number', type: 'number'},
seriesTotal: {label: 'Books in Series', type: 'number'},
@@ -349,7 +353,7 @@ export class MagicShelfComponent implements OnInit {
if (!field) return [...baseOperators, ...multiValueOperators];
const config = FIELD_CONFIGS[field];
const isMultiValueField = ['library', 'authors', 'categories', 'moods', 'tags', 'readStatus', 'fileType', 'language', 'title', 'subtitle', 'publisher', 'seriesName'].includes(field);
const isMultiValueField = ['library', 'authors', 'categories', 'moods', 'tags', 'readStatus', 'fileType', 'language', 'title', 'subtitle', 'publisher', 'seriesName', 'isbn13', 'isbn10'].includes(field);
const operators = [...baseOperators];
if (isMultiValueField) {