Ejemplo n.º 1
0
 def CBupdate(self, req):
     if req:
         config.pud.update_question.value = True
         self.startDownload(self.name, self.link, ConverDate(self.date))
     else:
         config.pud.update_question.value = False
     config.pud.save()
Ejemplo n.º 2
0
    def startTimerSetting(self):

        def OnDsl():
            try:
                urllib2.urlopen('http://www.google.de', None, 3)
                return (True and config.pud.showmessage.value)
            except:
                return False

            return

        if OnDsl():
            print "Programmlisten-Updater: CHECK FOR UPDATE"
            sList = DownloadSetting(self.url)
            for date, name, link in sList:
                if name == config.pud.satname.value:
                    lastdate = config.pud.lastdate.value
                    if date > ConverDateBack(lastdate):
                        self.date = date
                        self.name = name
                        self.link = link
                        yesno_default = config.pud.update_question.value
                        print "Programmlisten-Updater: NEW SETTINGS DXANDY"
                        if config.pud.just_update.value:
                            # Update without information
                            self.startDownload(self.name, self.link, ConverDate(self.date))
                        else:
                            # Auto update with confrimation
                            self.session.openWithCallback(self.CBupdate, MessageBox, _('New Setting DXAndy ') + name + _(' of ') + ConverDate(date) + _(' available !!' + "\n\n" + "Do you want to install the new settingslist?"), MessageBox.TYPE_YESNO, default=yesno_default, timeout=60)
                    else:
                        print "Programmlisten-Updater: NO NEW UPDATE AVAILBLE"
                    break
 
        self.TimerSetting()
Ejemplo n.º 3
0
 def SettingsMenu(self):
     self.listB = []
     for date, name, link in self.List:
         self.listB.append(
             self.ListEntryMenuSettings(str(name.title()), str(date),
                                        str(link), str(name),
                                        ConverDate(str(date))))
     if not self.listB:
         self.listB.append(
             self.ListEntryMenuSettings(_('Server down'), '', '', '', ''))
     self['MenuListSetting'].setList(self.listB)
Ejemplo n.º 4
0
 def Do_Restore(self):
     # Set Backup date
     date = ConverDate(self.filename[:6])
     config.pud.lastdate.value = date
     config.pud.save()
     configfile.save()
     # Remove current settingslist
     os.system('rm -rf /etc/enigma2/lamedb')
     os.system('rm -rf /etc/enigma2/*.radio')
     os.system('rm -rf /etc/enigma2/*.tv')
     # Restore settingslist
     os.system('tar -xzvf %s -C /' %
               (Directory + '/Settings/enigma2/' + self.filename))
     # Reload settingslist
     eDVBDB.getInstance().reloadServicelist()
     eDVBDB.getInstance().reloadBouquets()
     self.session.open(MessageBox,
                       _('Setting Restored ') + self.filename + _(' of ') +
                       date,
                       MessageBox.TYPE_INFO,
                       timeout=15)
     self.close()