From a0c8bad6fa4f302e1f2934045e10685156f5e34c Mon Sep 17 00:00:00 2001 From: gutosie Date: Fri, 1 Apr 2022 10:22:54 +0300 Subject: [PATCH] Update plugin.py --- NeoBoot/plugin.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/NeoBoot/plugin.py b/NeoBoot/plugin.py index 10696e9..b0a500a 100644 --- a/NeoBoot/plugin.py +++ b/NeoBoot/plugin.py @@ -1618,29 +1618,25 @@ class NeoBootImageChoose(Screen): self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) def bootIMG(self): - count = 0 - for fn in listdir('' + getNeoLocation() + '/ImageBoot'): - dirfile = '' + getNeoLocation() + '/ImageBoot/' + fn - if os_isdir(dirfile): - count = count + 1 - if count > 1: - myerror = _('Sorry, this is not neoboot vip version.\nGet NEO-VIP version, more info press blue button.') - self.session.open(MessageBox, myerror, MessageBox.TYPE_INFO) - else: - self.bootIMG1() - - def bootIMG1(self): if getCheckActivateVip() == getBoxMacAddres(): self.bootIMG2() elif not fileExists('/.multinfo'): if ('1234%s' % getTestToTest()) == getAccessN(): self.bootIMG2() else: + count = 0 + for fn in listdir('' + getNeoLocation() + '/ImageBoot'): + dirfile = '' + getNeoLocation() + '/ImageBoot/' + fn + if os_isdir(dirfile): + count = count + 1 + if count > 1: myerror = _('Sorry, this is not neoboot vip version.\nGet NEO-VIP version, more info press blue button.') self.session.open(MessageBox, myerror, MessageBox.TYPE_INFO) + else: + self.bootIMG2() else: - self.bootIMG2() - + self.bootIMG2() + def bootIMG2(self): self.mysel = self['config'].getCurrent() if 'Flash' in self.mysel: