Fix:Catch exception when podcast episode download request fails #1759

This commit is contained in:
advplyr 2023-05-27 15:24:08 -05:00
parent b52e240025
commit 0678c26627

View File

@ -95,7 +95,12 @@ module.exports.downloadPodcastEpisode = (podcastEpisodeDownload) => {
method: 'GET',
responseType: 'stream',
timeout: 30000
}).catch((error) => {
Logger.error(`[ffmpegHelpers] Failed to download podcast episode with url "${podcastEpisodeDownload.url}"`, error)
return null
})
if (!response) return resolve(false)
const ffmpeg = Ffmpeg(response.data)
ffmpeg.outputOptions(