Example #1
0
def configure_updates():
    global AUTO_UPDATE
    global MYAPP

    AUTO_UPDATE = int(CFG['General']['auto_update'])
    version_checker = version_check.CheckVersion()

    # Check for updates via GitHUB
    if version_checker.check_for_new_version() and AUTO_UPDATE:
        logger.info('Auto-Updating nzbToMedia, Please wait ...')
        if version_checker.update():
            # restart nzbToMedia
            try:
                del MYAPP
            except Exception:
                pass
            restart()
        else:
            logger.error(
                'Update failed, not restarting. Check your log for more information.'
            )

    # Set Current Version
    logger.info(
        'nzbToMedia Version:{version} Branch:{branch} ({system} {release})'.
        format(version=NZBTOMEDIA_VERSION,
               branch=GIT_BRANCH,
               system=platform.system(),
               release=platform.release()))
Example #2
0
def configure_updates():
    global AUTO_UPDATE
    global MYAPP

    AUTO_UPDATE = int(CFG['General']['auto_update'])
    version_checker = version_check.CheckVersion()

    # Check for updates via GitHUB
    if version_checker.check_for_new_version() and AUTO_UPDATE:
        logger.info('Auto-Updating nzbToMedia, Please wait ...')
        if version_checker.update():
            # restart nzbToMedia
            try:
                del MYAPP
            except Exception:
                pass
            restart()
        else:
            logger.error('Update failed, not restarting. Check your log for more information.')

    # Set Current Version
    logger.info('nzbToMedia Version:{version} Branch:{branch} ({system} {release})'.format
                (version=NZBTOMEDIA_VERSION, branch=GIT_BRANCH,
                 system=platform.system(), release=platform.release()))