mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Adds a configuration for podcast feed and episode download timeout
This commit is contained in:
		
							parent
							
								
									727310ab75
								
							
						
					
					
						commit
						0d8d0a650b
					
				| @ -65,6 +65,12 @@ class Server { | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     if (process.env.PODCAST_DOWNLOAD_TIMEOUT) { | ||||
|       global.PodcastDownloadTimeout = process.env.PODCAST_DOWNLOAD_TIMEOUT | ||||
|     } else { | ||||
|       global.PodcastDownloadTimeout = 30000 | ||||
|     } | ||||
| 
 | ||||
|     if (!fs.pathExistsSync(global.ConfigPath)) { | ||||
|       fs.mkdirSync(global.ConfigPath) | ||||
|     } | ||||
|  | ||||
| @ -106,7 +106,7 @@ module.exports.downloadPodcastEpisode = (podcastEpisodeDownload) => { | ||||
|       headers: { | ||||
|         'User-Agent': 'audiobookshelf (+https://audiobookshelf.org)' | ||||
|       }, | ||||
|       timeout: 30000 | ||||
|       timeout: global.PodcastDownloadTimeout | ||||
|     }).catch((error) => { | ||||
|       Logger.error(`[ffmpegHelpers] Failed to download podcast episode with url "${podcastEpisodeDownload.url}"`, error) | ||||
|       return null | ||||
|  | ||||
| @ -238,7 +238,7 @@ module.exports.getPodcastFeed = (feedUrl, excludeEpisodeMetadata = false) => { | ||||
|   return axios({ | ||||
|     url: feedUrl, | ||||
|     method: 'GET', | ||||
|     timeout: 12000, | ||||
|     timeout: global.PodcastDownloadTimeout, | ||||
|     responseType: 'arraybuffer', | ||||
|     headers: { | ||||
|       Accept: 'application/rss+xml, application/xhtml+xml, application/xml, */*;q=0.8', | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user