mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-09 17:04:58 +02:00
Added _isbn to Book so it's always string
This commit is contained in:
parent
01c8013309
commit
7607381ea4
1 changed files with 2 additions and 1 deletions
|
@ -43,6 +43,7 @@ class Book {
|
|||
get _authorsList() { return this._author.split(', ') }
|
||||
get _narratorsList() { return this._narrator.split(', ') }
|
||||
get _genres() { return this.genres || [] }
|
||||
get _isbn() { return this.isbn || '' }
|
||||
|
||||
get shouldSearchForCover() {
|
||||
if (this.cover) return false
|
||||
|
@ -280,7 +281,7 @@ class Book {
|
|||
var seriesMatch = this._series.toLowerCase().includes(search)
|
||||
|
||||
// ISBN match has to be exact to prevent isbn matches to flood results. Remove dashes since isbn might have those
|
||||
var isbnMatch = this.isbn.toLowerCase().replace(/-/g, '') === search.replace(/-/g, '')
|
||||
var isbnMatch = this._isbn.toLowerCase().replace(/-/g, '') === search.replace(/-/g, '')
|
||||
|
||||
var bookMatchKey = titleMatch ? 'title' : subtitleMatch ? 'subtitle' : authorsMatched.length ? 'authorFL' : seriesMatch ? 'series' : isbnMatch ? 'isbn' : false
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue