New data model change of Book media type to include array of Audiobook and Ebook objects

This commit is contained in:
advplyr 2022-03-16 19:15:25 -05:00
parent 0af6ad63c1
commit 4fe60465e5
13 changed files with 677 additions and 334 deletions

View file

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