mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-09 04:02:42 +02:00
Fix item_removed payload to include libraryId
This commit is contained in:
@@ -363,8 +363,9 @@ class ApiRouter {
|
||||
* Remove library item and associated entities
|
||||
* @param {string} libraryItemId
|
||||
* @param {string[]} mediaItemIds array of bookId or podcastEpisodeId
|
||||
* @param {string} libraryId
|
||||
*/
|
||||
async handleDeleteLibraryItem(libraryItemId, mediaItemIds) {
|
||||
async handleDeleteLibraryItem(libraryItemId, mediaItemIds, libraryId) {
|
||||
const numProgressRemoved = await Database.mediaProgressModel.destroy({
|
||||
where: {
|
||||
mediaItemId: mediaItemIds
|
||||
@@ -395,7 +396,8 @@ class ApiRouter {
|
||||
await Database.libraryItemModel.removeById(libraryItemId)
|
||||
|
||||
SocketAuthority.emitter('item_removed', {
|
||||
id: libraryItemId
|
||||
id: libraryItemId,
|
||||
libraryId
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user