Fixes for db migration & local playback sessions

This commit is contained in:
advplyr 2023-07-16 15:05:51 -05:00
parent 63e5cf2e60
commit d99b2c25e8
13 changed files with 750 additions and 119 deletions

View file

@ -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,