mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-26 16:48:53 +01:00
Update dbMigration for old main library ids
This commit is contained in:
parent
0829237166
commit
2afd0e2acd
@ -1245,7 +1245,7 @@ async function handleOldUsers(ctx) {
|
|||||||
// Convert old library ids to new library ids
|
// Convert old library ids to new library ids
|
||||||
if (user.librariesAccessible?.length) {
|
if (user.librariesAccessible?.length) {
|
||||||
user.librariesAccessible = user.librariesAccessible.map(lid => {
|
user.librariesAccessible = user.librariesAccessible.map(lid => {
|
||||||
if (!lid.startsWith('lib_')) return lid // Already not an old library id so dont change
|
if (!lid.startsWith('lib_') && lid !== 'main') return lid // Already not an old library id so dont change
|
||||||
hasUpdates = true
|
hasUpdates = true
|
||||||
return oldDbIdMap.libraries[lid]
|
return oldDbIdMap.libraries[lid]
|
||||||
}).filter(lid => lid)
|
}).filter(lid => lid)
|
||||||
|
Loading…
Reference in New Issue
Block a user