mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-13 02:45:02 +02:00
Add db migration file to change audiobooks to library items with new data model
This commit is contained in:
parent
65793f7109
commit
b97ed953f7
17 changed files with 719 additions and 127 deletions
|
@ -22,12 +22,12 @@ class BookMetadata {
|
|||
construct(metadata) {
|
||||
this.title = metadata.title
|
||||
this.subtitle = metadata.subtitle
|
||||
this.authors = metadata.authors.map(a => ({ ...a }))
|
||||
this.narrators = [...metadata.narrators]
|
||||
this.series = metadata.series.map(s => ({ ...s }))
|
||||
this.genres = [...metadata.genres]
|
||||
this.publishedYear = metadata.publishedYear
|
||||
this.publishedDate = metadata.publishedDate
|
||||
this.authors = (metadata.authors && metadata.authors.map) ? metadata.authors.map(a => ({ ...a })) : []
|
||||
this.narrators = metadata.narrators ? [...metadata.narrators] : []
|
||||
this.series = (metadata.series && metadata.series.map) ? metadata.series.map(s => ({ ...s })) : []
|
||||
this.genres = metadata.genres ? [...metadata.genres] : []
|
||||
this.publishedYear = metadata.publishedYear || null
|
||||
this.publishedDate = metadata.publishedDate || null
|
||||
this.publisher = metadata.publisher
|
||||
this.description = metadata.description
|
||||
this.isbn = metadata.isbn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue