Update:Podcast episode downloads using episode title as filename without prefixing episode num

This commit is contained in:
advplyr 2022-10-02 17:12:44 -05:00
parent 803c9699ef
commit 8563bdde74
2 changed files with 2 additions and 6 deletions

View File

@ -22,7 +22,7 @@ class PodcastEpisodeDownload {
toJSONForClient() {
return {
id: this.id,
episodeDisplayTitle: this.podcastEpisode ? this.podcastEpisode.bestFilename : null,
episodeDisplayTitle: this.podcastEpisode ? this.podcastEpisode.title : null,
url: this.url,
libraryItemId: this.libraryItem ? this.libraryItem.id : null,
isDownloading: this.isDownloading,
@ -35,7 +35,7 @@ class PodcastEpisodeDownload {
}
get targetFilename() {
return sanitizeFilename(`${this.podcastEpisode.bestFilename}.mp3`)
return sanitizeFilename(`${this.podcastEpisode.title}.mp3`)
}
get targetPath() {
return Path.join(this.libraryItem.path, this.targetFilename)

View File

@ -103,10 +103,6 @@ class PodcastEpisode {
return this.audioFile.duration
}
get size() { return this.audioFile.metadata.size }
get bestFilename() {
if (this.episode) return `${this.episode} - ${this.title}`
return this.title
}
get enclosureUrl() {
return this.enclosure ? this.enclosure.url : null
}