change iteration to only drop the bad shows. Will get more specific after we get a data dump of a bad example
This commit is contained in:
		
							parent
							
								
									95f348f1fe
								
							
						
					
					
						commit
						68b7542bcb
					
				
					 1 changed files with 8 additions and 4 deletions
				
			
		|  | @ -35,10 +35,14 @@ class SonarrAPI(object): | ||||||
|             return |             return | ||||||
| 
 | 
 | ||||||
|         # Iteratively create a list of SonarrTVShow Objects from response json |         # Iteratively create a list of SonarrTVShow Objects from response json | ||||||
|         try: |         tv_shows = [] | ||||||
|             tv_shows = [SonarrTVShow(**show) for show in get] |         for show in get: | ||||||
|         except TypeError as e: |             try: | ||||||
|             self.logger.error('TypeError has occurred : %s while creating SonarrTVShow structure', e) |                 show_tuple = SonarrTVShow(**show) | ||||||
|  |                 tv_shows.append(show_tuple) | ||||||
|  |             except TypeError as e: | ||||||
|  |                 self.logger.error('TypeError has occurred : %s while creating SonarrTVShow structure for show', e) | ||||||
|  |         if not tv_shows: | ||||||
|             return |             return | ||||||
| 
 | 
 | ||||||
|         # Add show to missing list if file does not exist |         # Add show to missing list if file does not exist | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue