Use mark_state instead of doing the sql update here.
This commit is contained in:
		
							parent
							
								
									2f5ec40b89
								
							
						
					
					
						commit
						0562c51d6c
					
				
					 1 changed files with 1 additions and 5 deletions
				
			
		|  | @ -269,11 +269,7 @@ class YCDLDBVideoMixin: | ||||||
|         self.youtube_dl_function(video_id) |         self.youtube_dl_function(video_id) | ||||||
|         os.chdir(current_directory) |         os.chdir(current_directory) | ||||||
| 
 | 
 | ||||||
|         pairs = { |         video.mark_state('downloaded', commit=False) | ||||||
|             'id': video_id, |  | ||||||
|             'download': 'downloaded', |  | ||||||
|         } |  | ||||||
|         self.sql_update(table='videos', pairs=pairs, where_key='id') |  | ||||||
| 
 | 
 | ||||||
|         if commit: |         if commit: | ||||||
|             self.commit() |             self.commit() | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue