Update:Media item share endpoints and audio player #1768

- Add endpoints for getting tracks, getting cover image and updating progress
- Implement share session cookie and caching share playback session
- Audio player UI/UX
This commit is contained in:
advplyr 2024-06-29 15:05:35 -05:00
parent c1349e586a
commit 31146082f0
6 changed files with 229 additions and 33 deletions

View file

@ -67,14 +67,20 @@ class MediaItemShare extends Model {
}
},
{
model: this.sequelize.models.libraryItem
model: this.sequelize.models.libraryItem,
include: {
model: this.sequelize.models.library,
attributes: ['settings']
}
}
]
})
const libraryItem = book.libraryItem
libraryItem.media = book
delete book.libraryItem
return this.sequelize.models.libraryItem.getOldLibraryItem(libraryItem)
const oldLibraryItem = this.sequelize.models.libraryItem.getOldLibraryItem(libraryItem)
oldLibraryItem.librarySettings = libraryItem.library.settings
return oldLibraryItem
}
return null
}