diff --git a/booklore-ui/src/app/features/book/components/book-browser/book-table/book-table.component.ts b/booklore-ui/src/app/features/book/components/book-browser/book-table/book-table.component.ts index ed0472db4..de54c07af 100644 --- a/booklore-ui/src/app/features/book/components/book-browser/book-table/book-table.component.ts +++ b/booklore-ui/src/app/features/book/components/book-browser/book-table/book-table.component.ts @@ -63,6 +63,7 @@ export class BookTableComponent implements OnInit, OnDestroy, OnChanges { {field: 'publishedDate', header: 'Published'}, {field: 'lastReadTime', header: 'Last Read'}, {field: 'addedOn', header: 'Added'}, + {field: 'fileName', header: 'File Name'}, {field: 'fileSizeKb', header: 'File Size'}, {field: 'language', header: 'Language'}, {field: 'isbn', header: 'ISBN'}, @@ -284,6 +285,9 @@ export class BookTableComponent implements OnInit, OnDestroy, OnChanges { case 'addedOn': return book.addedOn ? this.datePipe.transform(book.addedOn, 'dd-MMM-yyyy') ?? '' : ''; + case 'fileName': + return book.primaryFile?.fileName ?? ''; + case 'fileSizeKb': return this.formatFileSize(book.fileSizeKb); diff --git a/booklore-ui/src/app/features/book/components/book-browser/filters/HeaderFilter.ts b/booklore-ui/src/app/features/book/components/book-browser/filters/HeaderFilter.ts index bfbb526b4..9c6de5c46 100644 --- a/booklore-ui/src/app/features/book/components/book-browser/filters/HeaderFilter.ts +++ b/booklore-ui/src/app/features/book/components/book-browser/filters/HeaderFilter.ts @@ -40,14 +40,16 @@ export class HeaderFilter implements BookFilter { const categories = book.metadata?.categories || []; const isbn = book.metadata?.isbn10 || ''; const isbn13 = book.metadata?.isbn13 || ''; + const fileName = book.primaryFile?.fileName || ''; const matchesTitle = normalize(title).includes(nTerm); const matchesSeries = normalize(series).includes(nTerm); const matchesAuthor = authors.some(author => normalize(author).includes(nTerm)); const matchesCategory = categories.some(category => normalize(category).includes(nTerm)); const matchesIsbn = normalize(isbn).includes(nTerm) || normalize(isbn13).includes(nTerm); + const matchesFileName = normalize(fileName).includes(nTerm); - return matchesTitle || matchesSeries || matchesAuthor || matchesCategory || matchesIsbn; + return matchesTitle || matchesSeries || matchesAuthor || matchesCategory || matchesIsbn || matchesFileName; }) || null; return {...bookState, books: filteredBooks}; diff --git a/booklore-ui/src/app/features/book/components/book-browser/table-column-preference.service.ts b/booklore-ui/src/app/features/book/components/book-browser/table-column-preference.service.ts index 5716d4218..708fd75fe 100644 --- a/booklore-ui/src/app/features/book/components/book-browser/table-column-preference.service.ts +++ b/booklore-ui/src/app/features/book/components/book-browser/table-column-preference.service.ts @@ -24,6 +24,7 @@ export class TableColumnPreferenceService { {field: 'publishedDate', header: 'Published'}, {field: 'lastReadTime', header: 'Last Read'}, {field: 'addedOn', header: 'Added'}, + {field: 'fileName', header: 'File Name'}, {field: 'fileSizeKb', header: 'File Size'}, {field: 'language', header: 'Language'}, {field: 'isbn', header: 'ISBN'},