Add files via upload

This commit is contained in:
gutosie
2021-03-01 21:50:27 +02:00
committed by GitHub
parent 5a09c2974b
commit c38a4fb4ae

View File

@@ -838,6 +838,9 @@ class NeoBootImageChoose(Screen):
#os.system('date "+%Y%m%d" > /tmp/.finishdate') #os.system('date "+%Y%m%d" > /tmp/.finishdate')
#os.system(_('echo %s - %s > /tmp/MachineProcModel') % (getBoxModelVU(), getCPUSoC()) ) #os.system(_('echo %s - %s > /tmp/MachineProcModel') % (getBoxModelVU(), getCPUSoC()) )
if fileExists('/.multinfo'):
pass
else:
if fileExists('/tmp/.nkod'): if fileExists('/tmp/.nkod'):
pass pass
else: else:
@@ -1630,17 +1633,21 @@ def checkimage():
def main(session, **kwargs): def main(session, **kwargs):
vip = checkimage() vip = checkimage()
if vip == 1: if vip == 1:
if fileExists('' + LinkNeoBoot + '/.location'):
if not fileExists('' + LinkNeoBoot + '/.location'):
pass pass
else: else:
if not fileExists('%sImageBoot/.version' % getNeoLocation()): if not fileExists('%sImageBoot/.version' % getNeoLocation()):
if fileExists('' + LinkNeoBoot + '/files/mountpoint.sh'): if fileExists('' + LinkNeoBoot + '/files/mountpoint.sh'):
os.system('chmod 0755 ' + LinkNeoBoot + '/files/mountpoint.sh; ' + LinkNeoBoot + '/files/mountpoint.sh') os.system('chmod 0755 ' + LinkNeoBoot + '/files/mountpoint.sh; ' + LinkNeoBoot + '/files/mountpoint.sh')
else:
pass
if not fileExists('/.multinfo') and fileExists('' + LinkNeoBoot + '/.location'):
#check instalation #check instalation
from Plugins.Extensions.NeoBoot.files.stbbranding import getCheckInstal1, getCheckInstal2, getCheckInstal3 from Plugins.Extensions.NeoBoot.files.stbbranding import getCheckInstal1, getCheckInstal2, getCheckInstal3
if fileExists('/tmp/error_neo') and not fileExists('/.multinfo'): if fileExists('/tmp/error_neo') :
if fileExists('/tmp/error_neo') and not fileExists('/.multinfo'): if fileExists('/tmp/error_neo'):
os.system('rm -f /tmp/error_neo') os.system('rm -f /tmp/error_neo')
if getCheckInstal1() == '1': if getCheckInstal1() == '1':
os.system('echo "\nNeoboot installation errors 1:\nfile install is error - 1\n" >> /tmp/error_neo') os.system('echo "\nNeoboot installation errors 1:\nfile install is error - 1\n" >> /tmp/error_neo')
@@ -1652,7 +1659,6 @@ def main(session, **kwargs):
os.system('echo "\nNeoboot installation errors 3:\nfile neo.sh is error - 3\n" >> /tmp/error_neo') os.system('echo "\nNeoboot installation errors 3:\nfile neo.sh is error - 3\n" >> /tmp/error_neo')
session.open(MessageBox, _('Neoboot plugin installed with ERRORS! Not work properly! The error number is 3'), type=MessageBox.TYPE_ERROR) session.open(MessageBox, _('Neoboot plugin installed with ERRORS! Not work properly! The error number is 3'), type=MessageBox.TYPE_ERROR)
os.system('date "+%Y%m%d" > /tmp/.finishdate')
if not fileExists('/usr/lib/periodon/.kodn'): if not fileExists('/usr/lib/periodon/.kodn'):
session.open(MessageBox, _('Get a free test to the full vip version.'), type=MessageBox.TYPE_ERROR) session.open(MessageBox, _('Get a free test to the full vip version.'), type=MessageBox.TYPE_ERROR)
elif fileExists('/usr/lib/periodon/.kodn') and fileExists('/tmp/.nkod'): elif fileExists('/usr/lib/periodon/.kodn') and fileExists('/tmp/.nkod'):
@@ -1664,6 +1670,8 @@ def main(session, **kwargs):
session.open(MessageBox, _('Neoboot vip version has expired, please re-access.'), type=MessageBox.TYPE_ERROR) session.open(MessageBox, _('Neoboot vip version has expired, please re-access.'), type=MessageBox.TYPE_ERROR)
else: else:
pass pass
else:
pass
version = 0 version = 0
if fileExists('%sImageBoot/.version' % getNeoLocation()): if fileExists('%sImageBoot/.version' % getNeoLocation()):
@@ -1671,7 +1679,7 @@ def main(session, **kwargs):
version = float(f.read()) version = float(f.read())
f.close() f.close()
if fileExists('%sImageBoot/.neonextboot' % getNeoLocation()): if fileExists('' + LinkNeoBoot + '/.location') and fileExists('%sImageBoot/.neonextboot' % getNeoLocation()):
f2 = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'r' ) f2 = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'r' )
mypath2 = f2.readline().strip() mypath2 = f2.readline().strip()
f2.close() f2.close()
@@ -1685,10 +1693,12 @@ def main(session, **kwargs):
session.open(MessageBox, _('Sorry cannot open neo menu My Upgrade.\nAccess Fails with Error code 0x06.'), type=MessageBox.TYPE_ERROR) session.open(MessageBox, _('Sorry cannot open neo menu My Upgrade.\nAccess Fails with Error code 0x06.'), type=MessageBox.TYPE_ERROR)
else: else:
try: try:
#if checkInternet(): if checkInternet():
os.system('date "+%Y%m%d" > /tmp/.finishdate')
session.open(NeoBootImageChoose) session.open(NeoBootImageChoose)
#else: else:
#session.open(MessageBox, _('Geen internet'), type=MessageBox.TYPE_ERROR) #session.open(MessageBox, _('Geen internet'), type=MessageBox.TYPE_ERROR)
session.open(NeoBootImageChoose)
except Exception as e: except Exception as e:
loggscrash = time.localtime(time.time()) loggscrash = time.localtime(time.time())
LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e)))