Exemplo n.º 1
0
    def start(self):
        if utils.is_running():
            raise script_exceptions.AlreadyRunning

        utils.set_running()
        log.log("Starting GUI")
        log.log("Arch set to {}".format(config.arch))

        self.background = addon.get_bool_setting('background')
        self.verify_files = addon.get_bool_setting('verify_files')

        funcs.create_directory(libreelec.UPDATE_DIR)

        utils.check_update_files(builds.get_build_from_notify_file(),
                                 force_dialog=True)

        self.installed_build = self.get_installed_build()

        self.select_build()

        utils.remove_update_files()

        self.check_archive()

        self.maybe_download()

        self.maybe_verify()

        rpi.maybe_disable_overclock()

        utils.maybe_schedule_extlinux_update()

        utils.maybe_run_backup()

        self.confirm()
Exemplo n.º 2
0
    def start(self):
        if utils.is_running():
            raise script_exceptions.AlreadyRunning

        utils.set_running()
        log.log("Starting")

        builds.arch = utils.get_arch()
        log.log("Set arch to {}".format(builds.arch))

        if addon.get_bool_setting('set_timeout'):
            builds.timeout = float(addon.get_setting('timeout'))

        self.background = addon.get_bool_setting('background')
        self.verify_files = addon.get_bool_setting('verify_files')
        
        funcs.create_directory(openelec.UPDATE_DIR)

        utils.check_update_files(builds.get_build_from_notify_file(),
                                 force_dialog=True)

        self.installed_build = self.get_installed_build()

        self.select_build()

        utils.remove_update_files()

        self.check_archive()

        self.maybe_download()

        self.maybe_verify()

        rpi.maybe_disable_overclock()

        utils.maybe_schedule_extlinux_update()

        utils.maybe_run_backup()

        self.confirm()
Exemplo n.º 3
0
                    L10n(32030).format(utils.format_build(latest)), 4000)


log.log_version()
log.log("Script arguments: {}".format(sys.argv))

if addon.get_bool_setting('set_date_format'):
    config.date_fmt = funcs.strftime_fmt(addon.get_setting('date_format'))
else:
    config.date_fmt = xbmc.getRegion('dateshort')
log.log("Set date format to {}".format(config.date_fmt))

if len(sys.argv) > 1:
    if sys.argv[1] == 'checkperiodic':
        if addon.get_bool_setting('check'):
            selected = builds.get_build_from_notify_file()
            if not utils.check_update_files(selected):
                new_build_check()

    elif sys.argv[1] == 'checkonboot':
        if addon.get_bool_setting('check'):
            new_build_check()

    elif sys.argv[1] == 'confirm':
        selected = builds.get_build_from_notify_file()
        if selected:
            installed_build = builds.get_installed_build()
            utils.maybe_confirm_installation(selected, installed_build)
            funcs.remove_notify_file()
        else:
            log.log("No new installation")
Exemplo n.º 4
0
                             4000)


log.log_version()
log.log("Script arguments: {}".format(sys.argv))

if addon.get_bool_setting('set_date_format'):
    builds.date_fmt = funcs.strftime_fmt(addon.get_setting('date_format'))
else:
    builds.date_fmt = xbmc.getRegion('dateshort')
log.log("Set date format to {}".format(builds.date_fmt))

if len(sys.argv) > 1:
    if sys.argv[1] == 'checkperiodic':
        if addon.get_bool_setting('check'):
            selected = builds.get_build_from_notify_file()
            if not utils.check_update_files(selected):
                new_build_check()

    elif sys.argv[1] == 'checkonboot':
        if addon.get_bool_setting('check'):
            new_build_check()

    elif sys.argv[1] == 'confirm':
        selected = builds.get_build_from_notify_file()
        if selected:
            installed_build = builds.get_installed_build()
            utils.maybe_confirm_installation(selected, installed_build)
            funcs.remove_notify_file()
        else:
            log.log("No new installation")