Fix:Private Patreon feed URLs getting encoded twice #1600

This commit is contained in:
advplyr 2023-03-14 15:38:19 -05:00
parent 40b808e73d
commit 8b557a0cb9

View File

@ -56,7 +56,14 @@ class PodcastEpisodeDownload {
setData(podcastEpisode, libraryItem, isAutoDownload, libraryId) {
this.id = getId('epdl')
this.podcastEpisode = podcastEpisode
this.url = encodeURI(podcastEpisode.enclosure.url)
const url = podcastEpisode.enclosure.url
if (decodeURIComponent(url) !== url) { // Already encoded
this.url = url
} else {
this.url = encodeURI(url)
}
this.libraryItem = libraryItem
this.isAutoDownload = isAutoDownload
this.createdAt = Date.now()