remove executemany and use a for each -> execute
This commit is contained in:
		
							parent
							
								
									2483a9434d
								
							
						
					
					
						commit
						7e10077d33
					
				
							
								
								
									
										3
									
								
								db.py
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								db.py
									
									
									
									
									
								
							@ -71,8 +71,9 @@ class VVVVIDatabase():
 | 
			
		||||
	def insert_episodes(self, eps):
 | 
			
		||||
		con = sqlite3.connect(self.path)
 | 
			
		||||
		cur = con.cursor()
 | 
			
		||||
		for ep in eps:
 | 
			
		||||
			try:
 | 
			
		||||
			cur.executemany("INSERT INTO episodes (id, serie_id, season_id, type, cdn_url) VALUES (?, ?, ?, ?, ?);", eps)
 | 
			
		||||
				cur.execute("INSERT INTO episodes (id, serie_id, season_id, type, cdn_url) VALUES (?, ?, ?, ?, ?);", ep)
 | 
			
		||||
				con.commit()
 | 
			
		||||
				con.close()
 | 
			
		||||
				return True
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user