Hook up direct xci installation from google drive
@@ -214,8 +214,9 @@ def gdrive_install(filename,destiny="SD",outfolder=None,ch_medium=True,check_fw=
URL='https://www.googleapis.com/drive/v3/files/'+remote.ID+'?alt=media'
ext=name.split('.')
ext=ext[-1]
- if not name.endswith('nsp') and not name.endswith('nsz'):
- sys.exit(f"Extension not supported for direct instalation {ext} in {name}")
+ if not name.endswith('nsp') and not name.endswith('nsz') and not name.endswith('xci') and not name.endswith('xcz') :
+ print(f"Extension not supported for direct instalation {ext} in {name}")
+ return False
print("- Retrieving Space on device")
SD_ds,SD_fs,NAND_ds,NAND_fs,FW,device=get_storage_info()
print("- Calculating Installed size")
@@ -305,6 +306,10 @@ def gdrive_install(filename,destiny="SD",outfolder=None,ch_medium=True,check_fw=
listmanager.striplines(tfile,counter=True)
return False
except:pass
+ if name.endswith('xci') or name.endswith('xcz'):
+ from mtpxci_remote import install_xci_csv
+ install_xci_csv(remote=remote,destiny=destiny,cachefolder=outfolder)
+ else:
process=subprocess.Popen([nscb_mtp,"DriveInstall","-ori",URL,"-dst",destiny,"-name",name,"-size",sz,"-tk",token])
while process.poll()==None:
if process.poll()!=None:
@@ -323,8 +328,9 @@ def public_gdrive_install(filepath,destiny="SD",truecopy=True,outfolder=None,ch_
URL='https://www.googleapis.com/drive/v3/files/'+remote.ID+'?alt=media'
ext=name.split('.')
ext=ext[-1]
- if not name.endswith('nsp') and not name.endswith('nsz'):
- sys.exit(f"Extension not supported for direct instalation {ext} in {name}")
+ if not name.endswith('nsp') and not name.endswith('nsz') and not name.endswith('xci') and not name.endswith('xcz'):
+ print(f"Extension not supported for direct instalation {ext} in {name}")
+ return False
print("- Retrieving Space on device")
SD_ds,SD_fs,NAND_ds,NAND_fs,FW,device=get_storage_info()
print("- Calculating Installed size")
@@ -414,6 +420,10 @@ def public_gdrive_install(filepath,destiny="SD",truecopy=True,outfolder=None,ch_
listmanager.striplines(tfile,counter=True)
return False
except:pass
+ if name.endswith('xci') or name.endswith('xcz'):
+ from mtpxci_remote import install_xci_csv
+ install_xci_csv(remote=remote,destiny=destiny,cachefolder=outfolder)
+ else:
process=subprocess.Popen([nscb_mtp,"DriveInstall","-ori",URL,"-dst",destiny,"-name",name,"-size",sz,"-tk",token])
while process.poll()==None:
if process.poll()!=None:
