mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-09 21:39:37 +00:00
Migrate to new library item in scanner
This commit is contained in:
parent
fdbca4feb6
commit
d5ce7b4939
21 changed files with 435 additions and 845 deletions
|
|
@ -87,13 +87,10 @@ class MediaItemShare extends Model {
|
|||
const libraryItemModel = this.sequelize.models.libraryItem
|
||||
|
||||
if (mediaItemType === 'book') {
|
||||
const libraryItem = await libraryItemModel.findOneExpanded(
|
||||
{ mediaId: mediaItemId },
|
||||
{
|
||||
model: this.sequelize.models.library,
|
||||
attributes: ['settings']
|
||||
}
|
||||
)
|
||||
const libraryItem = await libraryItemModel.findOneExpanded({ mediaId: mediaItemId }, null, {
|
||||
model: this.sequelize.models.library,
|
||||
attributes: ['settings']
|
||||
})
|
||||
|
||||
return libraryItem
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue