mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-30 18:12:25 -04:00 
			
		
		
		
	Added isbn search
Search now also searches books using isbn. ISBN match has to be exact to prevent isbn matches to flood results.
This commit is contained in:
		
							parent
							
								
									4aa6c84252
								
							
						
					
					
						commit
						2f8a90c21a
					
				| @ -279,7 +279,11 @@ class Book { | ||||
|     // var authorMatch = this._author.toLowerCase().includes(search)
 | ||||
|     var seriesMatch = this._series.toLowerCase().includes(search) | ||||
|      | ||||
|     var bookMatchKey = titleMatch ? 'title' : subtitleMatch ? 'subtitle' : authorsMatched.length ? 'authorFL' : seriesMatch ? 'series' : false | ||||
|     // 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().replaceAll('-', '') === search.replaceAll('-', '') | ||||
| 
 | ||||
|     var bookMatchKey = titleMatch ? 'title' : subtitleMatch ? 'subtitle' : authorsMatched.length ? 'authorFL' : seriesMatch ? 'series' : isbnMatch ? 'isbn' : false | ||||
| 
 | ||||
|     var bookMatchText = bookMatchKey ? this[bookMatchKey] : '' | ||||
|     return { | ||||
|       book: bookMatchKey, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user