mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-09 17:04:58 +02:00
New data model change of Book media type to include array of Audiobook and Ebook objects
This commit is contained in:
parent
0af6ad63c1
commit
4fe60465e5
13 changed files with 677 additions and 334 deletions
|
@ -3,6 +3,7 @@ const AudioFile = require('../files/AudioFile')
|
|||
class PodcastEpisode {
|
||||
constructor(episode) {
|
||||
this.id = null
|
||||
this.index = null
|
||||
this.podcastId = null
|
||||
this.episodeNumber = null
|
||||
|
||||
|
@ -17,6 +18,7 @@ class PodcastEpisode {
|
|||
|
||||
construct(episode) {
|
||||
this.id = episode.id
|
||||
this.index = episode.index
|
||||
this.podcastId = episode.podcastId
|
||||
this.episodeNumber = episode.episodeNumber
|
||||
this.audioFile = new AudioFile(episode.audioFile)
|
||||
|
@ -27,6 +29,7 @@ class PodcastEpisode {
|
|||
toJSON() {
|
||||
return {
|
||||
id: this.id,
|
||||
index: this.index,
|
||||
podcastId: this.podcastId,
|
||||
episodeNumber: this.episodeNumber,
|
||||
audioFile: this.audioFile.toJSON(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue