Change: scanner uses any .opf file, use description if plain text, use genres #141, Add: language book detail

This commit is contained in:
advplyr 2021-11-09 17:54:28 -06:00
parent 3eb0dc9ac3
commit 7141f70aa5
6 changed files with 76 additions and 37 deletions

View file

@ -194,6 +194,14 @@ class Scanner {
}
})
// Sync other files (all files that are not audio files) - Updates cover path
var hasOtherFileUpdates = false
var otherFilesUpdated = await existingAudiobook.syncOtherFiles(audiobookData.otherFiles, this.MetadataPath, forceAudioFileScan)
if (otherFilesUpdated) {
hasOtherFileUpdates = true
}
// Rescan audio file metadata
if (forceAudioFileScan) {
Logger.info(`[Scanner] Rescanning ${existingAudiobook.audioFiles.length} audio files for "${existingAudiobook.title}"`)
@ -240,7 +248,7 @@ class Scanner {
return ScanResult.UPDATED
}
var hasUpdates = hasUpdatedIno || hasUpdatedLibraryOrFolder || removedAudioFiles.length || removedAudioTracks.length || newAudioFiles.length || hasUpdatedAudioFiles
var hasUpdates = hasOtherFileUpdates || hasUpdatedIno || hasUpdatedLibraryOrFolder || removedAudioFiles.length || removedAudioTracks.length || newAudioFiles.length || hasUpdatedAudioFiles
// Check that audio tracks are in sequential order with no gaps
if (existingAudiobook.checkUpdateMissingParts()) {
@ -248,12 +256,6 @@ class Scanner {
hasUpdates = true
}
// Sync other files (all files that are not audio files) - Updates cover path
var otherFilesUpdated = await existingAudiobook.syncOtherFiles(audiobookData.otherFiles, this.MetadataPath, forceAudioFileScan)
if (otherFilesUpdated) {
hasUpdates = true
}
// Syncs path and fullPath
if (existingAudiobook.syncPaths(audiobookData)) {
hasUpdates = true