File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -210,8 +210,10 @@ def extract_addon_db(self,use_backup=False):
210210 success = False
211211 if use_backup :
212212 current_file = self .config .files .get ('db_zipped_backup' )
213+ alternate_file = self .config .files .get ('addon_data_db_zipped' )
213214 else :
214215 current_file = self .config .files .get ('addon_data_db_zipped' )
216+ alternate_file = self .config .files .get ('db_zipped_backup' )
215217 if current_file .exists ():
216218 my_archive = archive_tool .archive_tool (archive_file = str (current_file ),directory_out = str (self .config .files .get ('db' ).parent ),flatten_archive = True )
217219 xbmc .log (msg = 'IAGL: Extracting zipped db {} to path {}' .format (current_file ,self .config .files .get ('db' )),level = xbmc .LOGDEBUG )
@@ -221,8 +223,17 @@ def extract_addon_db(self,use_backup=False):
221223 else :
222224 success = False
223225 else :
224- xbmc .log (msg = 'IAGL: File not found: {}' .format (current_file ),level = xbmc .LOGDEBUG )
225- success = False
226+ if alternate_file .exists ():
227+ my_archive = archive_tool .archive_tool (archive_file = str (alternate_file ),directory_out = str (self .config .files .get ('db' ).parent ),flatten_archive = True )
228+ xbmc .log (msg = 'IAGL: Extracting zipped db {} to path {}' .format (alternate_file ,self .config .files .get ('db' )),level = xbmc .LOGDEBUG )
229+ extracted_files , result = my_archive .extract ()
230+ if result and self .config .files .get ('db' ).exists ():
231+ success = True
232+ else :
233+ success = False
234+ else :
235+ xbmc .log (msg = 'IAGL: File not found: {}' .format (current_file ),level = xbmc .LOGDEBUG )
236+ success = False
226237 return success
227238
228239 def check_db (self ):
You can’t perform that action at this time.
0 commit comments