mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-24 17:59:06 +02:00
New data model fix library stats
This commit is contained in:
parent
57399bb79e
commit
eea3e2583c
8 changed files with 69 additions and 33 deletions
|
@ -286,7 +286,7 @@ async function migrateLibraryItems(db) {
|
|||
sessions = sessions.map(se => {
|
||||
var libraryItemWithAudiobook = libraryItems.find(li => li.media.getAudiobookById && !!li.media.getAudiobookById(se.mediaEntityId))
|
||||
if (!libraryItemWithAudiobook) {
|
||||
Logger.error('[dbMigration] Failed to find library item with audiobook id', audiobookId)
|
||||
Logger.error('[dbMigration] Failed to find library item with audiobook id', se.mediaEntityId)
|
||||
return null
|
||||
}
|
||||
se.libraryItemId = libraryItemWithAudiobook.id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue