Fix TypeError: checkIsNotConsolidated_FolderName is not a function by making it static

This commit is contained in:
Tiberiu Ichim 2026-02-15 20:51:39 +02:00
parent 8f189763f0
commit 2c77f1fc5a
2 changed files with 4 additions and 6 deletions

View file

@ -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}`)
}