mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-24 04:44:57 +02:00
New search page, updated search menu includes tags #112
This commit is contained in:
parent
aa872948d5
commit
48f0e039e5
18 changed files with 259 additions and 57 deletions
|
@ -220,11 +220,16 @@ class Book {
|
|||
}
|
||||
|
||||
getQueryMatches(search) {
|
||||
var titleMatch = this._title.toLowerCase().includes(search) || this._subtitle.toLowerCase().includes(search)
|
||||
var titleMatch = this._title.toLowerCase().includes(search)
|
||||
var subtitleMatch = this._subtitle.toLowerCase().includes(search)
|
||||
var authorMatch = this._author.toLowerCase().includes(search)
|
||||
var seriesMatch = this._series.toLowerCase().includes(search)
|
||||
|
||||
var bookMatchKey = titleMatch ? 'title' : subtitleMatch ? 'subtitle' : authorMatch ? 'author' : seriesMatch ? 'series' : false
|
||||
var bookMatchText = bookMatchKey ? this[bookMatchKey] : ''
|
||||
return {
|
||||
book: titleMatch ? 'title' : authorMatch ? 'author' : seriesMatch ? 'series' : false,
|
||||
book: bookMatchKey,
|
||||
bookMatchText,
|
||||
author: authorMatch ? this._author : false,
|
||||
series: seriesMatch ? this._series : false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue