mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
Update libraryItem model to include libraryId
This commit is contained in:
parent
d745e6b656
commit
633e83a4ab
7 changed files with 161 additions and 4 deletions
|
|
@ -601,6 +601,11 @@ function migrateLibraryItems(oldLibraryItems) {
|
|||
Logger.error(`[dbMigration] migrateLibraryItems: Old library folder id not found "${oldLibraryItem.folderId}"`)
|
||||
continue
|
||||
}
|
||||
const libraryId = oldDbIdMap.libraries[oldLibraryItem.libraryId]
|
||||
if (!libraryId) {
|
||||
Logger.error(`[dbMigration] migrateLibraryItems: Old library id not found "${oldLibraryItem.libraryId}"`)
|
||||
continue
|
||||
}
|
||||
|
||||
//
|
||||
// Migrate LibraryItem
|
||||
|
|
@ -622,6 +627,7 @@ function migrateLibraryItems(oldLibraryItems) {
|
|||
lastScanVersion: oldLibraryItem.scanVersion,
|
||||
createdAt: oldLibraryItem.addedAt,
|
||||
updatedAt: oldLibraryItem.updatedAt,
|
||||
libraryId,
|
||||
libraryFolderId
|
||||
}
|
||||
oldDbIdMap.libraryItems[oldLibraryItem.id] = LibraryItem.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue