Fix:Remove podcast episode to also remove library file #636

This commit is contained in:
advplyr 2022-06-01 17:45:52 -05:00
parent 4621c78573
commit 36bd6e649a
3 changed files with 21 additions and 2 deletions

View file

@ -482,5 +482,16 @@ class LibraryItem {
return success
})
}
removeLibraryFile(ino) {
if (!ino) return false
var libraryFile = this.libraryFiles.find(lf => lf.ino === ino)
if (libraryFile) {
this.libraryFiles = this.libraryFiles.filter(lf => lf.ino !== ino)
this.updatedAt = Date.now()
return true
}
return false
}
}
module.exports = LibraryItem