mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
Fix TypeError: checkIsNotConsolidated_FolderName is not a function by making it static
This commit is contained in:
parent
8f189763f0
commit
2c77f1fc5a
2 changed files with 4 additions and 6 deletions
|
|
@ -925,12 +925,12 @@ class LibraryItem extends Model {
|
|||
if (this.isFile) return true
|
||||
const author = this.authorNamesFirstLast?.split(',')[0]?.trim() || 'Unknown Author'
|
||||
const title = this.title || 'Unknown Title'
|
||||
const folderName = this.checkIsNotConsolidated_FolderName(author, title)
|
||||
const folderName = LibraryItem.getConsolidatedFolderName(author, title)
|
||||
const currentFolderName = Path.basename(this.path.replace(/[\/\\]$/, ''))
|
||||
return currentFolderName !== folderName
|
||||
}
|
||||
|
||||
checkIsNotConsolidated_FolderName(author, title) {
|
||||
static getConsolidatedFolderName(author, title) {
|
||||
return sanitizeFilename(`${author} - ${title}`)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue