mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Fix:Add new podcast crash #920
This commit is contained in:
		
							parent
							
								
									3b961c424f
								
							
						
					
					
						commit
						33ae93e61e
					
				| @ -51,11 +51,6 @@ class LibraryItemController { | |||||||
| 
 | 
 | ||||||
|     var hasUpdates = libraryItem.update(req.body) |     var hasUpdates = libraryItem.update(req.body) | ||||||
|     if (hasUpdates) { |     if (hasUpdates) { | ||||||
|       // Turn on podcast auto download cron if not already on
 |  | ||||||
|       if (libraryItem.mediaType == 'podcast' && req.body.media.autoDownloadEpisodes && !this.podcastManager.episodeScheduleTask) { |  | ||||||
|         this.podcastManager.schedulePodcastEpisodeCron() |  | ||||||
|       } |  | ||||||
| 
 |  | ||||||
|       Logger.debug(`[LibraryItemController] Updated now saving`) |       Logger.debug(`[LibraryItemController] Updated now saving`) | ||||||
|       await this.db.updateLibraryItem(libraryItem) |       await this.db.updateLibraryItem(libraryItem) | ||||||
|       this.emitter('item_updated', libraryItem.toJSONExpanded()) |       this.emitter('item_updated', libraryItem.toJSONExpanded()) | ||||||
|  | |||||||
| @ -86,8 +86,8 @@ class PodcastController { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // Turn on podcast auto download cron if not already on
 |     // Turn on podcast auto download cron if not already on
 | ||||||
|     if (libraryItem.media.autoDownloadEpisodes && !this.podcastManager.episodeScheduleTask) { |     if (libraryItem.media.autoDownloadEpisodes) { | ||||||
|       this.podcastManager.schedulePodcastEpisodeCron() |       this.cronManager.checkUpdatePodcastCron(libraryItem) | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user