diff --git a/client/components/app/BookShelfCategorized.vue b/client/components/app/BookShelfCategorized.vue index 8f395298..2335d040 100644 --- a/client/components/app/BookShelfCategorized.vue +++ b/client/components/app/BookShelfCategorized.vue @@ -103,7 +103,7 @@ export default { }, async setShelvesFromSearch() { var shelves = [] - if (this.results.books) { + if (this.results.books && this.results.books.length) { shelves.push({ id: 'books', label: 'Books', @@ -112,7 +112,16 @@ export default { }) } - if (this.results.series) { + if (this.results.podcasts && this.results.podcasts.length) { + shelves.push({ + id: 'podcasts', + label: 'Podcasts', + type: 'podcast', + entities: this.results.podcasts.map((res) => res.libraryItem) + }) + } + + if (this.results.series && this.results.series.length) { shelves.push({ id: 'series', label: 'Series', @@ -127,7 +136,7 @@ export default { }) }) } - if (this.results.tags) { + if (this.results.tags && this.results.tags.length) { shelves.push({ id: 'tags', label: 'Tags', @@ -141,7 +150,7 @@ export default { }) }) } - if (this.results.authors) { + if (this.results.authors && this.results.authors.length) { shelves.push({ id: 'authors', label: 'Authors', diff --git a/client/components/cards/AudiobookSearchCard.vue b/client/components/cards/ItemSearchCard.vue similarity index 91% rename from client/components/cards/AudiobookSearchCard.vue rename to client/components/cards/ItemSearchCard.vue index 1a6378f7..83d22f17 100644 --- a/client/components/cards/AudiobookSearchCard.vue +++ b/client/components/cards/ItemSearchCard.vue @@ -40,6 +40,12 @@ export default { media() { return this.libraryItem ? this.libraryItem.media || {} : {} }, + mediaType() { + return this.libraryItem ? this.libraryItem.mediaType : null + }, + isPodcast() { + return this.mediaType == 'podcast' + }, mediaMetadata() { return this.media.metadata || {} }, @@ -49,11 +55,9 @@ export default { subtitle() { return this.mediaMetadata.subtitle || '' }, - authors() { - return this.mediaMetadata.authors || [] - }, authorName() { - return this.authors.map((au) => au.name).join(', ') + if (this.isPodcast) return this.mediaMetadata.author || 'Unknown' + return this.mediaMetadata.authorName || 'Unknown' }, matchHtml() { if (!this.matchText || !this.search) return '' diff --git a/client/components/controls/GlobalSearch.vue b/client/components/controls/GlobalSearch.vue index 7eeb25bc..8e39f527 100644 --- a/client/components/controls/GlobalSearch.vue +++ b/client/components/controls/GlobalSearch.vue @@ -19,11 +19,20 @@

No Results