Add:Search for narrators #1495

This commit is contained in:
advplyr 2023-04-24 18:25:30 -05:00
parent 33f20d54cc
commit a5627a1b52
11 changed files with 271 additions and 33 deletions

View file

@ -322,6 +322,7 @@ class Book {
tags: this.tags.filter(t => cleanStringForSearch(t).includes(query)),
series: this.metadata.searchSeries(query),
authors: this.metadata.searchAuthors(query),
narrators: this.metadata.searchNarrators(query),
matchKey: null,
matchText: null
}
@ -336,10 +337,12 @@ class Book {
} else if (payload.series.length) {
payload.matchKey = 'series'
payload.matchText = this.metadata.seriesName
}
else if (payload.tags.length) {
} else if (payload.tags.length) {
payload.matchKey = 'tags'
payload.matchText = this.tags.join(', ')
} else if (payload.narrators.length) {
payload.matchKey = 'narrators'
payload.matchText = this.metadata.narratorName
}
}
return payload