8.25 update pugin

This commit is contained in:
gutosie
2020-04-16 15:02:55 +03:00
committed by GitHub
parent 55258aaad6
commit 0bac7c6239

View File

@@ -149,31 +149,30 @@ class MyUpgrade2(Screen):
def startShow(self): def startShow(self):
self.activityTimer.start(10) self.activityTimer.start(10)
def updateInfo(self): def updateInfo(self):
self.activityTimer.stop() self.activityTimer.stop()
f2 = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'r') f2 = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'r')
mypath2 = f2.readline().strip() mypath2 = f2.readline().strip()
f2.close() f2.close()
if fileExists('/.multinfo'):
self.myClose(_('Sorry, NeoBoot can installed or upgraded only when booted from Flash.')) if mypath2 != 'Flash' or fileExists('/.multinfo'):
self.close() self.myClose(_('Sorry, NeoBoot can installed or upgraded only when booted from Flash STB'))
elif mypath2 != 'Flash':
self.myClose(_('Sorry, NeoBoot can installed or upgraded only when booted from Flash.'))
self.close() self.close()
else: else:
for fn in listdir('%sImageBoot' % getNeoLocation() ): for fn in listdir('%sImageBoot' % getNeoLocation() ):
dirfile = '%sImageBoot/ ' % getNeoLocation() + fn dirfile = '%sImageBoot/' % getNeoLocation() + fn
if isdir(dirfile): if isdir(dirfile):
target = dirfile + '' + LinkNeoBoot + '' target = dirfile + '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
cmd = 'rm -r ' + target + ' > /dev/null 2>&1' cmd = 'rm -r ' + target + ' > /dev/null 2>&1'
system(cmd) system(cmd)
cmd = 'cp -r ' + LinkNeoBoot + ' ' + target cmd = 'cp -r /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot ' + target
system(cmd) system(cmd)
out = open('%sImageBoot/.version' % getNeoLocation(), 'w')
out = open('%sImageBoot/.version' % getNeoLocation(), 'w')
out.write(PLUGINVERSION) out.write(PLUGINVERSION)
out.close() out.close()
self.myClose(_('NeoBoot successfully updated. You can restart the plugin now.\nHave fun !!!')) self.myClose(_('NeoBoot successfully updated. You can restart the plugin now.\nHave fun !!'))
def myClose(self, message): def myClose(self, message):
ImageChoose = self.session.open(NeoBootImageChoose) ImageChoose = self.session.open(NeoBootImageChoose)