Update new library scanner to handle metadata file changes

This commit is contained in:
advplyr 2023-09-03 15:14:58 -05:00
parent 9123dcb365
commit e63aab95d8
6 changed files with 265 additions and 69 deletions

View file

@ -325,9 +325,9 @@ class Database {
return Promise.all(oldUsers.map(u => this.updateUser(u)))
}
async removeUser(userId) {
removeUser(userId) {
if (!this.sequelize) return false
await this.models.user.removeById(userId)
return this.models.user.removeById(userId)
}
upsertMediaProgress(oldMediaProgress) {
@ -345,9 +345,9 @@ class Database {
return Promise.all(oldBooks.map(oldBook => this.models.book.saveFromOld(oldBook)))
}
async createLibrary(oldLibrary) {
createLibrary(oldLibrary) {
if (!this.sequelize) return false
await this.models.library.createFromOld(oldLibrary)
return this.models.library.createFromOld(oldLibrary)
}
updateLibrary(oldLibrary) {
@ -355,9 +355,9 @@ class Database {
return this.models.library.updateFromOld(oldLibrary)
}
async removeLibrary(libraryId) {
removeLibrary(libraryId) {
if (!this.sequelize) return false
await this.models.library.removeById(libraryId)
return this.models.library.removeById(libraryId)
}
createBulkCollectionBooks(collectionBooks) {