Ejemplo n.º 1
0
def list_env(environment={}):
    if not environment:
        environment = get_environment()

    if environment['debug'] == 'False':
        logger.log_enable(True)

    logger.info('----------------------------------------------')
    logger.info('Variables de entorno Alfa: ' + environment['addon_version'] +
                ' Debug: ' + environment['debug'])
    logger.info("----------------------------------------------")
    logger.info('** OS Environ: %s' % os.environ)
    logger.info("----------------------------------------------")

    logger.info(environment['os_name'] + ' ' + environment['os_release'] +
                ' ' + environment['prod_model'] + ' ' +
                environment['machine'] + ' ' + environment['architecture'] +
                ' ' + environment['language'])

    logger.info('Kodi ' + environment['num_version'] + ', Vídeo: ' +
                environment['video_db'] + ', Python ' +
                environment['python_version'])

    if environment['cpu_usage']:
        logger.info('CPU: ' + environment['cpu_usage'])

    if environment['mem_total'] or environment['mem_free']:
        logger.info('Memoria: Total: ' + environment['mem_total'] +
                    ' MB / Disp.: ' + environment['mem_free'] +
                    ' MB / Buffers: ' +
                    str(int(environment['kodi_buffer']) * 3) +
                    ' MB / Buffermode: ' + environment['kodi_bmode'] +
                    ' / Readfactor: ' + environment['kodi_rfactor'])

    logger.info('Userdata: ' + environment['userdata_path'] + ' - Libre: ' +
                environment['userdata_free'].replace('.', ',') + ' GB' +
                ' - Idioma: ' + environment['torrent_lang'])

    logger.info('Videoteca: Series/Epis: ' + environment['videolab_series'] +
                '/' + environment['videolab_episodios'] + ' - Pelis: ' +
                environment['videolab_pelis'] + ' - Upd: ' +
                environment['videolab_update'] + ' - Path: ' +
                environment['videolab_path_perm'] + ' - Libre: ' +
                environment['videolab_free'].replace('.', ',') + ' GB')

    if environment['torrent_list']:
        for x, cliente in enumerate(environment['torrent_list']):
            if x == 0:
                cliente_alt = cliente.copy()
                del cliente_alt['Torrent_opt']
                logger.info('Torrent: Opt: %s, %s' % (str(cliente['Torrent_opt']), \
                            str(cliente_alt).replace('{', '').replace('}', '')\
                            .replace("'", '').replace('_', ' ')))
            elif x == 1 and environment['torrent_error']:
                logger.info('- ' + str(cliente).replace('{', '').replace('}', '')\
                            .replace("'", '').replace('_', ' '))
            else:
                cliente_alt = cliente.copy()
                del cliente_alt['Plug_in']
                cliente_alt['Libre'] = cliente_alt['Libre'].replace(
                    '.', ',') + ' GB'
                logger.info('- %s: %s' % (str(cliente['Plug_in']), str(cliente_alt)\
                            .replace('{', '').replace('}', '').replace("'", '')\
                            .replace('\\\\', '\\')))

    logger.info('Proxy: ' + environment['proxy_active'])

    logger.info('Assistant ver.: ' + environment['assistant_version'] + \
                            ' - Assistant UA: ' + environment['assistant_cf_ua'])

    logger.info('TAMAÑO del LOG: ' +
                environment['log_size'].replace('.', ',') + ' MB')
    logger.info("----------------------------------------------")

    if environment['debug'] == 'False':
        logger.log_enable(False)

    return environment
