mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-03 22:49:42 +00:00
feat: add library-wide consolidation status update tool and improve consolidation robustness
This commit is contained in:
parent
2c77f1fc5a
commit
c2693e2460
8 changed files with 118 additions and 11 deletions
|
|
@ -927,7 +927,12 @@ class LibraryItem extends Model {
|
|||
const title = this.title || 'Unknown Title'
|
||||
const folderName = LibraryItem.getConsolidatedFolderName(author, title)
|
||||
const currentFolderName = Path.basename(this.path.replace(/[\/\\]$/, ''))
|
||||
return currentFolderName !== folderName
|
||||
if (currentFolderName !== folderName) return true
|
||||
|
||||
// Check if it is in a subfolder
|
||||
const relPathPOSIX = (this.relPath || '').replace(/\\/g, '/')
|
||||
const cleanRelPath = relPathPOSIX.replace(/\/$/, '')
|
||||
return cleanRelPath !== currentFolderName
|
||||
}
|
||||
|
||||
static getConsolidatedFolderName(author, title) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue