mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-01 16:54:59 +02:00
Fixes for db migration & local playback sessions
This commit is contained in:
parent
63e5cf2e60
commit
d99b2c25e8
13 changed files with 750 additions and 119 deletions
|
@ -6,6 +6,7 @@ const { filePathToPOSIX } = require('../utils/fileUtils')
|
|||
class Library {
|
||||
constructor(library = null) {
|
||||
this.id = null
|
||||
this.oldLibraryId = null // TODO: Temp
|
||||
this.name = null
|
||||
this.folders = []
|
||||
this.displayOrder = 1
|
||||
|
@ -39,6 +40,7 @@ class Library {
|
|||
|
||||
construct(library) {
|
||||
this.id = library.id
|
||||
this.oldLibraryId = library.oldLibraryId
|
||||
this.name = library.name
|
||||
this.folders = (library.folders || []).map(f => new Folder(f))
|
||||
this.displayOrder = library.displayOrder || 1
|
||||
|
@ -74,6 +76,7 @@ class Library {
|
|||
toJSON() {
|
||||
return {
|
||||
id: this.id,
|
||||
oldLibraryId: this.oldLibraryId,
|
||||
name: this.name,
|
||||
folders: (this.folders || []).map(f => f.toJSON()),
|
||||
displayOrder: this.displayOrder,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue