mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Update podcast episode downloads to always attempt embedding meta tags regardless of format
This commit is contained in:
		
							parent
							
								
									fd4932cdbb
								
							
						
					
					
						commit
						a968aca304
					
				| @ -121,13 +121,11 @@ class PodcastManager { | ||||
|       await fs.mkdir(this.currentDownload.libraryItem.path) | ||||
|     } | ||||
| 
 | ||||
|     let success = false | ||||
|     if (this.currentDownload.isMp3) { | ||||
|     // Download episode and tag it
 | ||||
|     const ffmpegDownloadResponse = await ffmpegHelpers.downloadPodcastEpisode(this.currentDownload).catch((error) => { | ||||
|       Logger.error(`[PodcastManager] Podcast Episode download failed`, error) | ||||
|     }) | ||||
|       success = !!ffmpegDownloadResponse?.success | ||||
|     let success = !!ffmpegDownloadResponse?.success | ||||
| 
 | ||||
|     // If failed due to ffmpeg error, retry without tagging
 | ||||
|     // e.g. RSS feed may have incorrect file extension and file type
 | ||||
| @ -142,15 +140,6 @@ class PodcastManager { | ||||
|           return false | ||||
|         }) | ||||
|     } | ||||
|     } else { | ||||
|       // Download episode only
 | ||||
|       success = await downloadFile(this.currentDownload.url, this.currentDownload.targetPath) | ||||
|         .then(() => true) | ||||
|         .catch((error) => { | ||||
|           Logger.error(`[PodcastManager] Podcast Episode download failed`, error) | ||||
|           return false | ||||
|         }) | ||||
|     } | ||||
| 
 | ||||
|     if (success) { | ||||
|       success = await this.scanAddPodcastEpisodeAudioFile() | ||||
|  | ||||
| @ -63,16 +63,6 @@ class PodcastEpisodeDownload { | ||||
|     const enclosureType = this.rssPodcastEpisode.enclosure.type | ||||
|     return typeof enclosureType === 'string' ? enclosureType : null | ||||
|   } | ||||
|   /** | ||||
|    * RSS feed may have an episode with file extension of mp3 but the specified enclosure type is not mpeg. | ||||
|    * @see https://github.com/advplyr/audiobookshelf/issues/3711
 | ||||
|    * | ||||
|    * @returns {boolean} | ||||
|    */ | ||||
|   get isMp3() { | ||||
|     if (this.enclosureType && !this.enclosureType.includes('mpeg')) return false | ||||
|     return this.fileExtension === 'mp3' | ||||
|   } | ||||
|   get episodeTitle() { | ||||
|     return this.rssPodcastEpisode.title | ||||
|   } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user