Clean and parse author name from directory, sort by author last name, scan for covers

This commit is contained in:
advplyr 2021-08-24 20:24:40 -05:00
parent 759be593b6
commit 51357195e2
28 changed files with 783 additions and 59 deletions

View file

@ -62,6 +62,10 @@ class Audiobook {
return this.book ? this.book.author : 'Unknown'
}
get authorLF() {
return this.book ? this.book.authorLF : null
}
get genres() {
return this.book ? this.book.genres || [] : []
}
@ -136,9 +140,9 @@ class Audiobook {
toJSONExpanded() {
return {
id: this.id,
title: this.title,
author: this.author,
cover: this.cover,
// title: this.title,
// author: this.author,
// cover: this.cover,
path: this.path,
fullPath: this.fullPath,
addedAt: this.addedAt,
@ -306,6 +310,10 @@ class Audiobook {
return hasUpdates
}
syncAuthorNames(audiobookData) {
return this.book.syncAuthorNames(audiobookData.authorFL, audiobookData.authorLF)
}
isSearchMatch(search) {
return this.book.isSearchMatch(search.toLowerCase().trim())
}