mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-04-16 12:09:42 +00:00
Fix item_removed payload to include libraryId
This commit is contained in:
parent
c4c8b8d0f2
commit
fda1a6ea9b
3 changed files with 9 additions and 7 deletions
|
|
@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue