mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-11-07 16:44:16 +01:00
Update:Podcast episode downloads using episode title as filename without prefixing episode num
This commit is contained in:
parent
803c9699ef
commit
8563bdde74
@ -22,7 +22,7 @@ class PodcastEpisodeDownload {
|
|||||||
toJSONForClient() {
|
toJSONForClient() {
|
||||||
return {
|
return {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
episodeDisplayTitle: this.podcastEpisode ? this.podcastEpisode.bestFilename : null,
|
episodeDisplayTitle: this.podcastEpisode ? this.podcastEpisode.title : null,
|
||||||
url: this.url,
|
url: this.url,
|
||||||
libraryItemId: this.libraryItem ? this.libraryItem.id : null,
|
libraryItemId: this.libraryItem ? this.libraryItem.id : null,
|
||||||
isDownloading: this.isDownloading,
|
isDownloading: this.isDownloading,
|
||||||
@ -35,7 +35,7 @@ class PodcastEpisodeDownload {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get targetFilename() {
|
get targetFilename() {
|
||||||
return sanitizeFilename(`${this.podcastEpisode.bestFilename}.mp3`)
|
return sanitizeFilename(`${this.podcastEpisode.title}.mp3`)
|
||||||
}
|
}
|
||||||
get targetPath() {
|
get targetPath() {
|
||||||
return Path.join(this.libraryItem.path, this.targetFilename)
|
return Path.join(this.libraryItem.path, this.targetFilename)
|
||||||
|
@ -103,10 +103,6 @@ class PodcastEpisode {
|
|||||||
return this.audioFile.duration
|
return this.audioFile.duration
|
||||||
}
|
}
|
||||||
get size() { return this.audioFile.metadata.size }
|
get size() { return this.audioFile.metadata.size }
|
||||||
get bestFilename() {
|
|
||||||
if (this.episode) return `${this.episode} - ${this.title}`
|
|
||||||
return this.title
|
|
||||||
}
|
|
||||||
get enclosureUrl() {
|
get enclosureUrl() {
|
||||||
return this.enclosure ? this.enclosure.url : null
|
return this.enclosure ? this.enclosure.url : null
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user