Fix:Save metadata files when updating library items #1952

This commit is contained in:
advplyr 2023-07-22 07:50:47 -05:00
parent 22323f606d
commit 80aea0c82d
3 changed files with 13 additions and 34 deletions

View file

@ -523,7 +523,10 @@ class LibraryItem {
return this.media.getDirectPlayTracklist(episodeId)
}
// Saves metadata.abs file
/**
* Save metadata.json/metadata.abs file
* @returns {boolean} true if saved
*/
async saveMetadata() {
if (this.mediaType === 'video' || this.mediaType === 'music') return
@ -556,6 +559,7 @@ class LibraryItem {
await newLibraryFile.setDataFromPath(metadataFilePath, `metadata.json`)
this.libraryFiles.push(newLibraryFile)
}
Logger.debug(`[LibraryItem] Success saving abmetadata to "${metadataFilePath}"`)
return true
}).catch((error) => {