feat(books): rename tags to genres and add user tags

This commit is contained in:
neon
2026-02-19 05:08:21 -06:00
parent 1c97403379
commit 3eff3616fc
49 changed files with 583 additions and 792 deletions
+2
View File
@@ -16,6 +16,7 @@ export type BookCard = {
files: BookFileRef[];
publishedYear: number | null;
language: string | null;
genres: string[];
tags: string[];
rating: number | null;
readingProgress: number | null;
@@ -54,6 +55,7 @@ export type BookDetail = {
coverSource: 'extracted' | 'custom' | null;
providerIds: ProviderIds;
authors: { id: number; name: string; sortName: string | null }[];
genres: string[];
tags: string[];
files: BookDetailFile[];
};
+1 -1
View File
@@ -23,7 +23,7 @@ export interface MetadataCandidate {
isbn13?: string;
seriesName?: string;
seriesIndex?: number;
tags?: string[];
genres?: string[];
coverUrl?: string;
sourceUrl?: string;
}
+2 -2
View File
@@ -7,7 +7,7 @@ export type RuleField =
| 'publishedYear'
| 'pageCount'
| 'author'
| 'tag'
| 'genre'
| 'format'
| 'addedAt'
| 'fileAvailability'
@@ -48,7 +48,7 @@ export const FIELD_OPERATORS: Record<RuleField, RuleOperator[]> = {
language: ['eq', 'notEq', 'isEmpty', 'isNotEmpty'],
series: ['contains', 'notContains', 'isEmpty', 'isNotEmpty'],
author: ['includesAny', 'includesAll', 'excludesAll', 'isEmpty', 'isNotEmpty'],
tag: ['includesAny', 'includesAll', 'excludesAll', 'isEmpty', 'isNotEmpty'],
genre: ['includesAny', 'includesAll', 'excludesAll', 'isEmpty', 'isNotEmpty'],
format: ['includesAny', 'excludesAll'],
publishedYear: ['eq', 'notEq', 'gt', 'gte', 'lt', 'lte', 'between', 'isEmpty', 'isNotEmpty'],
seriesIndex: ['eq', 'notEq', 'gt', 'gte', 'lt', 'lte', 'between', 'isEmpty', 'isNotEmpty'],