fixes
This commit is contained in:
		
							parent
							
								
									730d1bf492
								
							
						
					
					
						commit
						f464681cde
					
				
							
								
								
									
										1516
									
								
								.idea/workspace.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1516
									
								
								.idea/workspace.xml
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										12
									
								
								functions.py
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								functions.py
									
									
									
									
									
								
							@ -28,6 +28,7 @@ import os
 | 
				
			|||||||
import json
 | 
					import json
 | 
				
			||||||
import urllib
 | 
					import urllib
 | 
				
			||||||
import hashlib
 | 
					import hashlib
 | 
				
			||||||
 | 
					import shutil
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import xbmcplugin
 | 
					import xbmcplugin
 | 
				
			||||||
import xbmcgui
 | 
					import xbmcgui
 | 
				
			||||||
@ -1586,7 +1587,16 @@ class DownloadDB:
 | 
				
			|||||||
    def _execute(self, sql):
 | 
					    def _execute(self, sql):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            self.cur.execute(sql)
 | 
					            self.cur.execute(sql)
 | 
				
			||||||
        except:
 | 
					        except Exception, e:
 | 
				
			||||||
 | 
					            if str(e)=='no such table: downloads':
 | 
				
			||||||
 | 
					                cur = self.db.cursor()
 | 
				
			||||||
 | 
					                cur.execute('pragma auto_vacuum=1')
 | 
				
			||||||
 | 
					                cur.execute(
 | 
				
			||||||
 | 
					                    'create table downloads(addtime integer PRIMARY KEY, title varchar(32), path varchar(32), type varchar(32), jsoninfo varchar(32), status varchar(32), torrent varchar(32), ind integer, lastupdate integer, storage varchar(32))')
 | 
				
			||||||
 | 
					                self.db.commit()
 | 
				
			||||||
 | 
					                cur.close()
 | 
				
			||||||
 | 
					                self.cur = self.db.cursor()
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
                self._close()
 | 
					                self._close()
 | 
				
			||||||
                Debug('[DownloadDB]: DELETE ' + str(self.filename))
 | 
					                Debug('[DownloadDB]: DELETE ' + str(self.filename))
 | 
				
			||||||
                xbmcvfs.delete(self.filename)
 | 
					                xbmcvfs.delete(self.filename)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user