Torrent Download:
- Supporto Serie ed episodi
This commit is contained in:
@@ -359,16 +359,16 @@ def get_environment():
|
||||
|
||||
|
||||
def list_env(environment={}):
|
||||
sep = '-----------------------------------------------------------'
|
||||
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(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'] + ' ' +
|
||||
@@ -381,45 +381,45 @@ def list_env(environment={}):
|
||||
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: ' +
|
||||
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'] + ' - Libre: ' +
|
||||
logger.info('Userdata: ' + environment['userdata_path'] + ' - Free: ' +
|
||||
environment['userdata_free'].replace('.', ',') + ' GB')
|
||||
|
||||
logger.info('Videoteca: Series/Epis: ' + environment['videolab_series'] + '/' +
|
||||
logger.info('Videolibrary: Series/Episodes: ' + environment['videolab_series'] + '/' +
|
||||
environment['videolab_episodios'] + ' - Pelis: ' +
|
||||
environment['videolab_pelis'] + ' - Upd: ' +
|
||||
environment['videolab_update'] + ' - Path: ' +
|
||||
environment['videolab_path'] + ' - Libre: ' +
|
||||
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('\\\\', '\\')))
|
||||
# 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('Proxy: ' + environment['proxy_active'])
|
||||
|
||||
logger.info('TAMAÑO del LOG: ' + environment['log_size'].replace('.', ',') + ' MB')
|
||||
logger.info("----------------------------------------------")
|
||||
logger.info('LOG Size: ' + environment['log_size'].replace('.', ',') + ' MB')
|
||||
logger.info(sep)
|
||||
|
||||
if environment['debug'] == 'False':
|
||||
logger.log_enable(False)
|
||||
|
||||
@@ -1342,6 +1342,7 @@ def torrent_client_installed(show_tuple=False):
|
||||
|
||||
def play_torrent(item, xlistitem, mediaurl):
|
||||
logger.info()
|
||||
# from core.support import dbg;dbg()
|
||||
import time
|
||||
from servers import torrent
|
||||
|
||||
@@ -1369,9 +1370,13 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
if torr_client in ['quasar', 'elementum'] and item.downloadFilename:
|
||||
torrent.elementum_download(item)
|
||||
else:
|
||||
time.sleep(3)
|
||||
xbmc.executebuiltin("PlayMedia(" + torrent_options[selection][1] % mediaurl + ")")
|
||||
|
||||
torrent.mark_auto_as_watched(item)
|
||||
torrent.mark_auto_as_watched(item)
|
||||
|
||||
while is_playing() and not xbmc.abortRequested:
|
||||
time.sleep(3)
|
||||
|
||||
|
||||
def log(texto):
|
||||
|
||||
Reference in New Issue
Block a user