mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-13 23:39:39 +00:00
Update Podcast Episode add libraryItemId, expanded returns audioTrack object
This commit is contained in:
parent
6e5e638076
commit
ac3fa31d1e
3 changed files with 21 additions and 7 deletions
|
|
@ -31,7 +31,11 @@ class Podcast {
|
|||
this.metadata = new PodcastMetadata(podcast.metadata)
|
||||
this.coverPath = podcast.coverPath
|
||||
this.tags = [...podcast.tags]
|
||||
this.episodes = podcast.episodes.map((e) => new PodcastEpisode(e))
|
||||
this.episodes = podcast.episodes.map((e) => {
|
||||
var podcastEpisode = new PodcastEpisode(e)
|
||||
podcastEpisode.libraryItemId = this.libraryItemId
|
||||
return podcastEpisode
|
||||
})
|
||||
this.autoDownloadEpisodes = !!podcast.autoDownloadEpisodes
|
||||
this.lastEpisodeCheck = podcast.lastEpisodeCheck || 0
|
||||
}
|
||||
|
|
@ -179,7 +183,7 @@ class Podcast {
|
|||
getDirectPlayTracklist(episodeId) {
|
||||
var episode = this.episodes.find(ep => ep.id === episodeId)
|
||||
if (!episode) return false
|
||||
return episode.getDirectPlayTracklist(this.libraryItemId)
|
||||
return episode.getDirectPlayTracklist()
|
||||
}
|
||||
|
||||
addPodcastEpisode(podcastEpisode) {
|
||||
|
|
@ -188,6 +192,7 @@ class Podcast {
|
|||
|
||||
addNewEpisodeFromAudioFile(audioFile, index) {
|
||||
var pe = new PodcastEpisode()
|
||||
pe.libraryItemId = this.libraryItemId
|
||||
pe.setDataFromAudioFile(audioFile, index)
|
||||
this.episodes.push(pe)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue