From 8563bdde74e1b3023766798cf3dc387d262ba150 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 2 Oct 2022 17:12:44 -0500 Subject: [PATCH] Update:Podcast episode downloads using episode title as filename without prefixing episode num --- server/objects/PodcastEpisodeDownload.js | 4 ++-- server/objects/entities/PodcastEpisode.js | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/server/objects/PodcastEpisodeDownload.js b/server/objects/PodcastEpisodeDownload.js index 5a005869..8c6ee62d 100644 --- a/server/objects/PodcastEpisodeDownload.js +++ b/server/objects/PodcastEpisodeDownload.js @@ -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) diff --git a/server/objects/entities/PodcastEpisode.js b/server/objects/entities/PodcastEpisode.js index 47b1b4bf..36926045 100644 --- a/server/objects/entities/PodcastEpisode.js +++ b/server/objects/entities/PodcastEpisode.js @@ -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 }