first iteration of parsing metadata and chapter names from ncc.html file

This commit is contained in:
Toni Barth 2026-02-07 16:45:40 +01:00
parent fe13456a2b
commit 6c9bf8c2bd
10 changed files with 394 additions and 6 deletions

View file

@ -49,4 +49,22 @@ describe('scanUtils', async () => {
'Author/Series2/Book5/deeply/nested': ['cd 01/audiofile.mp3', 'cd 02/audiofile.mp3']
})
})
it('should include DAISY ncc.html changes when includeNonMediaFiles is enabled', async () => {
const filePath = 'Author/Book3/ncc.html'
const dirname = Path.dirname(filePath)
const fileItems = [
{
name: Path.basename(filePath),
reldirpath: dirname === '.' ? '' : dirname,
extension: Path.extname(filePath),
deep: filePath.split('/').length - 1
}
]
const libraryItemGrouping = scanUtils.groupFileItemsIntoLibraryItemDirs('book', fileItems, false, true)
expect(libraryItemGrouping).to.deep.equal({
'Author/Book3': ['ncc.html']
})
})
})