Ejemplo n.º 2
0
def list_env(environment={}):
    if not environment:
        environment = get_environment()

    if environment['debug'] == 'False':
        logger.log_enable(True)

    logger.info('----------------------------------------------')
    logger.info('Variables de entorno Alfa: ' + environment['addon_version'] +
                ' Debug: ' + environment['debug'])
    logger.info("----------------------------------------------")

    logger.info(environment['os_name'] + ' ' + environment['prod_model'] +
                ' ' + environment['os_release'] + ' ' +
                environment['machine'] + ' ' + environment['architecture'] +
                ' ' + environment['language'])

    logger.info('Kodi ' + environment['num_version'] + ', Vídeo: ' +
                environment['video_db'] + ', Python ' +
                environment['python_version'])

    if environment['cpu_usage']:
        logger.info('CPU: ' + environment['cpu_usage'])

    if environment['mem_total'] or environment['mem_free']:
        logger.info('Memoria: Total: ' + environment['mem_total'] +
                    ' MB / Disp.: ' + environment['mem_free'] +
                    ' MB / Buffers: ' +
                    str(int(environment['kodi_buffer']) * 3) +
                    ' MB / Buffermode: ' + environment['kodi_bmode'] +
                    ' / Readfactor: ' + environment['kodi_rfactor'])

    logger.info('Userdata: ' + environment['userdata_path'] + ' - Free: ' +
                environment['userdata_free'] + ' GB')

    logger.info('Videoteca: Series/Epis: ' + environment['videolab_series'] +
                '/' + environment['videolab_episodios'] + ' - Pelis: ' +
                environment['videolab_pelis'] + ' - Upd: ' +
                environment['videolab_update'] + ' - Path: ' +
                environment['videolab_path'] + ' - Free: ' +
                environment['videolab_free'] + ' GB')

    if environment['torrentcli_name']:
        torrentcli_buffer = environment['torrentcli_buffer']
        if environment['torrentcli_mem_size']:
            torrentcli_buffer += ' MB / memoria: ' + environment[
                'torrentcli_mem_size']
        logger.info('%s: ID: %s, buffer: ' %
                    (environment['torrentcli_name'],
                     environment['torrentcli_option']) + torrentcli_buffer +
                    ' MB / descargas: ' +
                    environment['torrentcli_dload_path'] + ' - Free: ' +
                    environment['torrentcli_free'] + ' GB')

    logger.info('Proxy: ' + environment['proxy_active'])

    logger.info('TAMAÑO del LOG: ' + environment['log_size'] + ' MB')
    logger.info("----------------------------------------------")

    if environment['debug'] == 'False':
        logger.log_enable(False)

    return environment
Ejemplo n.º 3
0
def list_env(environment={}):
    sep = '-----------------------------------------------------------'
    if not environment:
        environment = get_environment()

    if environment['debug'] == 'False':
        logger.log_enable(True)

    logger.info(sep)
    logger.info('KoD environment variables: ' + environment['addon_version'] +
                ' Debug: ' + environment['debug'])
    logger.info(sep)

    logger.info(environment['os_name'] + ' ' + environment['prod_model'] +
                ' ' + environment['os_release'] + ' ' +
                environment['machine'] + ' ' + environment['architecture'] +
                ' ' + environment['language'])

    logger.info('Kodi ' + environment['num_version'] + ', Vídeo: ' +
                environment['video_db'] + ', Python ' +
                environment['python_version'])

    if environment['cpu_usage']:
        logger.info('CPU: ' + environment['cpu_usage'])

    if environment['mem_total'] or environment['mem_free']:
        logger.info('Memory: Total: ' + environment['mem_total'] +
                    ' MB | Disp.: ' + environment['mem_free'] +
                    ' MB | Buffers: ' +
                    str(int(environment['kodi_buffer']) * 3) +
                    ' MB | Buffermode: ' + environment['kodi_bmode'] +
                    ' | Readfactor: ' + environment['kodi_rfactor'])

    logger.info('Userdata: ' + environment['userdata_path'] + ' - Free: ' +
                environment['userdata_free'].replace('.', ',') + ' GB')

    logger.info('Videolibrary: Series/Episodes: ' +
                environment['videolab_series'] + '/' +
                environment['videolab_episodios'] + ' - Pelis: ' +
                environment['videolab_pelis'] + ' - Upd: ' +
                environment['videolab_update'] + ' - Path: ' +
                environment['videolab_path'] + ' - Free: ' +
                environment['videolab_free'].replace('.', ',') + ' GB')

    # if environment['torrent_list']:
    #     for x, cliente in enumerate(environment['torrent_list']):
    #         if x == 0:
    #             cliente_alt = cliente.copy()
    #             del cliente_alt['Torrent_opt']
    #             logger.info('Torrent: Opt: %s, %s' % (str(cliente['Torrent_opt']), \
    #                                                   str(cliente_alt).replace('{', '').replace('}', '') \
    #                                                   .replace("'", '').replace('_', ' ')))
    #         elif x == 1 and environment['torrent_error']:
    #             logger.info('- ' + str(cliente).replace('{', '').replace('}', '') \
    #                         .replace("'", '').replace('_', ' '))
    #         else:
    #             cliente_alt = cliente.copy()
    #             del cliente_alt['Plug_in']
    #             cliente_alt['Libre'] = cliente_alt['Libre'].replace('.', ',') + ' GB'
    #             logger.info('- %s: %s' % (str(cliente['Plug_in']), str(cliente_alt) \
    #                                       .replace('{', '').replace('}', '').replace("'", '') \
    #                                       .replace('\\\\', '\\')))

    # logger.info('Proxy: ' + environment['proxy_active'])

    logger.info('LOG Size: ' + environment['log_size'].replace('.', ',') +
                ' MB')
    logger.info(sep)

    if environment['debug'] == 'False':
        logger.log_enable(False)

    return environment