Update controllers to use toOldJSON functions

This commit is contained in:
advplyr 2025-01-04 15:20:41 -06:00
parent 7fae25a726
commit 6d52f88a96
20 changed files with 277 additions and 202 deletions

View file

@ -342,8 +342,8 @@ class MiscController {
tags: libraryItem.media.tags
})
await libraryItem.saveMetadataFile()
const oldLibraryItem = Database.libraryItemModel.getOldLibraryItem(libraryItem)
SocketAuthority.emitter('item_updated', oldLibraryItem.toJSONExpanded())
SocketAuthority.emitter('item_updated', libraryItem.toOldJSONExpanded())
numItemsUpdated++
}
}
@ -385,8 +385,8 @@ class MiscController {
tags: libraryItem.media.tags
})
await libraryItem.saveMetadataFile()
const oldLibraryItem = Database.libraryItemModel.getOldLibraryItem(libraryItem)
SocketAuthority.emitter('item_updated', oldLibraryItem.toJSONExpanded())
SocketAuthority.emitter('item_updated', libraryItem.toOldJSONExpanded())
numItemsUpdated++
}
@ -480,8 +480,8 @@ class MiscController {
genres: libraryItem.media.genres
})
await libraryItem.saveMetadataFile()
const oldLibraryItem = Database.libraryItemModel.getOldLibraryItem(libraryItem)
SocketAuthority.emitter('item_updated', oldLibraryItem.toJSONExpanded())
SocketAuthority.emitter('item_updated', libraryItem.toOldJSONExpanded())
numItemsUpdated++
}
}
@ -523,8 +523,8 @@ class MiscController {
genres: libraryItem.media.genres
})
await libraryItem.saveMetadataFile()
const oldLibraryItem = Database.libraryItemModel.getOldLibraryItem(libraryItem)
SocketAuthority.emitter('item_updated', oldLibraryItem.toJSONExpanded())
SocketAuthority.emitter('item_updated', libraryItem.toOldJSONExpanded())
numItemsUpdated++
}