mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 10:14:36 +02:00
Fix:Downloading podcast episode when file extension is mp3 but enclosure type is not mp3 #3711
This commit is contained in:
parent
e616b53877
commit
329bbea043
2 changed files with 22 additions and 1 deletions
|
@ -25,7 +25,9 @@ const LibraryItem = require('../objects/LibraryItem')
|
|||
|
||||
class PodcastManager {
|
||||
constructor() {
|
||||
/** @type {PodcastEpisodeDownload[]} */
|
||||
this.downloadQueue = []
|
||||
/** @type {PodcastEpisodeDownload} */
|
||||
this.currentDownload = null
|
||||
|
||||
this.failedCheckMap = {}
|
||||
|
@ -63,6 +65,11 @@ class PodcastManager {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {PodcastEpisodeDownload} podcastEpisodeDownload
|
||||
* @returns
|
||||
*/
|
||||
async startPodcastEpisodeDownload(podcastEpisodeDownload) {
|
||||
if (this.currentDownload) {
|
||||
this.downloadQueue.push(podcastEpisodeDownload)
|
||||
|
@ -106,7 +113,7 @@ class PodcastManager {
|
|||
}
|
||||
|
||||
let success = false
|
||||
if (this.currentDownload.urlFileExtension === 'mp3') {
|
||||
if (this.currentDownload.isMp3) {
|
||||
// Download episode and tag it
|
||||
success = await ffmpegHelpers.downloadPodcastEpisode(this.currentDownload).catch((error) => {
|
||||
Logger.error(`[PodcastManager] Podcast Episode download failed`, error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue