diff --git a/core/videolibrarytools.py b/core/videolibrarytools.py index f616bde4..22fd7140 100644 --- a/core/videolibrarytools.py +++ b/core/videolibrarytools.py @@ -1053,8 +1053,8 @@ def emergency_urls(item, channel=None, path=None, headers={}): for url in item_res.emergency_urls[0]: #Recorremos las urls de emergencia... torrents_path = re.sub(r'(?:\.\w+$)', '_%s.torrent' % str(i).zfill(2), path) path_real = '' - if magnet_caching_e or not url.startswith('magnet'): - path_real = torrent.caching_torrents(url, referer, post, torrents_path=torrents_path, headers=headers) #... para descargar los .torrents + # if magnet_caching_e or not url.startswith('magnet'): + # path_real = torrent.caching_torrents(url, referer, post, torrents_path=torrents_path, headers=headers) #... para descargar los .torrents if path_real: #Si ha tenido éxito... item_res.emergency_urls[0][i-1] = path_real.replace(videolibrary_path, '') #se guarda el "path" relativo i += 1 diff --git a/lib/btserver/__init__.py b/lib/btserver/__init__.py deleted file mode 100644 index d8828c0f..00000000 --- a/lib/btserver/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# -*- coding: utf-8 -*- - -from client import Client - -__all__ = ["Client"] diff --git a/lib/btserver/cache.py b/lib/btserver/cache.py deleted file mode 100644 index 81605bdb..00000000 --- a/lib/btserver/cache.py +++ /dev/null @@ -1,92 +0,0 @@ -# -*- coding: utf-8 -*- -# ------------------------------------------------------------ -# Gestiona el cache del servidor torrent: -# Guarda los .torrent generado -# Guarda los .resume de cada torrent -# ------------------------------------------------------------ -import base64 -import os.path -import re -import traceback - -try: - import xbmc, xbmcgui -except: - pass - -from platformcode import config -LIBTORRENT_PATH = config.get_setting("libtorrent_path", server="torrent", default='') - -from servers import torrent as torr -lt, e, e1, e2 = torr.import_libtorrent(LIBTORRENT_PATH) - - -class Cache(object): - CACHE_DIR = '.cache' - - def __init__(self, path): - - if not os.path.isdir(path): - os.makedirs(path) - self.path = os.path.join(path, Cache.CACHE_DIR) - if not os.path.isdir(self.path): - os.makedirs(self.path) - - def _tname(self, info_hash): - return os.path.join(self.path, info_hash.upper() + '.torrent') - - def _rname(self, info_hash): - return os.path.join(self.path, info_hash.upper() + '.resume') - - def save_resume(self, info_hash, data): - f = open(self._rname(info_hash), 'wb') - f.write(data) - f.close() - - def get_resume(self, url=None, info_hash=None): - if url: - info_hash = self._index.get(url) - if not info_hash: - return - rname = self._rname(info_hash) - if os.access(rname, os.R_OK): - f = open(rname, 'rb') - v = f.read() - f.close() - return v - - def file_complete(self, torrent): - info_hash = str(torrent.info_hash()) - nt = lt.create_torrent(torrent) - tname = self._tname(info_hash) - f = open(tname, 'wb') - f.write(lt.bencode(nt.generate())) - f.close() - - def get_torrent(self, url=None, info_hash=None): - if url: - info_hash = self._index.get(url) - if not info_hash: - return - tname = self._tname(info_hash) - if os.access(tname, os.R_OK): - return tname - - magnet_re = re.compile('xt=urn:btih:([0-9A-Za-z]+)') - hexa_chars = re.compile('^[0-9A-F]+$') - - @staticmethod - def hash_from_magnet(m): - res = Cache.magnet_re.search(m) - if res: - ih = res.group(1).upper() - if len(ih) == 40 and Cache.hexa_chars.match(ih): - return res.group(1).upper() - elif len(ih) == 32: - s = base64.b32decode(ih) - return "".join("{:02X}".format(ord(c)) for c in s) - else: - raise ValueError('Not BT magnet link') - - else: - raise ValueError('Not BT magnet link') diff --git a/lib/btserver/client.py b/lib/btserver/client.py deleted file mode 100644 index 3233dfaf..00000000 --- a/lib/btserver/client.py +++ /dev/null @@ -1,669 +0,0 @@ -# -*- coding: utf-8 -*- - -import os -import pickle -import random -import time -import urllib - -try: - import xbmc, xbmcgui -except: - pass - -from platformcode import config, logger -LIBTORRENT_PATH = config.get_setting("libtorrent_path", server="torrent", default='') - -from servers import torrent as torr -lt, e, e1, e2 = torr.import_libtorrent(LIBTORRENT_PATH) - -from cache import Cache -from dispatcher import Dispatcher -from file import File -from handler import Handler -from monitor import Monitor -from resume_data import ResumeData -from server import Server - -try: - BUFFER = int(config.get_setting("bt_buffer", server="torrent", default="50")) -except: - BUFFER = 50 - config.set_setting("bt_buffer", "50", server="torrent") -DOWNLOAD_PATH = config.get_setting("bt_download_path", server="torrent", default=config.get_setting("downloadpath")) -BACKGROUND = config.get_setting("mct_background_download", server="torrent", default=True) -RAR = config.get_setting("mct_rar_unpack", server="torrent", default=True) -msg_header = 'Client Torrent BT' - - -class Client(object): - INITIAL_TRACKERS = ['udp://tracker.openbittorrent.com:80', - 'udp://tracker.istole.it:80', - 'udp://open.demonii.com:80', - 'udp://tracker.coppersurfer.tk:80', - 'udp://tracker.leechers-paradise.org:6969', - 'udp://exodus.desync.com:6969', - 'udp://tracker.publicbt.com:80', - 'http://tracker.torrentbay.to:6969/announce', - 'http://tracker.pow7.com/announce', - 'udp://tracker.ccc.de:80/announce', - 'udp://open.demonii.com:1337', - 'http://9.rarbg.com:2710/announce', - 'http://bt.careland.com.cn:6969/announce', - 'http://explodie.org:6969/announce', - 'http://mgtracker.org:2710/announce', - 'http://tracker.best-torrents.net:6969/announce', - 'http://tracker.tfile.me/announce', - 'http://tracker1.wasabii.com.tw:6969/announce', - 'udp://9.rarbg.com:2710/announce', - 'udp://9.rarbg.me:2710/announce', - 'udp://coppersurfer.tk:6969/announce', - 'http://www.spanishtracker.com:2710/announce', - 'http://www.todotorrents.com:2710/announce' - ] ### Added some trackers from MCT - - VIDEO_EXTS = {'.avi': 'video/x-msvideo', '.mp4': 'video/mp4', '.mkv': 'video/x-matroska', - '.m4v': 'video/mp4', '.mov': 'video/quicktime', '.mpg': 'video/mpeg', '.ogv': 'video/ogg', - '.ogg': 'video/ogg', '.webm': 'video/webm', '.ts': 'video/mp2t', '.3gp': 'video/3gpp', - '.rar': 'video/unrar'} - - def __init__(self, url=None, port=None, ip=None, auto_shutdown=True, wait_time=20, timeout=5, auto_delete=True, - temp_path=None, is_playing_fnc=None, print_status=False): - - # server - if port: - self.port = port - else: - self.port = random.randint(8000, 8099) - if ip: - self.ip = ip - else: - self.ip = "127.0.0.1" - self.server = Server((self.ip, self.port), Handler, client=self) - - # Options - if temp_path: - self.temp_path = temp_path - else: - self.temp_path = DOWNLOAD_PATH - self.is_playing_fnc = is_playing_fnc - self.timeout = timeout - self.auto_delete = auto_delete - self.wait_time = wait_time - self.auto_shutdown = auto_shutdown - self.buffer_size = BUFFER - self.first_pieces_priorize = BUFFER - self.last_pieces_priorize = 5 - self.state_file = "state" - try: - self.torrent_paramss = {'save_path': self.temp_path, 'storage_mode': lt.storage_mode_t.storage_mode_allocate} - except Exception as e: - try: - do = xbmcgui.Dialog() - e = e1 or e2 - do.ok(config.get_localized_string(30035) + 'BT Libtorrent', config.get_localized_string(30036), config.get_localized_string(60015), str(e)) - except: - pass - return - - # State - self.has_meta = False - self.meta = None - self.start_time = None - self.last_connect = 0 - self.connected = False - self.closed = False - self.file = None - self.files = None - self._th = None - self.seleccion = 0 - self.index = 0 - - # Sesion - self._cache = Cache(self.temp_path) - self._ses = lt.session() - #self._ses.listen_on(0, 0) ### ALFA: it blocks repro of some .torrents - # Cargamos el archivo de estado (si existe) - """ ### ALFA: it blocks repro of some .torrents - if os.path.exists(os.path.join(self.temp_path, self.state_file)): - try: - f = open(os.path.join(self.temp_path, self.state_file), "rb") - state = pickle.load(f) - self._ses.load_state(state) - f.close() - except: - pass - """ - - self._start_services() - - # Monitor & Dispatcher - self._monitor = Monitor(self) - if print_status: - self._monitor.add_listener(self.print_status) - self._monitor.add_listener(self._check_meta) - self._monitor.add_listener(self.save_state) - self._monitor.add_listener(self.priorize_start_file) - self._monitor.add_listener(self.announce_torrent) - - if self.auto_shutdown: - self._monitor.add_listener(self._auto_shutdown) - - self._dispatcher = Dispatcher(self) - self._dispatcher.add_listener(self._update_ready_pieces) - - # Iniciamos la URL - if url: - self.start_url(url) - - def set_speed_limits(self, download=0, upload=0): - """ - Función encargada de poner límites a la velocidad de descarga o subida - """ - if isinstance(download, int) and download > 0: - self._th.set_download_limit(download * 1024) - if isinstance(upload, int) and download > 0: - self._th.set_upload_limit(upload * 1024) - - def get_play_list(self): - """ - Función encargada de generar el playlist - """ - # Esperamos a lo metadatos - while not self.has_meta: - time.sleep(1) - - # Comprobamos que haya archivos de video - if self.files: - if len(self.files) > 1: - return "http://" + self.ip + ":" + str(self.port) + "/playlist.pls" - else: - return "http://" + self.ip + ":" + str(self.port) + "/" + urllib.quote(self.files[0].path) - - def get_files(self): - """ - Función encargada de genera el listado de archivos - """ - # Esperamos a lo metadatos - while not self.has_meta: - time.sleep(1) - files = [] - - # Comprobamos que haya archivos de video - if self.files: - # Creamos el dict con los archivos - for file in self.files: - n = file.path - u = "http://" + self.ip + ":" + str(self.port) + "/" + urllib.quote(n) - s = file.size - files.append({"name": n, "url": u, "size": s}) - - return files - - def _find_files(self, files, search=None): - """ - Función encargada de buscar los archivos reproducibles del torrent - """ - self.total_size = 0 - # Obtenemos los archivos que la extension este en la lista - videos = filter(lambda f: self.VIDEO_EXTS.has_key(os.path.splitext(f.path)[1]), files) - - if not videos: - raise Exception('No video files in torrent') - for v in videos: - self.total_size += v.size ### ALFA - videos[videos.index(v)].index = files.index(v) - return videos - - def set_file(self, f): - """ - Función encargada de seleccionar el archivo que vamos a servir y por tanto, priorizar su descarga - """ - # Seleccionamos el archivo que vamos a servir - fmap = self.meta.map_file(f.index, 0, 1) - self.file = File(f.path, self.temp_path, f.index, f.size, fmap, self.meta.piece_length(), self) - if self.seleccion < 0: ### ALFA - self.file.first_piece = 0 ### ALFA - self.file.last_piece = self.meta.num_pieces() ### ALFA - self.file.size = self.total_size ### ALFA - self.prioritize_file() - - def prioritize_piece(self, pc, idx): - """ - Función encargada de priorizar una determinada pieza - """ - piece_duration = 1000 - min_deadline = 2000 - dl = idx * piece_duration + min_deadline - """ ### ALFA - try: - self._th.set_piece_deadline(pc, dl, lt.deadline_flags.alert_when_available) - except: - pass - """ - - if idx == 0: - tail_pieces = 9 - # Piezas anteriores a la primera se desactivan - if (self.file.last_piece - pc) > tail_pieces: - for i in xrange(self.file.first_piece, pc): - self._th.piece_priority(i, 0) - self._th.reset_piece_deadline(i) - - # Piezas siguientes a la primera se activan - for i in xrange(pc + 1, self.file.last_piece + 1): - #self._th.piece_priority(i, 0) - self._th.piece_priority(i, 1) - - def prioritize_file(self): - """ - Función encargada de priorizar las piezas correspondientes al archivo seleccionado en la funcion set_file() - """ - priorities = [] - for i in xrange(self.meta.num_pieces()): - if i >= self.file.first_piece and i <= self.file.last_piece: - priorities.append(1) - else: - if self.index < 0: - priorities.append(1) ### ALFA - else: - priorities.append(0) ### ALFA - - self._th.prioritize_pieces(priorities) - - x = 0 - for i, _set in enumerate(self._th.piece_priorities()): - if _set > 0: x += 1 - #logger.info("***** Nº Pieza: %s: %s" % (i, str(_set))) - logger.info("***** Piezas %s : Activas: %s" % (str(i+1), str(x))) - logger.info("***** first_piece %s : last_piece: %s" % (str(self.file.first_piece), str(self.file.last_piece))) - - def download_torrent(self, url): - """ - Función encargada de descargar un archivo .torrent - """ - from core import httptools - - data = httptools.downloadpage(url).data - return data - - def start_url(self, uri): - """ - Función encargada iniciar la descarga del torrent desde la url, permite: - - Url apuntando a un .torrent - - Url magnet - - Archivo .torrent local - """ - - if self._th: - raise Exception('Torrent is already started') - - if uri.startswith('http://') or uri.startswith('https://'): - torrent_data = self.download_torrent(uri) - info = lt.torrent_info(lt.bdecode(torrent_data)) - tp = {'ti': info} - resume_data = self._cache.get_resume(info_hash=str(info.info_hash())) - if resume_data: - tp['resume_data'] = resume_data - - elif uri.startswith('magnet:'): - tp = {'url': uri} - resume_data = self._cache.get_resume(info_hash=Cache.hash_from_magnet(uri)) - if resume_data: - tp['resume_data'] = resume_data - - elif os.path.isfile(uri): - if os.access(uri, os.R_OK): - info = lt.torrent_info(uri) - tp = {'ti': info} - resume_data = self._cache.get_resume(info_hash=str(info.info_hash())) - if resume_data: - tp['resume_data'] = resume_data - else: - raise ValueError('Invalid torrent path %s' % uri) - else: - raise ValueError("Invalid torrent %s" % uri) - - tp.update(self.torrent_paramss) - self._th = self._ses.add_torrent(tp) - - for tr in self.INITIAL_TRACKERS: - self._th.add_tracker({'url': tr}) - - self._th.set_sequential_download(True) - self._th.force_reannounce() - self._th.force_dht_announce() - - self._monitor.start() - self._dispatcher.do_start(self._th, self._ses) - self.server.run() - - def stop(self): - """ - Función encargada de de detener el torrent y salir - """ - self._dispatcher.stop() - self._dispatcher.join() - self._monitor.stop() - self.server.stop() - self._dispatcher.stop() - if self._ses: - self._ses.pause() - if self._th: - self.save_resume() - self.save_state() - self._stop_services() - self._ses.remove_torrent(self._th, self.auto_delete) - del self._ses - self.closed = True - - def pause(self): - """ - Función encargada de de pausar el torrent - """ - self._ses.pause() - - def _start_services(self): - """ - Función encargada de iniciar los servicios de libtorrent: dht, lsd, upnp, natpnp - """ - self._ses.add_dht_router("router.bittorrent.com", 6881) - self._ses.add_dht_router("router.bitcomet.com", 554) - self._ses.add_dht_router("router.utorrent.com", 6881) - self._ses.add_dht_router("dht.transmissionbt.com",6881) ### from MCT - self._ses.start_dht() - self._ses.start_lsd() - self._ses.start_upnp() - self._ses.start_natpmp() - - def _stop_services(self): - """ - Función encargada de detener los servicios de libtorrent: dht, lsd, upnp, natpnp - """ - self._ses.stop_natpmp() - self._ses.stop_upnp() - self._ses.stop_lsd() - self._ses.stop_dht() - - def save_resume(self): - """ - Función encargada guardar los metadatos para continuar una descarga mas rapidamente - """ - if self._th.need_save_resume_data() and self._th.is_valid() and self.meta: - r = ResumeData(self) - start = time.time() - while (time.time() - start) <= 5: - if r.data or r.failed: - break - time.sleep(0.1) - if r.data: - self._cache.save_resume(self.unique_file_id, lt.bencode(r.data)) - - @property - def status(self): - """ - Función encargada de devolver el estado del torrent - """ - if self._th: - s = self._th.status() - # Download Rate - s._download_rate = s.download_rate / 1024 - - # Progreso del archivo - if self.file: - pieces = s.pieces[self.file.first_piece:self.file.last_piece] ### ALFA - progress = float(sum(pieces)) / len(pieces) - s.pieces_len = len(pieces) ### ALFA - s.pieces_sum = sum(pieces) ### ALFA - #logger.info('***** Estado piezas: %s' % pieces) - else: - progress = 0 - s.pieces_len = 0 ### ALFA - s.pieces_sum = 0 ### ALFA - - s.progress_file = progress * 100 - - # Tamaño del archivo - s.file_name = '' ### ALFA - s.seleccion = '' ### ALFA - - if self.file: - s.seleccion = self.seleccion ### ALFA - s.file_name = self.file.path ### ALFA - s.file_size = self.file.size / 1048576.0 - else: - s.file_size = 0 - - # Estado del buffer - if self.file and self.file.cursor: # Con una conexion activa: Disponible vs Posicion del reproductor - percent = len(self.file.cursor.cache) - percent = percent * 100 / self.buffer_size - s.buffer = int(percent) - - elif self.file: # Sin una conexion activa: Pre-buffer antes de iniciar - # El Pre-buffer consta de dos partes_ - # 1. Buffer al inicio del archivo para que el reproductor empieze sin cortes - # 2. Buffer al final del archivo (en algunos archivos el reproductor mira el final del archivo antes de comenzar) - bp = [] - - # El tamaño del buffer de inicio es el tamaño del buffer menos el tamaño del buffer del final - first_pieces_priorize = self.buffer_size - self.last_pieces_priorize - - # Comprobamos qué partes del buffer del inicio estan disponibles - for x in range(first_pieces_priorize): - if self._th.have_piece(self.file.first_piece + x): - bp.append(True) - else: - bp.append(False) - - # Comprobamos qué partes del buffer del final estan disponibles - for x in range(self.last_pieces_priorize): - if self._th.have_piece(self.file.last_piece - x): - bp.append(True) - else: - bp.append(False) - - s.buffer = int(sum(bp) * 100 / self.buffer_size) - - else: # Si no hay ningun archivo seleccionado: No hay buffer - s.buffer = 0 - - # Tiempo restante para cerrar en caso de tener el timeout activo - if self.auto_shutdown: - if self.connected: - if self.timeout: - s.timeout = int(self.timeout - (time.time() - self.last_connect - 1)) - if self.file and self.file.cursor: - s.timeout = self.timeout - if s.timeout < 0: s.timeout = "Cerrando" - else: - s.timeout = "---" - else: - if self.start_time and self.wait_time: - s.timeout = int(self.wait_time - (time.time() - self.start_time - 1)) - if s.timeout < 0: s.timeout = "Cerrando" - else: - s.timeout = "---" - - else: - s.timeout = "Off" - - # Estado de la descarga - STATE_STR = ['Queued', 'Checking', 'Downloading Metadata', \ - 'Downloading', 'Finalized', 'Seeding', 'Allocating', 'Checking Fastresume'] - s.str_state = STATE_STR[s.state] - - # Estado DHT - if self._ses.dht_state() is not None: - s.dht_state = "On" - s.dht_nodes = self._ses.status().dht_nodes - else: - s.dht_state = "Off" - s.dht_nodes = 0 - - # Cantidad de Trackers - s.trackers = len(self._th.trackers()) - - # Origen de los peers - s.dht_peers = 0 - s.trk_peers = 0 - s.pex_peers = 0 - s.lsd_peers = 0 - - for peer in self._th.get_peer_info(): - if peer.source & 1: - s.trk_peers += 1 - if peer.source & 2: - s.dht_peers += 1 - if peer.source & 4: - s.pex_peers += 1 - if peer.source & 8: - s.lsd_peers += 1 - - return s - - """ - Servicios: - - Estas funciones se ejecutan de forma automatica cada x tiempo en otro Thread. - - Estas funciones son ejecutadas mientras el torrent esta activo algunas pueden desactivarse - segun la configuracion como por ejemplo la escritura en el log - """ - - def _auto_shutdown(self, *args, **kwargs): - """ - Servicio encargado de autoapagar el servidor - """ - if self.file and self.file.cursor: - self.last_connect = time.time() - self.connected = True - - if self.is_playing_fnc and self.is_playing_fnc(): - self.last_connect = time.time() - self.connected = True - - if self.auto_shutdown: - # shudown por haber cerrado el reproductor - if self.connected and self.is_playing_fnc and not self.is_playing_fnc(): - if time.time() - self.last_connect - 1 > self.timeout: - self.stop() - - # shutdown por no realizar ninguna conexion - if (not self.file or not self.file.cursor) and self.start_time and self.wait_time and not self.connected: - if time.time() - self.start_time - 1 > self.wait_time: - self.stop() - - # shutdown tras la ultima conexion - if (not self.file or not self.file.cursor) and self.timeout and self.connected and not self.is_playing_fnc: - if time.time() - self.last_connect - 1 > self.timeout: - self.stop() - - def announce_torrent(self): - """ - Servicio encargado de anunciar el torrent - """ - self._th.force_reannounce() - self._th.force_dht_announce() - - def save_state(self): - """ - Servicio encargado de guardar el estado - """ - state = self._ses.save_state() - f = open(os.path.join(self.temp_path, self.state_file), 'wb') - pickle.dump(state, f) - f.close() - - def _update_ready_pieces(self, alert_type, alert): - """ - Servicio encargado de informar que hay una pieza disponible - """ - if alert_type == 'read_piece_alert' and self.file: - self.file.update_piece(alert.piece, alert.buffer) - - def _check_meta(self): - """ - Servicio encargado de comprobar si los metadatos se han descargado - """ - if self.status.state >= 3 and self.status.state <= 5 and not self.has_meta: - - # Guardamos los metadatos - self.meta = self._th.get_torrent_info() - - # Obtenemos la lista de archivos del meta - fs = self.meta.files() - if isinstance(fs, list): - files = fs - else: - files = [fs.at(i) for i in xrange(fs.num_files())] - - # Guardamos la lista de archivos - self.files = self._find_files(files) - - # Si hay varios vídeos (no RAR), se selecciona el vídeo o "todos" - lista = [] - seleccion = 0 - for file in self.files: - if '.rar' in str(file.path): - seleccion = -9 - lista += [os.path.split(str(file.path))[1]] - if len(lista) > 1 and seleccion >= 0: - d = xbmcgui.Dialog() - seleccion = d.select(msg_header + config.get_localized_string(30034), lista) - - if seleccion < 0: - index = 0 - self.index = seleccion - else: - index = seleccion - self.index = self.files[index].index - self.seleccion = seleccion - - # Marcamos el primer archivo como activo - self.set_file(self.files[index]) - - # Damos por iniciada la descarga - self.start_time = time.time() - - # Guardamos el .torrent en el cache - self._cache.file_complete(self._th.get_torrent_info()) - - self.has_meta = True - - def priorize_start_file(self): - ''' - Servicio encargado de priorizar el principio y final de archivo cuando no hay conexion - ''' - if self.file and not self.file.cursor: - num_start_pieces = self.buffer_size - self.last_pieces_priorize # Cantidad de piezas a priorizar al inicio - num_end_pieces = self.last_pieces_priorize # Cantidad de piezas a priorizar al final - - pieces_count = 0 - # Priorizamos las ultimas piezas - for y in range(self.file.last_piece - num_end_pieces, self.file.last_piece + 1): - if not self._th.have_piece(y): - self.prioritize_piece(y, pieces_count) - pieces_count += 1 - - # Priorizamos las primeras piezas - for y in range(self.file.first_piece, self.file.last_piece + 1): - if not self._th.have_piece(y): - if pieces_count == self.buffer_size: - break - self.prioritize_piece(y, pieces_count) - pieces_count += 1 - - def print_status(self): - ''' - Servicio encargado de mostrar en el log el estado de la descarga - ''' - s = self.status ### ALFA - if self.seleccion >= 0: - archivo = self.seleccion + 1 - else: - archivo = self.seleccion - - logger.info( - '%.2f%% de %.1fMB %s | %.1f kB/s | #%s %d%% | AutoClose: %s | S: %d(%d) P: %d(%d)) | TRK: %d DHT: %d PEX: %d LSD %d | DHT:%s (%d) | Trakers: %d | Pieces: %d (%d)' % \ - (s.progress_file, s.file_size, s.str_state, s._download_rate, archivo, s.buffer, s.timeout, s.num_seeds, \ - s.num_complete, s.num_peers, s.num_incomplete, s.trk_peers, s.dht_peers, s.pex_peers, s.lsd_peers, - s.dht_state, s.dht_nodes, s.trackers, s.pieces_sum, s.pieces_len)) ### ALFA diff --git a/lib/btserver/cursor.py b/lib/btserver/cursor.py deleted file mode 100644 index 5ecccfda..00000000 --- a/lib/btserver/cursor.py +++ /dev/null @@ -1,106 +0,0 @@ -# -*- coding: utf-8 -*- - -from threading import Lock, Event - - -class Cursor(object): - def __init__(self, file): - self._file = file - self.pos = 0 - self.timeout = 30 - self.cache_size = self._file._client.buffer_size - self.cache = {} - self.lock = Lock() - self.event = Event() - self.cache_first = 0 - - def fill_cache(self, first): - self.cache_first = first - - with self.lock: - for p in sorted(self.cache): - if p < first: del self.cache[p] - - self.event.clear() - for i in xrange(first, first + self.cache_size): - if i <= self._file.last_piece: - self._file._client.prioritize_piece(i, i - first) - - def has_piece(self, n): - with self.lock: - return n in self.cache - - def _wait_piece(self, pc_no): - while not self.has_piece(pc_no): - self.fill_cache(pc_no) - self.event.wait(self.timeout) - - def _get_piece(self, n): - with self.lock: - if not n in self.cache: - raise ValueError('index of of scope of current cache') - return self.cache[n] - - def get_piece(self, n): - self._wait_piece(n) - return self._get_piece(n) - - def close(self): - self._file.cursor = None - - def read(self, size=None): - data = "" - max_size = self._file.size - self.pos - if not size: - size = max_size - else: - size = min(size, max_size) - - if size: - pc_no, ofs = self._file.map_piece(self.pos) - data = self.get_piece(pc_no)[ofs: ofs + size] - - if len(data) < size: - remains = size - len(data) - pc_no += 1 - self.fill_cache(pc_no) - while remains and self.has_piece(pc_no): - sz = min(remains, self._file.piece_size) - data += self.get_piece(pc_no)[:sz] - remains -= sz - if remains: - pc_no += 1 - self.fill_cache(pc_no) - - self.pos += len(data) - - return data - - def seek(self, n): - if n > self._file.size: - n = self._file.size - elif n < 0: - raise ValueError('Seeking negative') - self.pos = n - - def tell(self): - return self.pos - - def update_piece(self, n, data): - with self.lock: - pcs = sorted(self.cache) - if len(pcs) < self.cache_size: - if len(pcs): - new = max(pcs) + 1 - else: - new = self.cache_first - if n == new: - self.cache[n] = data - if n == self.cache_first: - self.event.set() - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - self.close() diff --git a/lib/btserver/dispatcher.py b/lib/btserver/dispatcher.py deleted file mode 100644 index c0edfa01..00000000 --- a/lib/btserver/dispatcher.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- - -from monitor import Monitor - -import traceback - -try: - import xbmc, xbmcgui -except: - pass - -from platformcode import config -LIBTORRENT_PATH = config.get_setting("libtorrent_path", server="torrent", default='') - -from servers import torrent as torr -lt, e, e1, e2 = torr.import_libtorrent(LIBTORRENT_PATH) - - -class Dispatcher(Monitor): - def __init__(self, client): - super(Dispatcher, self).__init__(client) - - def do_start(self, th, ses): - self._th = th - self._ses = ses - self.start() - - def run(self): - if not self._ses: - raise Exception('Invalid state, session is not initialized') - - while self.running: - a = self._ses.wait_for_alert(1000) - if a: - alerts = self._ses.pop_alerts() - for alert in alerts: - with self.lock: - for cb in self.listeners: - cb(lt.alert.what(alert), alert) diff --git a/lib/btserver/file.py b/lib/btserver/file.py deleted file mode 100644 index 0d8d9742..00000000 --- a/lib/btserver/file.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- - -import os - -from cursor import Cursor - - -class File(object): - def __init__(self, path, base, index, size, fmap, piece_size, client): - self._client = client - self.path = path - self.base = base - self.index = index - self.size = size - - self.piece_size = piece_size - - self.full_path = os.path.join(base, path) - self.first_piece = fmap.piece - self.offset = fmap.start - self.last_piece = self.first_piece + max((size - 1 + fmap.start), 0) // piece_size - - self.cursor = None - - def create_cursor(self, offset=None): - self.cursor = Cursor(self) - if offset: - self.cursor.seek(offset) - return self.cursor - - def map_piece(self, ofs): - return self.first_piece + (ofs + self.offset) // self.piece_size, (ofs + self.offset) % self.piece_size - - def update_piece(self, n, data): - if self.cursor: - self.cursor.update_piece(n, data) - - def __str__(self): - return self.path diff --git a/lib/btserver/handler.py b/lib/btserver/handler.py deleted file mode 100644 index 7ddb9705..00000000 --- a/lib/btserver/handler.py +++ /dev/null @@ -1,135 +0,0 @@ -# -*- coding: utf-8 -*- - -import BaseHTTPServer -import os -import re -import time -import types -import urllib -import urlparse - -RANGE_RE = re.compile(r'bytes=(\d+)-') - - -def parse_range(range): # @ReservedAssignment - if range: - m = RANGE_RE.match(range) - if m: - try: - return int(m.group(1)) - except: - pass - return 0 - - -class Handler(BaseHTTPServer.BaseHTTPRequestHandler): - protocol_version = 'HTTP/1.1' - - def log_message(self, format, *args): - pass - - def do_GET(self): - if self.server.request: - self.server.request.wfile.close() - self.server.request = self - - if self.do_HEAD(): - f = self.server.file.create_cursor(self.offset) - while f == self.server.file.cursor: - buf = f.read(1024) - if buf: - try: - self.wfile.write(buf) - except: - break - else: - break - f.close() - - def send_pls(self, files): - playlist = "[playlist]\n\n" - for x, f in enumerate(files): - playlist += "File" + str(x + 1) + "=http://127.0.0.1:" + str(self.server._client.port) + "/" + urllib.quote( - f.path) + "\n" - playlist += "Title" + str(x + 1) + "=" + f.path + "\n" - playlist += "NumberOfEntries=" + str(len(files)) - playlist += "Version=2" - self.send_response(200, 'OK') - self.send_header("Content-Length", str(len(playlist))) - self.finish_header() - self.wfile.write(playlist) - - def do_HEAD(self): - url = urlparse.urlparse(self.path).path - - '''Whait to list of files ''' - while not self.server._client.files: - time.sleep(1) - - files = self.server._client.files - self.server.file = self.server._client.file - - '''Creates PLS playlist ''' - if url == "/playlist.pls": - self.send_pls(files) - return False - - '''Change File to download ''' - if not self.server.file or urllib.unquote(url) != '/' + self.server.file.path: - file = urllib.unquote(url) - client = self.server._client - for f in client.files: - if file == '/' + f.path: - client.set_file(f) - self.server.file = client.file - break - - while not self.server._client.has_meta: - time.sleep(1) - if self.server.file and urllib.unquote(url) == '/' + self.server.file.path: - self.offset = 0 - size, mime = self._file_info() - range = parse_range(self.headers.get('Range', None)) - if range: - self.offset = range - range = (range, size - 1, size) - - self.send_resp_header(mime, size, range) - return True - - else: - self.send_error(404, 'Not Found') - - def _file_info(self): - size = self.server.file.size - ext = os.path.splitext(self.server.file.path)[1] - mime = self.server._client.VIDEO_EXTS.get(ext) - if not mime: - mime = 'application/octet-stream' - return size, mime - - def send_resp_header(self, cont_type, cont_length, range=False): # @ReservedAssignment - if range: - self.send_response(206, 'Partial Content') - else: - self.send_response(200, 'OK') - - self.send_header('Content-Type', cont_type) - self.send_header('transferMode.dlna.org', 'Streaming') - self.send_header('contentFeatures.dlna.org', - 'DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000') - self.send_header('Accept-Ranges', 'bytes') - - if range: - if isinstance(range, (types.TupleType, types.ListType)) and len(range) == 3: - self.send_header('Content-Range', 'bytes %d-%d/%d' % range) - self.send_header('Content-Length', range[1] - range[0] + 1) - else: - raise ValueError('Invalid range value') - else: - self.send_header('Content-Length', cont_length) - self.finish_header() - - def finish_header(self): - self.send_header('Connection', 'close') - self.end_headers() diff --git a/lib/btserver/monitor.py b/lib/btserver/monitor.py deleted file mode 100644 index 9fd40c70..00000000 --- a/lib/btserver/monitor.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- - -from threading import Thread, Lock, Event - - -class Monitor(Thread): - def __init__(self, client): - Thread.__init__(self) - self.daemon = True - self.listeners = [] - self.lock = Lock() - self.wait_event = Event() - self.running = True - self.client = client - self.ses = None - self.client = client - - def stop(self): - self.running = False - self.wait_event.set() - - def add_listener(self, cb): - with self.lock: - if not cb in self.listeners: - self.listeners.append(cb) - - def remove_listener(self, cb): - with self.lock: - try: - self.listeners.remove(cb) - except ValueError: - pass - - def remove_all_listeners(self): - with self.lock: - self.listeners = [] - - def run(self): - while (self.running): - with self.lock: - for cb in self.listeners: - cb() - - self.wait_event.wait(1.0) diff --git a/lib/btserver/resume_data.py b/lib/btserver/resume_data.py deleted file mode 100644 index a0c9d3eb..00000000 --- a/lib/btserver/resume_data.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- - -class ResumeData(object): - def __init__(self, client): - self.data = None - self.failed = False - client._dispatcher.add_listener(self._process_alert) - client._th.save_resume_data() - - def _process_alert(self, t, alert): - if t == 'save_resume_data_failed_alert': - self.failed = True - - elif t == 'save_resume_data_alert': - self.data = alert.resume_data diff --git a/lib/btserver/server.py b/lib/btserver/server.py deleted file mode 100644 index 17afecd4..00000000 --- a/lib/btserver/server.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- - -import BaseHTTPServer -import traceback -from SocketServer import ThreadingMixIn -from threading import Thread - - -class Server(ThreadingMixIn, BaseHTTPServer.HTTPServer): - daemon_threads = True - timeout = 1 - - def __init__(self, address, handler, client): - BaseHTTPServer.HTTPServer.__init__(self, address, handler) - self._client = client - self.file = None - self.running = True - self.request = None - - def stop(self): - self.running = False - - def serve(self): - while self.running: - try: - self.handle_request() - except: - print traceback.format_exc() - - def run(self): - t = Thread(target=self.serve, name='HTTP Server') - t.daemon = True - t.start() - - def handle_error(self, request, client_address): - if not "socket.py" in traceback.format_exc(): - print traceback.format_exc() diff --git a/lib/generictools.py b/lib/generictools.py index bca3395e..cd16bac8 100644 --- a/lib/generictools.py +++ b/lib/generictools.py @@ -44,25 +44,25 @@ def update_title(item): """ Utilidad para desambiguar Títulos antes de añadirlos a la Videoteca. Puede ser llamado desde Videolibrarytools o desde Episodios en un Canal. Si se llama desde un canal, la llamada sería así (incluida en post_tmdb_episodios(item, itemlist)): - + #Permitimos la actualización de los títulos, bien para uso inmediato, o para añadir a la videoteca item.from_action = item.action #Salvamos la acción... item.from_title = item.title #... y el título itemlist.append(item.clone(title="** [COLOR limegreen]Actualizar Títulos - vista previa videoteca[/COLOR] **", action="actualizar_titulos", extra="episodios", tmdb_stat=False)) - + El canal deberá añadir un método para poder recibir la llamada desde Kodi/Alfa, y poder llamar a este método: - + def actualizar_titulos(item): logger.info() itemlist = [] from lib import generictools from platformcode import launcher - + item = generictools.update_title(item) #Llamamos al método que actualiza el título con tmdb.find_and_set_infoLabels - + #Volvemos a la siguiente acción en el canal return launcher.run(item) - + Para desambiguar títulos, se provoca que TMDB pregunte por el título realmente deseado, borrando los IDs existentes El usuario puede seleccionar el título entre los ofrecidos en la primera pantalla o puede cancelar e introducir un nuevo título en la segunda pantalla @@ -71,7 +71,7 @@ def update_title(item): Si se cancela la segunda pantalla, la variable "scraper_return" estará en False. El usuario no quiere seguir """ #logger.debug(item) - + #Restauramos y borramos las etiquetas intermedias (si se ha llamado desde el canal) if item.from_action: item.action = item.from_action @@ -98,9 +98,9 @@ def update_title(item): from_title_tmdb = item.contentTitle else: from_title_tmdb = item.contentSerieName - + #Sólo ejecutamos este código si no se ha hecho antes en el Canal. Por ejemplo, si se ha llamado desde Episodios o Findvideos, - #ya no se ejecutará al Añadia a Videoteca, aunque desde el canal se podrá llamar tantas veces como se quiera, + #ya no se ejecutará al Añadia a Videoteca, aunque desde el canal se podrá llamar tantas veces como se quiera, #o hasta que encuentre un título no ambiguo if item.tmdb_stat: if item.from_title_tmdb: del item.from_title_tmdb @@ -121,14 +121,14 @@ def update_title(item): if item.infoLabels['imdb_id'] or item.infoLabels['imdb_id'] == None: item.infoLabels['imdb_id'] = '' if item.infoLabels['season']: del item.infoLabels['season'] #Funciona mal con num. de Temporada. Luego lo restauramos item.infoLabels['year'] = '-' - + if item.from_title: if item.from_title_tmdb: if scrapertools.find_single_match(item.from_title_tmdb, '^(?:\[COLOR \w+\])?(.*?)(?:\[)'): from_title_tmdb = scrapertools.find_single_match(item.from_title_tmdb, '^(?:\[COLOR \w+\])?(.*?)(?:\[)').strip() item.title = item.title.replace(from_title_tmdb, item.from_title) item.infoLabels['title'] = item.from_title - + if item.from_title_tmdb: del item.from_title_tmdb if not item.from_update and item.from_title: del item.from_title @@ -137,7 +137,7 @@ def update_title(item): item.contentTitle = item.contentSerieName else: item.infoLabels['originaltitle'] = item.contentTitle - + scraper_return = scraper.find_and_set_infoLabels(item) if not scraper_return: #Si el usuario ha cancelado, restituimos los datos a la situación inicial y nos vamos @@ -194,12 +194,12 @@ def update_title(item): item.wanted = item.contentTitle if new_item.contentSeason: #Restauramos el núm. de Temporada después de TMDB item.contentSeason = new_item.contentSeason - + if item.from_update: #Si la llamda es desde el menú del canal... - item.from_update = True + item.from_update = True del item.from_update xlistitem = refresh_screen(item) #Refrescamos la pantallas con el nuevo Item - + #Para evitar el "efecto memoria" de TMDB, se le llama con un título ficticio para que resetee los buffers if item.contentSerieName: new_item.infoLabels['tmdb_id'] = '289' #una serie no ambigua @@ -209,21 +209,21 @@ def update_title(item): if new_item.contentSeason: del new_item.infoLabels['season'] #Funciona mal con num. de Temporada scraper_return = scraper.find_and_set_infoLabels(new_item) - + #logger.debug(item) - + return item - + def refresh_screen(item): logger.info() - + """ #### Compatibilidad con Kodi 18 #### - + Refresca la pantalla con el nuevo Item después que haber establecido un dialogo que ha causado el cambio de Item Crea un xlistitem para engañar a Kodi con la función xbmcplugin.setResolvedUrl FALSE - + Entrada: item: El Item actualizado Salida: xlistitem El xlistitem creado, por si resulta de alguna utilidad posterior """ @@ -231,7 +231,7 @@ def refresh_screen(item): try: import xbmcplugin import xbmcgui - + xlistitem = xbmcgui.ListItem(path=item.url) #Creamos xlistitem por compatibilidad con Kodi 18 if config.get_platform(True)['num_version'] >= 16.0: xlistitem.setArt({"thumb": item.contentThumbnail}) #Cargamos el thumb @@ -243,34 +243,34 @@ def refresh_screen(item): time.sleep(1) #Dejamos tiempo para que se ejecute except: logger.error(traceback.format_exc()) - + platformtools.itemlist_update(item) #refrescamos la pantalla con el nuevo Item - + return xlistitem - - + + def post_tmdb_listado(item, itemlist): logger.info() itemlist_fo = [] - + """ - + Pasada para maquillaje de los títulos obtenidos desde TMDB en Listado y Listado_Búsqueda. - + Toma de infoLabel todos los datos de interés y los va situando en diferentes variables, principalmente título para que sea compatible con Unify, y si no se tienen Títulos Inteligentes, para que el formato sea lo más parecido al de Unify. - + También restaura varios datos salvados desde el título antes de pasarlo por TMDB, ya que mantenerlos no habría encontrado el título (title_subs) - + La llamada al método desde Listado o Listado_Buscar, despues de pasar Itemlist pot TMDB, es: - + from lib import generictools item, itemlist = generictools.post_tmdb_listado(item, itemlist) - + """ #logger.debug(item) - + #Borramos valores si ha habido fail-over channel_alt = '' if item.channel_alt: @@ -288,7 +288,7 @@ def post_tmdb_listado(item, itemlist): #item_local.title = re.sub(r'online|descarga|downloads|trailer|videoteca|gb|autoplay', '', item_local.title, flags=re.IGNORECASE).strip() title = item_local.title #logger.debug(item_local) - + item_local.last_page = 0 del item_local.last_page #Borramos restos de paginación @@ -306,11 +306,11 @@ def post_tmdb_listado(item, itemlist): del item_local.library_filter_show if item_local.channel_host: del item_local.channel_host - + #Ajustamos el nombre de la categoría if item_local.channel == channel_py: item_local.category = scrapertools.find_single_match(item_local.url, 'http.?\:\/\/(?:www.)?(\w+)\.\w+\/').capitalize() - + #Restauramos la info adicional guarda en la lista title_subs, y la borramos de Item title_add = ' ' if item_local.title_subs: @@ -339,13 +339,13 @@ def post_tmdb_listado(item, itemlist): except: logger.error(traceback.format_exc()) - __modo_grafico__ = config.get_setting('modo_grafico', item.channel) - + __modo_grafico__ = config.get_setting('modo_grafico', item.channel) + # Si TMDB no ha encontrado el vídeo limpiamos el año if item_local.infoLabels['year'] == "-": item_local.infoLabels['year'] = '' item_local.infoLabels['aired'] = '' - + #Si traía el TMDB-ID, pero no ha funcionado, lo reseteamos e intentamos de nuevo if item_local.infoLabels['tmdb_id'] and not item_local.infoLabels['originaltitle']: logger.error("*** TMDB-ID erroneo, reseteamos y reintentamos ***") @@ -356,7 +356,7 @@ def post_tmdb_listado(item, itemlist): except: logger.error(traceback.format_exc()) logger.error(item_local) - + # Si TMDB no ha encontrado nada y hemos usado el año de la web, lo intentamos sin año if not item_local.infoLabels['tmdb_id']: if item_local.infoLabels['year']: #lo intentamos de nuevo solo si había año, puede que erroneo @@ -383,16 +383,16 @@ def post_tmdb_listado(item, itemlist): item_local.title = item_local.from_title item_local.title = re.sub(r'(?i)online|descarga|downloads|trailer|videoteca|gb|autoplay', '', item_local.title).strip() title = item_local.title - + #Limpiamos calidad de títulos originales que se hayan podido colar if item_local.infoLabels['originaltitle'].lower() in item_local.quality.lower(): item_local.quality = re.sub(item_local.infoLabels['originaltitle'], '', item_local.quality) #item_local.quality = re.sub(item_local.infoLabels['originaltitle'], '', item_local.quality, flags=re.IGNORECASE) - + # Preparamos el título para series, con los núm. de temporadas, si las hay if item_local.contentType in ['season', 'tvshow', 'episode']: if item_local.contentType == "episode": - + #Si no está el título del episodio, pero sí está en "title", lo rescatamos if not item_local.infoLabels['episodio_titulo'] and item_local.infoLabels['title'].lower() != item_local.infoLabels['tvshowtitle'].lower(): item_local.infoLabels['episodio_titulo'] = item_local.infoLabels['title'] @@ -404,16 +404,16 @@ def post_tmdb_listado(item, itemlist): title = title.replace("99", str(item_local.infoLabels['temporada_num_episodios'])) title = '%s %s' % (title, item_local.contentSerieName) item_local.infoLabels['episodio_titulo'] = '%s - %s [%s] [%s]' % (scrapertools.find_single_match(title, r'(al \d+)'), item_local.contentSerieName, item_local.infoLabels['year'], rating) - + elif item_local.infoLabels['episodio_titulo']: title = '%s %s, %s' % (title, item_local.infoLabels['episodio_titulo'], item_local.contentSerieName) item_local.infoLabels['episodio_titulo'] = '%s, %s [%s] [%s]' % (item_local.infoLabels['episodio_titulo'], item_local.contentSerieName, item_local.infoLabels['year'], rating) - + else: #Si no hay título de episodio, ponermos el nombre de la serie if item_local.contentSerieName not in title: title = '%s %s' % (title, item_local.contentSerieName) item_local.infoLabels['episodio_titulo'] = '%s [%s] [%s]' % (item_local.contentSerieName, item_local.infoLabels['year'], rating) - + if not item_local.contentSeason or not item_local.contentEpisodeNumber: if "Episodio" in title_add: item_local.contentSeason, item_local.contentEpisodeNumber = scrapertools.find_single_match(title_add, 'Episodio (\d+)x(\d+)') @@ -434,11 +434,11 @@ def post_tmdb_listado(item, itemlist): elif item.action == "search" or item.extra == "search": title += " -Serie-" - + if (item_local.extra == "varios" or item_local.extra == "documentales") and (item.action == "search" or item.extra == "search" or item.action == "listado_busqueda"): title += " -Varios-" item_local.contentTitle += " -Varios-" - + title += title_add #Se añaden etiquetas adicionales, si las hay #Ahora maquillamos un poco los titulos dependiendo de si se han seleccionado títulos inteleigentes o no @@ -447,14 +447,14 @@ def post_tmdb_listado(item, itemlist): else: #Si Titulos Inteligentes SÍ seleccionados: title = title.replace("[", "-").replace("]", "-").replace(".", ",").replace("GB", "G B").replace("Gb", "G b").replace("gb", "g b").replace("MB", "M B").replace("Mb", "M b").replace("mb", "m b") - + #Limpiamos las etiquetas vacías if item_local.infoLabels['episodio_titulo']: item_local.infoLabels['episodio_titulo'] = item_local.infoLabels['episodio_titulo'].replace(" []", "").strip() title = title.replace("--", "").replace(" []", "").replace("()", "").replace("(/)", "").replace("[/]", "").strip() title = re.sub(r'\s?\[COLOR \w+\]\[\[?\s?\]?\]\[\/COLOR\]', '', title).strip() title = re.sub(r'\s?\[COLOR \w+\]\s?\[\/COLOR\]', '', title).strip() - + if item.category_new == "newest": #Viene de Novedades. Marcamos el título con el nombre del canal if scrapertools.find_single_match(item_local.url, 'http.?\:\/\/(?:www.)?(\w+)\.\w+\/'): title += ' -%s-' % scrapertools.find_single_match(item_local.url, 'http.?\:\/\/(?:www.)?(\w+)\.\w+\/').capitalize() @@ -470,64 +470,64 @@ def post_tmdb_listado(item, itemlist): item_local.contentSeason, item_local.contentEpisodeNumber = scrapertools.find_single_match(title_add, 'Episodio (\d+)x(\d+)') item_local.title = title - + #logger.debug("url: " + item_local.url + " / title: " + item_local.title + " / content title: " + item_local.contentTitle + "/" + item_local.contentSerieName + " / calidad: " + item_local.quality + "[" + str(item_local.language) + "]" + " / year: " + str(item_local.infoLabels['year'])) - + #logger.debug(item_local) - + #Si intervención judicial, alerto!!! if item.intervencion: for clone_inter, autoridad in item.intervencion: thumb_intervenido = get_thumb(autoridad) itemlist_fo.append(item.clone(action='', title="[COLOR yellow]" + clone_inter.capitalize() + ': [/COLOR]' + intervenido_judicial + '. Reportar el problema en el foro', thumbnail=thumb_intervenido)) del item.intervencion - + #Si ha habido fail-over, lo comento if channel_alt and item.category_new != "newest": itemlist_fo.append(item.clone(action='', title="[COLOR yellow]" + item.category + '[/COLOR] [ALT ] en uso')) itemlist_fo.append(item.clone(action='', title="[COLOR yellow]" + channel_alt.capitalize() + '[/COLOR] inaccesible')) - + if len(itemlist_fo) > 0: itemlist = itemlist_fo + itemlist - + del item.category_new - + return (item, itemlist) def post_tmdb_seasons(item, itemlist): logger.info() - + """ - + Pasada para gestión del menú de Temporadas de una Serie - + La clave de activación de este método es la variable item.season_colapse que pone el canal en el Item de Listado. Esta variable tendrá que desaparecer cuando se añada a la Videoteca para que se analicen los episodios de la forma tradicional - + Repasa todos los episodios producidos en itemlist por "episodios" del canal para extraer las temporadas. Pone un título para Todas la Temps. Crea un menú con las diferentes temporadas, así como con los títulos de Actualización de Título y de Añadir a Videoteca Si ha habido un Fail-over o una Intervención Judicial, también lo anuncia - + La llamada al método desde Episodios, antes de pasar Itemlist pot TMDB, es: - + from lib import generictools item, itemlist = generictools.post_tmdb_seasons(item, itemlist) - + Si solo hay una temporada, devuelte el itemlist original para que se pinten los episodios de la forma tradicional - + """ #logger.debug(item) - + season = 0 itemlist_temporadas = [] itemlist_fo = [] - + if config.get_setting("no_pile_on_seasons", 'videolibrary') == 2: #Si no se quiere mostrar por temporadas, nos vamos... if item.season_colapse: #Quitamos el indicador de listado por Temporadas del item.season_colapse return (item, itemlist) - + #Restauramos valores si ha habido fail-over channel_alt = '' if item.channel == channel_py: @@ -544,21 +544,21 @@ def post_tmdb_seasons(item, itemlist): if item.url_alt: item.url = item.url_alt del item.url_alt - + # Primero creamos un título para TODAS las Temporadas # Pasada por TMDB a Serie, para datos adicionales try: tmdb.set_infoLabels(item, True) #TMDB de cada Temp except: logger.error(traceback.format_exc()) - + item_season = item.clone() if item_season.season_colapse: #Quitamos el indicador de listado por Temporadas del item_season.season_colapse title = '** Todas las Temporadas' #Agregamos título de TODAS las Temporadas (modo tradicional) if item_season.infoLabels['number_of_episodes']: #Ponemos el núm de episodios de la Serie title += ' [%sx%s epi]' % (str(item_season.infoLabels['number_of_seasons']), str(item_season.infoLabels['number_of_episodes'])) - + rating = '' #Ponemos el rating, si es diferente del de la Serie if item_season.infoLabels['rating'] and item_season.infoLabels['rating'] != 0.0: try: @@ -568,16 +568,16 @@ def post_tmdb_seasons(item, itemlist): logger.error(traceback.format_exc()) if rating and rating == 0.0: rating = '' - + if not config.get_setting("unify"): #Si Titulos Inteligentes NO seleccionados: title = '%s [COLOR yellow][%s][/COLOR] [%s] [COLOR limegreen][%s][/COLOR] [COLOR red]%s[/COLOR]' % (title, str(item_season.infoLabels['year']), rating, item_season.quality, str(item_season.language)) else: #Lo arreglamos un poco para Unify title = title.replace('[', '-').replace(']', '-').replace('.', ',').strip() title = title.replace("--", "").replace("[]", "").replace("()", "").replace("(/)", "").replace("[/]", "").strip() - + if config.get_setting("show_all_seasons", 'videolibrary'): itemlist_temporadas.append(item_season.clone(title=title, from_title_season_colapse=item.title)) - + #Repasamos todos los episodios para detectar las diferentes temporadas for item_local in itemlist: if item_local.contentSeason != season: @@ -586,22 +586,22 @@ def post_tmdb_seasons(item, itemlist): item_season.contentSeason = item_local.contentSeason #Se pone el núm de Temporada para obtener mejores datos de TMDB item_season.title = 'Temporada %s' % item_season.contentSeason itemlist_temporadas.append(item_season.clone(from_title_season_colapse=item.title)) - + #Si hay más de una temporada se sigue, o se ha forzado a listar por temporadas, si no se devuelve el Itemlist original if len(itemlist_temporadas) > 2 or config.get_setting("no_pile_on_seasons", 'videolibrary') == 0: for item_local in itemlist_temporadas: if "** Todas las Temporadas" in item_local.title: #Si es el título de TODAS las Temporadas, lo ignoramos continue - + # Pasada por TMDB a las Temporada try: tmdb.set_infoLabels(item_local, True) #TMDB de cada Temp except: logger.error(traceback.format_exc()) - + if item_local.infoLabels['temporada_air_date']: #Fecha de emisión de la Temp item_local.title += ' [%s]' % str(scrapertools.find_single_match(str(item_local.infoLabels['temporada_air_date']), r'\/(\d{4})')) - + #rating = '' #Ponemos el rating, si es diferente del de la Serie #if item_local.infoLabels['rating'] and item_local.infoLabels['rating'] != 0.0: # try: @@ -611,26 +611,26 @@ def post_tmdb_seasons(item, itemlist): # logger.error(traceback.format_exc()) #if rating and rating > 0.0: # item_local.title += ' [%s]' % str(rating) - + if item_local.infoLabels['temporada_num_episodios']: #Núm. de episodios de la Temp item_local.title += ' [%s epi]' % str(item_local.infoLabels['temporada_num_episodios']) - + if not config.get_setting("unify"): #Si Titulos Inteligentes NO seleccionados: item_local.title = '%s [COLOR limegreen][%s][/COLOR] [COLOR red]%s[/COLOR]' % (item_local.title, item_local.quality, str(item_local.language)) else: #Lo arreglamos un poco para Unify item_local.title = item_local.title.replace("[", "-").replace("]", "-").replace(".", ",").replace("GB", "G B").replace("Gb", "G b").replace("gb", "g b").replace("MB", "M B").replace("Mb", "M b").replace("mb", "m b") item_local.title = item_local.title.replace("--", "").replace("[]", "").replace("()", "").replace("(/)", "").replace("[/]", "").strip() - + #logger.debug(item_local) - + else: #Si hay más de una temporada se sigue, si no se devuelve el Itemlist original if item.season_colapse: del item.season_colapse return (item, itemlist) - + #Permitimos la actualización de los títulos, bien para uso inmediato, o para añadir a la videoteca itemlist_temporadas.append(item.clone(title="** [COLOR yelow]Actualizar Títulos - vista previa videoteca[/COLOR] **", action="actualizar_titulos", tmdb_stat=False, from_action=item.action, from_title_tmdb=item.title, from_update=True)) - + #Es un canal estándar, sólo una linea de Añadir a Videoteca title = '' if item.infoLabels['status'] and item.infoLabels['status'].lower() == "ended": @@ -643,40 +643,40 @@ def post_tmdb_seasons(item, itemlist): thumb_intervenido = get_thumb(autoridad) itemlist_fo.append(item.clone(action='', title="[COLOR yellow]" + clone_inter.capitalize() + ': [/COLOR]' + intervenido_judicial + '. Reportar el problema en el foro', thumbnail=thumb_intervenido)) del item.intervencion - + #Si ha habido fail-over, lo comento if channel_alt: itemlist_fo.append(item.clone(action='', title="[COLOR yellow]" + channel_alt.capitalize() + '[/COLOR] [ALT ] en uso')) itemlist_fo.append(item.clone(action='', title="[COLOR yellow]" + item.category.capitalize() + '[/COLOR] inaccesible')) - + if len(itemlist_fo) > 0: itemlist_temporadas = itemlist_fo + itemlist_temporadas - + return (item, itemlist_temporadas) - - + + def post_tmdb_episodios(item, itemlist): logger.info() itemlist_fo = [] - + """ - + Pasada para maquillaje de los títulos obtenidos desde TMDB en Episodios. - + Toma de infoLabel todos los datos de interés y los va situando en diferentes variables, principalmente título para que sea compatible con Unify, y si no se tienen Títulos Inteligentes, para que el formato sea lo más parecido al de Unify. Lleva un control del num. de episodios por temporada, tratando de arreglar los errores de la Web y de TMDB - + La llamada al método desde Episodios, despues de pasar Itemlist pot TMDB, es: - + from lib import generictools item, itemlist = generictools.post_tmdb_episodios(item, itemlist) - + """ #logger.debug(item) - + modo_serie_temp = '' if config.get_setting('seleccionar_serie_temporada', item.channel) >= 0: modo_serie_temp = config.get_setting('seleccionar_serie_temporada', item.channel) @@ -691,7 +691,7 @@ def post_tmdb_episodios(item, itemlist): num_temporada = 1 num_temporada_max = 99 num_episodios_flag = True - + #Restauramos el num de Temporada para hacer más flexible la elección de Videoteca contentSeason = item.contentSeason if item.contentSeason_save: @@ -702,7 +702,7 @@ def post_tmdb_episodios(item, itemlist): #Ajustamos el nombre de la categoría if item.channel == channel_py: item.category = scrapertools.find_single_match(item.url, 'http.?\:\/\/(?:www.)?(\w+)\.\w+\/').capitalize() - + #Restauramos valores si ha habido fail-over channel_alt = '' if item.channel == channel_py: @@ -733,7 +733,7 @@ def post_tmdb_episodios(item, itemlist): del item.library_filter_show if item.channel_host: del item.channel_host - + for item_local in itemlist: #Recorremos el Itemlist generado por el canal if item_local.add_videolibrary: del item_local.add_videolibrary @@ -784,13 +784,13 @@ def post_tmdb_episodios(item, itemlist): item_local.unify = 'xyz' del item_local.unify item_local.title = re.sub(r'(?i)online|descarga|downloads|trailer|videoteca|gb|autoplay', '', item_local.title).strip() - + #logger.debug(item_local) - + #Ajustamos el nombre de la categoría si es un clone de NewPct1 if item_local.channel == channel_py: item_local.category = scrapertools.find_single_match(item_local.url, 'http.?\:\/\/(?:www.)?(\w+)\.\w+\/').capitalize() - + #Restauramos valores para cada Episodio si ha habido fail-over de un clone de NewPct1 if item_local.channel == channel_py: if item_local.channel_alt: @@ -805,11 +805,11 @@ def post_tmdb_episodios(item, itemlist): host_org = scrapertools.find_single_match(item_local.url_alt, ':\/\/(.*?)\/') item_local.url = item_local.url.replace(host_act, host_org) del item_local.url_alt - + #Si está actualizando videoteca de una serie NewPct1, restauramos el channel con el nombre del clone if item_local.channel == channel_py and (item.library_playcounts or item.add_videolibrary): item_local.channel = scrapertools.find_single_match(item_local.url, 'http.?\:\/\/(?:www.)?(\w+)\.\w+\/') - + #Si el título de la serie está verificado en TMDB, se intenta descubrir los eisodios fuera de rango, #que son probables errores de la Web if item.tmdb_stat: @@ -826,7 +826,7 @@ def post_tmdb_episodios(item, itemlist): logger.error("ERROR 07: EPISODIOS: Num. de Temporada fuera de rango " + " / TEMPORADA: " + str(item_local.contentSeason) + " / " + str(item_local.contentEpisodeNumber) + " / MAX_TEMPORADAS: " + str(num_temporada_max) + " / LISTA_TEMPORADAS: " + str(num_episodios_lista)) item_local.contentSeason = 0 itemlist = sorted(itemlist, key=lambda it: (int(it.contentSeason), int(it.contentEpisodeNumber))) - + #Salvamos en número de episodios de la temporada try: if num_temporada != item_local.contentSeason: @@ -837,7 +837,7 @@ def post_tmdb_episodios(item, itemlist): except: num_episodios = 0 logger.error(traceback.format_exc()) - + #Preparamos el Rating del vídeo rating = '' try: @@ -848,7 +848,7 @@ def post_tmdb_episodios(item, itemlist): rating = '' except: logger.error(traceback.format_exc()) - + # Si TMDB no ha encontrado el vídeo limpiamos el año if item_local.infoLabels['year'] == "-": item_local.infoLabels['year'] = '' @@ -861,12 +861,12 @@ def post_tmdb_episodios(item, itemlist): if item_local.infoLabels['originaltitle'].lower() in item_local.quality.lower(): item_local.quality = re.sub(item_local.infoLabels['originaltitle'], '', item_local.quality) #item_local.quality = re.sub(item_local.infoLabels['originaltitle'], '', item_local.quality, flags=re.IGNORECASE) - + #Si no está el título del episodio, pero sí está en "title", lo rescatamos if not item_local.infoLabels['episodio_titulo'] and item_local.infoLabels['title'].lower() != item_local.infoLabels['tvshowtitle'].lower(): item_local.infoLabels['episodio_titulo'] = item_local.infoLabels['title'] item_local.infoLabels['episodio_titulo'] = item_local.infoLabels['episodio_titulo'].replace('GB', 'G B').replace('MB', 'M B') - + #Preparamos el título para que sea compatible con Añadir Serie a Videoteca if "Temporada" in item_local.title: #Compatibilizamos "Temporada" con Unify item_local.title = '%sx%s al 99 -' % (str(item_local.contentSeason), str(item_local.contentEpisodeNumber)) @@ -875,20 +875,20 @@ def post_tmdb_episodios(item, itemlist): item_local.title = item_local.title.replace("99", str(num_episodios)) item_local.title = '%s %s' % (item_local.title, item_local.contentSerieName) item_local.infoLabels['episodio_titulo'] = '%s - %s [%s] [%s]' % (scrapertools.find_single_match(item_local.title, r'(al \d+)'), item_local.contentSerieName, item_local.infoLabels['year'], rating) - + elif item_local.infoLabels['episodio_titulo']: - item_local.title = '%s %s' % (item_local.title, item_local.infoLabels['episodio_titulo']) + item_local.title = '%s %s' % (item_local.title, item_local.infoLabels['episodio_titulo']) item_local.infoLabels['episodio_titulo'] = '%s [%s] [%s]' % (item_local.infoLabels['episodio_titulo'], item_local.infoLabels['year'], rating) - + else: #Si no hay título de episodio, ponermos el nombre de la serie item_local.title = '%s %s' % (item_local.title, item_local.contentSerieName) item_local.infoLabels['episodio_titulo'] = '%s [%s] [%s]' % (item_local.contentSerieName, item_local.infoLabels['year'], rating) - + #Componemos el título final, aunque con Unify usará infoLabels['episodio_titulo'] item_local.infoLabels['title'] = item_local.infoLabels['episodio_titulo'] item_local.title = item_local.title.replace("[", "-").replace("]", "-") item_local.title = '%s [%s] [%s] [COLOR limegreen][%s][/COLOR] [COLOR red]%s[/COLOR]' % (item_local.title, item_local.infoLabels['year'], rating, item_local.quality, str(item_local.language)) - + #Quitamos campos vacíos item_local.infoLabels['episodio_titulo'] = item_local.infoLabels['episodio_titulo'].replace("[]", "").strip() item_local.infoLabels['title'] = item_local.infoLabels['title'].replace("[]", "").strip() @@ -896,7 +896,7 @@ def post_tmdb_episodios(item, itemlist): item_local.title = re.sub(r'\s?\[COLOR \w+\]\[\[?-?\s?\]?\]\[\/COLOR\]', '', item_local.title).strip() item_local.title = re.sub(r'\s?\[COLOR \w+\]-?\s?\[\/COLOR\]', '', item_local.title).strip() item_local.title = item_local.title.replace(".", ",").replace("GB", "G B").replace("Gb", "G b").replace("gb", "g b").replace("MB", "M B").replace("Mb", "M b").replace("mb", "m b") - + #Si la información de num. total de episodios de TMDB no es correcta, tratamos de calcularla if num_episodios < item_local.contentEpisodeNumber: num_episodios = item_local.contentEpisodeNumber @@ -913,11 +913,11 @@ def post_tmdb_episodios(item, itemlist): #logger.debug("title: " + item_local.title + " / url: " + item_local.url + " / calidad: " + item_local.quality + " / Season: " + str(item_local.contentSeason) + " / EpisodeNumber: " + str(item_local.contentEpisodeNumber) + " / num_episodios_lista: " + str(num_episodios_lista) + str(num_episodios_flag)) #logger.debug(item_local) - + #Si está actualizando videoteca de una serie NewPct1, restauramos el channel con el nombre del clone if item.channel == channel_py and (item.library_playcounts or item.add_videolibrary): item.channel = scrapertools.find_single_match(item.url, 'http.?\:\/\/(?:www.)?(\w+)\.\w+\/') - + #Terminado el repaso de cada episodio, cerramos con el pié de página #En primer lugar actualizamos todos los episodios con su núm máximo de episodios por temporada try: @@ -927,10 +927,10 @@ def post_tmdb_episodios(item, itemlist): except: logger.error("ERROR 07: EPISODIOS: Num de Temporada fuera de rango " + " / TEMPORADA: " + str(item_local.contentSeason) + " / " + str(item_local.contentEpisodeNumber) + " / MAX_TEMPORADAS: " + str(num_temporada_max) + " / LISTA_TEMPORADAS: " + str(num_episodios_lista)) logger.error(traceback.format_exc()) - + #Permitimos la actualización de los títulos, bien para uso inmediato, o para añadir a la videoteca itemlist.append(item.clone(title="** [COLOR yelow]Actualizar Títulos - vista previa videoteca[/COLOR] **", action="actualizar_titulos", tmdb_stat=False, from_action=item.action, from_title_tmdb=item.title, from_update=True)) - + #Borro num. Temporada si no viene de menú de Añadir a Videoteca y no está actualizando la Videoteca if not item.library_playcounts: #si no está actualizando la Videoteca if modo_serie_temp != '': #y puede cambiara a serie-temporada @@ -941,16 +941,16 @@ def post_tmdb_episodios(item, itemlist): if config.get_videolibrary_support() and len(itemlist) > 1: item_local = itemlist[-2] title = '' - + if item_local.infoLabels['temporada_num_episodios']: title += ' [Temp. de %s ep.]' % item_local.infoLabels['temporada_num_episodios'] - + if item_local.infoLabels['status'] and item_local.infoLabels['status'].lower() == "ended": title += ' [TERMINADA]' - + if item_local.quality: #La Videoteca no toma la calidad del episodio, sino de la serie. Pongo del episodio item.quality = item_local.quality - + if modo_serie_temp != '': #Estamos en un canal que puede seleccionar entre gestionar Series completas o por Temporadas #Tendrá una línea para Añadir la Serie completa y otra para Añadir sólo la Temporada actual @@ -967,7 +967,7 @@ def post_tmdb_episodios(item, itemlist): logger.error("ERROR 08: EPISODIOS: No se ha podido actualizar la URL a la nueva Temporada") logger.error(traceback.format_exc()) itemlist.append(item.clone(title="[COLOR yellow]Añadir esta Serie a Videoteca-[/COLOR]" + title, action="add_serie_to_library")) - + elif modo_serie_temp == 1: #si es Serie damos la opción de guardar la última temporada o la serie completa itemlist.append(item.clone(title="[COLOR yellow]Añadir última Temp. a Videoteca-[/COLOR]" + title, action="add_serie_to_library", contentType="season", contentSeason=contentSeason, url=item_local.url, add_menu=True)) itemlist.append(item.clone(title="[COLOR yellow]Añadir esta Serie a Videoteca-[/COLOR]" + title, action="add_serie_to_library", contentType="tvshow", add_menu=True)) @@ -980,51 +980,51 @@ def post_tmdb_episodios(item, itemlist): else: #Es un canal estándar, sólo una linea de Añadir a Videoteca itemlist.append(item.clone(title="[COLOR yellow]Añadir esta serie a videoteca-[/COLOR]" + title, action="add_serie_to_library", extra="episodios", add_menu=True)) - + #Si intervención judicial, alerto!!! if item.intervencion: for clone_inter, autoridad in item.intervencion: thumb_intervenido = get_thumb(autoridad) itemlist_fo.append(item.clone(action='', title="[COLOR yellow]" + clone_inter.capitalize() + ': [/COLOR]' + intervenido_judicial + '. Reportar el problema en el foro', thumbnail=thumb_intervenido)) del item.intervencion - + #Si ha habido fail-over, lo comento if channel_alt: itemlist_fo.append(item.clone(action='', title="[COLOR yellow]" + channel_alt.capitalize() + '[/COLOR] [ALT ] en uso')) itemlist_fo.append(item.clone(action='', title="[COLOR yellow]" + item.category.capitalize() + '[/COLOR] inaccesible')) - + if len(itemlist_fo) > 0: itemlist = itemlist_fo + itemlist if item.add_videolibrary: #Estamos Añadiendo a la Videoteca. del item.add_videolibrary #Borramos ya el indicador - if item.add_menu: #Opción que avisa si se ha añadido a la Videoteca - del item.add_menu #desde la página de Episodios o desde Menú Contextual + if item.add_menu: #Opción que avisa si se ha añadido a la Videoteca + del item.add_menu #desde la página de Episodios o desde Menú Contextual #logger.debug(item) - + return (item, itemlist) - - + + def post_tmdb_findvideos(item, itemlist): logger.info() - + """ - + Llamada para crear un pseudo título con todos los datos relevantes del vídeo. - + Toma de infoLabel todos los datos de interés y los va situando en diferentes variables, principalmente título. Lleva un control del num. de episodios por temporada - + La llamada al método desde Findvideos, al principio, es: - + from lib import generictools item, itemlist = generictools.post_tmdb_findvideos(item, itemlist) - + En Itemlist devuelve un Item con el pseudotítulo. Ahí el canal irá agregando el resto. - + """ #logger.debug(item) - + # Saber si estamos en una ventana emergente lanzada desde una viñeta del menú principal, # con la función "play_from_library" item.unify = False @@ -1037,11 +1037,11 @@ def post_tmdb_findvideos(item, itemlist): except: item.unify = config.get_setting("unify") logger.error(traceback.format_exc()) - + if item.contentSeason_save: #Restauramos el num. de Temporada item.contentSeason = item.contentSeason_save del item.contentSeason_save - + if item.library_filter_show: del item.library_filter_show @@ -1074,15 +1074,15 @@ def post_tmdb_findvideos(item, itemlist): category = scrapertools.find_single_match(item.url, 'http.?\:\/\/(?:www.)?(\w+)\.\w+\/').capitalize() if category: item.category = category - + if item.armagedon: #Es una situación catastrófica? itemlist.append(item.clone(action='', title=item.category + ': [COLOR hotpink]Usando enlaces de emergencia[/COLOR]')) - + #Quitamos el la categoría o nombre del título, si lo tiene if item.contentTitle: item.contentTitle = re.sub(r' -%s-' % item.category, '', item.contentTitle) item.title = re.sub(r' -%s-' % item.category, '', item.title) - + #Limpiamos de año y rating de episodios if item.infoLabels['episodio_titulo']: item.infoLabels['episodio_titulo'] = re.sub(r'\s?\[.*?\]', '', item.infoLabels['episodio_titulo']) @@ -1117,7 +1117,7 @@ def post_tmdb_findvideos(item, itemlist): except: tiempo = item.infoLabels['duration'] logger.error(traceback.format_exc()) - + elif item.contentChannel == 'videolibrary': #No hay, viene de la Videoteca? buscamos en la DB #Leo de la BD de Kodi la duración de la película o episodio. En "from_fields" se pueden poner las columnas que se quiera nun_records = 0 @@ -1130,7 +1130,7 @@ def post_tmdb_findvideos(item, itemlist): logger.error(traceback.format_exc()) if nun_records > 0: #Hay registros? #Es un array, busco el campo del registro: añadir en el FOR un fieldX por nueva columna - for strFileName, field1 in records: + for strFileName, field1 in records: tiempo = field1 try: #calculamos el timepo en hh:mm @@ -1144,11 +1144,11 @@ def post_tmdb_findvideos(item, itemlist): item.quality += ' [/COLOR][COLOR white][%s:%s h]' % (str(horas).zfill(2), str(resto).zfill(2)) #Lo agrego a Calidad del Servidor except: logger.error(traceback.format_exc()) - + #Ajustamos el nombre de la categoría if item.channel != channel_py: item.category = item.channel.capitalize() - + #Formateamos de forma especial el título para un episodio title = '' title_gen = '' @@ -1156,14 +1156,14 @@ def post_tmdb_findvideos(item, itemlist): title = '%sx%s' % (str(item.contentSeason), str(item.contentEpisodeNumber).zfill(2)) #Temporada y Episodio if item.infoLabels['temporada_num_episodios']: title = '%s (de %s)' % (title, str(item.infoLabels['temporada_num_episodios'])) #Total Episodios - - #Si son episodios múltiples, y viene de Videoteca, ponemos nombre de serie - if (" al " in item.title or " Al " in item.title) and not "al " in item.infoLabels['episodio_titulo']: + + #Si son episodios múltiples, y viene de Videoteca, ponemos nombre de serie + if (" al " in item.title or " Al " in item.title) and not "al " in item.infoLabels['episodio_titulo']: title = '%s al %s - ' % (title, scrapertools.find_single_match(item.title, '[al|Al] (\d+)')) else: title = '%s %s' % (title, item.infoLabels['episodio_titulo']) #Título Episodio title_gen = '%s, ' % title - + if item.contentType == "episode" or item.contentType == "season": #Series o Temporadas title_gen += '%s [COLOR yellow][%s][/COLOR] [%s] [COLOR limegreen][%s][/COLOR] [COLOR red]%s[/COLOR] [%s]' % (item.contentSerieName, item.infoLabels['year'], rating, item.quality, str(item.language), scrapertools.find_single_match(item.title, '\s\[(\d+,?\d*?\s\w[b|B])\]')) #Rating, Calidad, Idioma, Tamaño if item.infoLabels['status'] and item.infoLabels['status'].lower() == "ended": @@ -1183,7 +1183,7 @@ def post_tmdb_findvideos(item, itemlist): if not item.unify: #Si Titulos Inteligentes NO seleccionados: title_gen = '**- [COLOR gold]Enlaces Ver: [/COLOR]%s[COLOR gold] -**[/COLOR]' % (title_gen) else: #Si Titulos Inteligentes SÍ seleccionados: - title_gen = '[COLOR gold]Enlaces Ver: [/COLOR]%s' % (title_gen) + title_gen = '[COLOR gold]Enlaces Ver: [/COLOR]%s' % (title_gen) if item.channel_alt: title_gen = '[COLOR yellow]%s [/COLOR][ALT]: %s' % (item.category.capitalize(), title_gen) @@ -1197,10 +1197,10 @@ def post_tmdb_findvideos(item, itemlist): thumb_intervenido = get_thumb(autoridad) itemlist.append(item.clone(action='', title="[COLOR yellow]" + clone_inter.capitalize() + ': [/COLOR]' + intervenido_judicial + '. Reportar el problema en el foro', thumbnail=thumb_intervenido)) del item.intervencion - + #Pintamos el pseudo-título con toda la información disponible del vídeo itemlist.append(item.clone(action="", server = "", title=title_gen)) #Título con todos los datos del vídeo - + if item.action == 'show_result': #Viene de una búsqueda global channel = item.channel.capitalize() if item.from_channel == channel_py or item.channel == channel_py: @@ -1208,221 +1208,221 @@ def post_tmdb_findvideos(item, itemlist): elif item.from_channel: channel = item.from_channel.capitalize() item.quality = '[COLOR yellow][%s][/COLOR] %s' % (channel, item.quality) - + #agregamos la opción de Añadir a Videoteca para péliculas (no series) if (item.contentType == 'movie' or item.contentType == 'season') and item.contentChannel != "videolibrary": #Permitimos la actualización de los títulos, bien para uso inmediato, o para añadir a la videoteca itemlist.append(item.clone(title="** [COLOR yelow]Actualizar Títulos - vista previa videoteca[/COLOR] **", action="actualizar_titulos", extra="peliculas", tmdb_stat=False, from_action=item.action, from_title_tmdb=item.title, from_update=True)) - + if item.contentType == 'movie' and item.contentChannel != "videolibrary": itemlist.append(item.clone(title="**-[COLOR yellow] Añadir a la videoteca [/COLOR]-**", action="add_pelicula_to_library", extra="peliculas", from_action=item.action, from_title_tmdb=item.title)) - + #Añadimos la opción de ver trailers if item.contentChannel != "videolibrary": itemlist.append(item.clone(channel="trailertools", title="**-[COLOR magenta] Buscar Trailer [/COLOR]-**", action="buscartrailer", context="")) - + #logger.debug(item) - + return (item, itemlist) - - -def get_torrent_size(url, referer=None, post=None, torrents_path=None, data_torrent=False, \ - timeout=5, file_list=False, lookup=True, local_torr=None, headers={}, short_pad=False): - logger.info() - from servers import torrent - - """ - - Módulo extraido del antiguo canal ZenTorrent - - Calcula el tamaño de los archivos que contienen un .torrent. Descarga el archivo .torrent en una carpeta, - lo lee y descodifica. Si contiene múltiples archivos, suma el tamaño de todos ellos - - Llamada: generictools.get_torrent_size(url, data_torrent=False) - Entrada: url: url del archivo .torrent - Entrada: referer: url de referer en caso de llamada con post - Entrada: post: contenido del post en caso de llamada con post - Entrada: data_torrent: Flag por si se quiere el contenido del .torretn de vuelta - Salida: size: str con el tamaño y tipo de medida ( MB, GB, etc) - Salida: torrent_f: dict() con el contenido del .torrent (opcional) - Salida: files: dict() con los nombres de los archivos del torrent y su tamaño (opcional) - - """ - - def convert_size(size): - import math - if (size == 0): - return '0B' - size_name = ("B", "KB", "M·B", "G·B", "TB", "PB", "EB", "ZB", "YB") - i = int(math.floor(math.log(size, 1024))) - p = math.pow(1024, i) - #s = round(size / p, 2) - s = round(old_div(size, p), 2) - return '%s %s' % (s, size_name[i]) - - def decode(text): - try: - src = tokenize(text) - if not PY3: - data = decode_item(src.next, src.next()) #Py2 - else: - data = decode_item(src.__next__, next(src)) #Py3 - for token in src: # look for more tokens - raise SyntaxError("trailing junk") - except (AttributeError, ValueError, StopIteration): - try: - data = data - except: - data = src - return data - - def tokenize(text, match=re.compile("([idel])|(\d+):|(-?\d+)").match): - i = 0 - while i < len(text): - m = match(text, i) - s = m.group(m.lastindex) - i = m.end() - if m.lastindex == 2: - yield "s" - yield text[i:i + int(s)] - i = i + int(s) - else: - yield s - def decode_item(next, token): - if token == "i": - # integer: "i" value "e" - data = int(next()) - if next() != "e": - raise ValueError - elif token == "s": - # string: "s" value (virtual tokens) - data = next() - elif token == "l" or token == "d": - # container: "l" (or "d") values "e" - data = [] - tok = next() - while tok != "e": - data.append(decode_item(next, tok)) - tok = next() - if token == "d": - #data = dict(zip(data[0::2], data[1::2])) - data = dict(list(zip(data[0::2], data[1::2]))) - else: - raise ValueError - return data - - - #Móludo principal - size = '' - torrent_f = '' - torrent_file = '' - files = {} - try: - #torrents_path = config.get_videolibrary_path() + '/torrents' #path para dejar el .torrent +# def get_torrent_size(url, referer=None, post=None, torrents_path=None, data_torrent=False, \ +# timeout=5, file_list=False, lookup=True, local_torr=None, headers={}, short_pad=False): +# logger.info() +# from servers import torrent - #if not os.path.exists(torrents_path): - # os.mkdir(torrents_path) #si no está la carpeta la creamos - - #urllib.URLopener.version = 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36 SE 2.X MetaSr 1.0' - #urllib.urlretrieve(url, torrents_path + "/generictools.torrent") #desacargamos el .torrent a la carpeta - #torrent_file = open(torrents_path + "/generictools.torrent", "rb").read() #leemos el .torrent +# """ - if ((url and not local_torr) or url.startswith('magnet')): - torrents_path, torrent_file = torrent.caching_torrents(url, \ - referer=referer, post=post, torrents_path=torrents_path, \ - timeout=timeout, lookup=lookup, data_torrent=True, headers=headers) - elif local_torr: - torrent_file = filetools.read(local_torr) - if not torrent_file: - if not lookup: - return (size, torrents_path, torrent_f, files) - elif file_list and data_torrent: - return (size, torrent_f, files) - elif file_list: - return (size, files) - elif data_torrent: - return (size, torrent_f) - return size #Si hay un error, devolvemos el "size" y "torrent" vacíos +# Módulo extraido del antiguo canal ZenTorrent - torrent_f = decode(torrent_file) #decodificamos el .torrent +# Calcula el tamaño de los archivos que contienen un .torrent. Descarga el archivo .torrent en una carpeta, +# lo lee y descodifica. Si contiene múltiples archivos, suma el tamaño de todos ellos - #si sólo tiene un archivo, tomamos la longitud y la convertimos a una unidad legible, si no dará error - try: - sizet = torrent_f["info"]['length'] - size = convert_size(sizet) - - files = torrent_f["info"].copy() - if 'path' not in files: files.update({'path': ['']}) - if 'piece length' in files: del files['piece length'] - if 'pieces' in files: del files['pieces'] - if 'name' in files: del files['name'] - files = [files] - files.append({"__name": torrent_f["info"]["name"], 'length': 0}) - except: - pass - - #si tiene múltiples archivos sumamos la longitud de todos - if not size: - try: - check_video = scrapertools.find_multiple_matches(str(torrent_f["info"]["files"]), "'length': (\d+).*?}") - sizet = sum([int(i) for i in check_video]) - size = convert_size(sizet) - - files = torrent_f["info"]["files"][:] - files.append({"__name": torrent_f["info"]["name"], 'length': 0}) - - except: - size = 'ERROR' +# Llamada: generictools.get_torrent_size(url, data_torrent=False) +# Entrada: url: url del archivo .torrent +# Entrada: referer: url de referer en caso de llamada con post +# Entrada: post: contenido del post en caso de llamada con post +# Entrada: data_torrent: Flag por si se quiere el contenido del .torretn de vuelta +# Salida: size: str con el tamaño y tipo de medida ( MB, GB, etc) +# Salida: torrent_f: dict() con el contenido del .torrent (opcional) +# Salida: files: dict() con los nombres de los archivos del torrent y su tamaño (opcional) - except: - size = 'ERROR' - logger.error('ERROR al buscar el tamaño de un .Torrent: ' + str(url)) - logger.error(traceback.format_exc()) - - #try: - # os.remove(torrents_path + "/generictools.torrent") #borramos el .torrent - #except: - # pass +# """ + +# def convert_size(size): +# import math +# if (size == 0): +# return '0B' +# size_name = ("B", "KB", "M·B", "G·B", "TB", "PB", "EB", "ZB", "YB") +# i = int(math.floor(math.log(size, 1024))) +# p = math.pow(1024, i) +# #s = round(size / p, 2) +# s = round(old_div(size, p), 2) +# return '%s %s' % (s, size_name[i]) + +# def decode(text): +# try: +# src = tokenize(text) +# if not PY3: +# data = decode_item(src.next, src.next()) #Py2 +# else: +# data = decode_item(src.__next__, next(src)) #Py3 +# for token in src: # look for more tokens +# raise SyntaxError("trailing junk") +# except (AttributeError, ValueError, StopIteration): +# try: +# data = data +# except: +# data = src + +# return data + +# def tokenize(text, match=re.compile("([idel])|(\d+):|(-?\d+)").match): +# i = 0 +# while i < len(text): +# m = match(text, i) +# s = m.group(m.lastindex) +# i = m.end() +# if m.lastindex == 2: +# yield "s" +# yield text[i:i + int(s)] +# i = i + int(s) +# else: +# yield s + +# def decode_item(next, token): +# if token == "i": +# # integer: "i" value "e" +# data = int(next()) +# if next() != "e": +# raise ValueError +# elif token == "s": +# # string: "s" value (virtual tokens) +# data = next() +# elif token == "l" or token == "d": +# # container: "l" (or "d") values "e" +# data = [] +# tok = next() +# while tok != "e": +# data.append(decode_item(next, tok)) +# tok = next() +# if token == "d": +# #data = dict(zip(data[0::2], data[1::2])) +# data = dict(list(zip(data[0::2], data[1::2]))) +# else: +# raise ValueError +# return data + + +# #Móludo principal +# size = '' +# torrent_f = '' +# torrent_file = '' +# files = {} +# try: +# #torrents_path = config.get_videolibrary_path() + '/torrents' #path para dejar el .torrent + +# #if not os.path.exists(torrents_path): +# # os.mkdir(torrents_path) #si no está la carpeta la creamos + +# #urllib.URLopener.version = 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36 SE 2.X MetaSr 1.0' +# #urllib.urlretrieve(url, torrents_path + "/generictools.torrent") #desacargamos el .torrent a la carpeta +# #torrent_file = open(torrents_path + "/generictools.torrent", "rb").read() #leemos el .torrent + +# # if ((url and not local_torr) or url.startswith('magnet')): +# # torrents_path, torrent_file = torrent.caching_torrents(url, \ +# # referer=referer, post=post, torrents_path=torrents_path, \ +# # timeout=timeout, lookup=lookup, data_torrent=True, headers=headers) +# if local_torr: +# torrent_file = filetools.read(local_torr) +# if not torrent_file: +# if not lookup: +# return (size, torrents_path, torrent_f, files) +# elif file_list and data_torrent: +# return (size, torrent_f, files) +# elif file_list: +# return (size, files) +# elif data_torrent: +# return (size, torrent_f) +# return size #Si hay un error, devolvemos el "size" y "torrent" vacíos + +# torrent_f = decode(torrent_file) #decodificamos el .torrent + +# #si sólo tiene un archivo, tomamos la longitud y la convertimos a una unidad legible, si no dará error +# try: +# sizet = torrent_f["info"]['length'] +# size = convert_size(sizet) + +# files = torrent_f["info"].copy() +# if 'path' not in files: files.update({'path': ['']}) +# if 'piece length' in files: del files['piece length'] +# if 'pieces' in files: del files['pieces'] +# if 'name' in files: del files['name'] +# files = [files] +# files.append({"__name": torrent_f["info"]["name"], 'length': 0}) +# except: +# pass + +# #si tiene múltiples archivos sumamos la longitud de todos +# if not size: +# try: +# check_video = scrapertools.find_multiple_matches(str(torrent_f["info"]["files"]), "'length': (\d+).*?}") +# sizet = sum([int(i) for i in check_video]) +# size = convert_size(sizet) + +# files = torrent_f["info"]["files"][:] +# files.append({"__name": torrent_f["info"]["name"], 'length': 0}) + +# except: +# size = 'ERROR' + +# except: +# size = 'ERROR' +# logger.error('ERROR al buscar el tamaño de un .Torrent: ' + str(url)) +# logger.error(traceback.format_exc()) + +# #try: +# # os.remove(torrents_path + "/generictools.torrent") #borramos el .torrent +# #except: +# # pass + +# if '.rar' in str(files): +# size = '[COLOR magenta][B]RAR-[/B][/COLOR]%s' % size + +# #logger.debug(str(url)) +# logger.info(str(size)) + +# if not lookup: +# return (size, torrents_path, torrent_f, files) +# elif file_list and data_torrent: +# return (size, torrent_f, files) +# elif file_list: +# return (size, files) +# elif data_torrent: +# return (size, torrent_f) +# return size - if '.rar' in str(files): - size = '[COLOR magenta][B]RAR-[/B][/COLOR]%s' % size - - #logger.debug(str(url)) - logger.info(str(size)) - - if not lookup: - return (size, torrents_path, torrent_f, files) - elif file_list and data_torrent: - return (size, torrent_f, files) - elif file_list: - return (size, files) - elif data_torrent: - return (size, torrent_f) - return size - def get_field_from_kodi_DB(item, from_fields='*', files='file'): logger.info() """ - + Llamada para leer de la DB de Kodi los campos que se reciben de entrada (from_fields, por defecto "*") del vídeo señalado en Item Obviamente esto solo funciona con Kodi y si la película o serie está catalogada en las Videotecas de Alfa y Kodi Se puede pedir que la búdqueda se haga por archivos (defecto), o por carpeta (series) - + La llamada es: nun_records, records = generictools.get_field_from_kodi_DB(item, from_fields='cXX[, cYY,...]'[, files = 'file|folder']) - + Devuelve el num de registros encontrados y los registros. Es importante que el llamador verifique que "nun_records > 0" antes de tratar "records" - + """ FOLDER_MOVIES = config.get_setting("folder_movies") FOLDER_TVSHOWS = config.get_setting("folder_tvshows") VIDEOLIBRARY_PATH = config.get_videolibrary_config_path() VIDEOLIBRARY_REAL_PATH = config.get_videolibrary_path() - + if item.contentType == 'movie': #Agrego la carpeta correspondiente al path de la Videoteca path = filetools.join(VIDEOLIBRARY_REAL_PATH, FOLDER_MOVIES) path2 = filetools.join(VIDEOLIBRARY_PATH, FOLDER_MOVIES) @@ -1441,7 +1441,7 @@ def get_field_from_kodi_DB(item, from_fields='*', files='file'): elif item.contentType in ['tvshow', 'season', 'episode'] and (item.contentSerieName.lower() in carpeta or item.contentSerieName in carpeta): #Series? path = carpeta #Almacenamos la carpeta en el path break - + path2 += '/%s/' % scrapertools.find_single_match(path, '%s.(.*?\s\[.*?\])' % folder) #Agregamos la carpeta de la Serie o Películas, formato Android file_search = '%' #Por defecto busca todos los archivos de la carpeta if files == 'file': #Si se ha pedido son un archivo (defecto), se busca @@ -1477,45 +1477,45 @@ def get_field_from_kodi_DB(item, from_fields='*', files='file'): logger.error("Error en la SQL: " + sql + ": 0 registros") #No estará catalogada o hay un error en el SQL except: logger.error(traceback.format_exc()) - + return (nun_records, records) - - + + def fail_over_newpct1(item, patron, patron2=None, timeout=None): logger.info() import ast - + """ - + Llamada para encontrar una web alternativa a un canal caído, clone de NewPct1 - + Creamos una array con los datos de los canales alternativos. Los datos de la tupla son: - + - active = 0,1 Indica si el canal no está activo o sí lo está - channel nombre del canal alternativo - channel_host host del canal alternativo, utilizado para el reemplazo de parte de la url - contentType indica que tipo de contenido que soporta el nuevo canal en fail-overs - action_excluded lista las acciones que está excluidas para ese canal - + La llamada al método desde el principio de Submenu, Listado_Búsqueda, Episodios y Findvideos, es: - + from lib import generictools item, data = generictools.fail_over_newpct1(item, patron[, patron2=][, timeout=]) - + - Entrada: patron: con este patron permite verificar si los datos de la nueva web son buenos - Entrada (opcional): patron2: segundo patron opcional - Entrada (opcional): timeout: valor de espera máximo en download de página. Por defecto 3 - Entrada (opcional): patron=True: pide que sólo verifique si el canal en uso está activo, si no, ofrece otro - Salida: data: devuelve los datos del la nueva web. Si vuelve vacía es que no se ha encontrado alternativa - + """ #logger.debug(item) - + if timeout == None: timeout = config.get_setting('clonenewpct1_timeout_downloadpage', channel_py) #Timeout downloadpage if timeout == 0: timeout = None if item.action == "search" or item.action == "listado_busqueda": timeout = timeout * 2 #Mas tiempo para búsquedas - + data = '' channel_failed = '' url_alt = [] @@ -1531,7 +1531,7 @@ def fail_over_newpct1(item, patron, patron2=None, timeout=None): patron = patron1 except: logger.error(traceback.format_exc()) - + #Array con los datos de los canales alternativos #Cargamos en .json del canal para ver las listas de valores en settings fail_over = channeltools.get_channel_json(channel_py) @@ -1556,14 +1556,14 @@ def fail_over_newpct1(item, patron, patron2=None, timeout=None): channel_host_failed = channel_host #salvamos el nombre del host channel_url_failed = item.url #salvamos la url #logger.debug(channel_failed + ' / ' + channel_host_failed) - + if patron == True and active == '1': #solo nos han pedido verificar el clone return (item, data) #nos vamos, con el mismo clone, si está activo if (item.action == 'episodios' or item.action == "update_tvshow" or item.action == "get_seasons" or item.action == 'findvideos') and item.contentType not in contentType: #soporta el fail_over de este contenido? logger.error("ERROR 99: " + item.action.upper() + ": Acción no soportada para Fail-Over en canal: " + item.url) return (item, data) #no soporta el fail_over de este contenido, no podemos hacer nada break - + if not channel_failed: logger.error('Patrón: ' + str(patron) + ' / fail_over_list: ' + str(fail_over_list)) logger.error(item) @@ -1576,7 +1576,7 @@ def fail_over_newpct1(item, patron, patron2=None, timeout=None): continue if (item.action == 'episodios' or item.action == "update_tvshow" or item.action == "get_seasons" or item.action == 'findvideos') and item.contentType not in contentType: #soporta el contenido? continue - + #Hacemos el cambio de nombre de canal y url, conservando las anteriores como ALT item.channel_alt = channel_failed if item.channel != channel_py: @@ -1587,16 +1587,16 @@ def fail_over_newpct1(item, patron, patron2=None, timeout=None): channel_host_bis = re.sub(r'(?i)http.*://', '', channel_host) channel_host_failed_bis = re.sub(r'(?i)http.*://', '', channel_host_failed) item.url = item.url.replace(channel_host_failed_bis, channel_host_bis) - + url_alt += [item.url] #salvamos la url para el bucle item.channel_host = channel_host #logger.debug(str(url_alt)) - + #quitamos el código de series, porque puede variar entre webs if item.action == "episodios" or item.action == "get_seasons" or item.action == "update_tvshow": item.url = re.sub(r'\/\d+\/?$', '', item.url) #parece que con el título solo ecuentra la serie, normalmente... url_alt = [item.url] #salvamos la url para el bucle, pero de momento ignoramos la inicial con código de serie - + #si es un episodio, generalizamos la url para que se pueda encontrar en otro clone. Quitamos la calidad del final de la url elif item.action == "findvideos" and item.contentType == "episode": try: @@ -1605,7 +1605,7 @@ def fail_over_newpct1(item, patron, patron2=None, timeout=None): inter2 = re.sub(r'^0', '', inter2) if inter1 + inter2 + inter3 not in url_alt: url_alt += [inter1 + inter2 + inter3] - + #en este formato solo quitamos la calidad del final de la url if scrapertools.find_single_match(item.url, 'http.*?\/temporada-\d+.*?\/capitulo.?-\d+.*?\/') not in url_alt: url_alt += [scrapertools.find_single_match(item.url, 'http.*?\/temporada-\d+.*?\/capitulo.?-\d+.*?\/')] @@ -1616,7 +1616,7 @@ def fail_over_newpct1(item, patron, patron2=None, timeout=None): if patron == True: #solo nos han pedido verificar el clone return (item, data) #nos vamos, con un nuevo clone - + #Leemos la nueva url.. Puede haber varias alternativas a la url original for url in url_alt: try: @@ -1631,7 +1631,7 @@ def fail_over_newpct1(item, patron, patron2=None, timeout=None): if not data: #no ha habido suerte, probamos con la siguiente url logger.error("ERROR 01: " + item.action + ": La Web no responde o la URL es erronea: " + url) continue - + #Hemos logrado leer la web, validamos si encontramos un línk válido en esta estructura #Evitar páginas engañosas que puede meter al canal en un loop infinito if (not ".com/images/no_imagen.jpg" in data and not ".com/images/imagen-no-disponible.jpg" in data) or item.action != "episodios": @@ -1668,13 +1668,13 @@ def fail_over_newpct1(item, patron, patron2=None, timeout=None): web_intervenida(item, data) data = '' continue - + if not data: #no ha habido suerte, probamos con el siguiente clone url_alt = [] continue else: break - + del item.extra2 #Borramos acción temporal excluyente if not data: #Si no ha logrado encontrar nada, salimos limpiando variables if item.channel == channel_py: @@ -1685,16 +1685,16 @@ def fail_over_newpct1(item, patron, patron2=None, timeout=None): if item.channel_alt: item.channel = item.channel_alt del item.channel_alt - if item.url_alt: + if item.url_alt: item.url = item.url_alt del item.url_alt item.channel_host = channel_host_failed - + #logger.debug(item) - + return (item, data) - + def verify_channel(channel): return channel #Lista con los datos de los canales alternativos @@ -1707,27 +1707,27 @@ def verify_channel(channel): # if channel_alt in clones: #Si es un clon se pone como canal newpct1, si no se deja # channel = channel_py # return channel - - + + def web_intervenida(item, data, desactivar=True): logger.info() - + """ - + Llamada para verificar si la caída de un clone de Newpct1 es debido a una intervención judicial - + La llamada al método desde es: - + from lib import generictools item = generictools.web_intervenida(item, data[, desactivar=True]) - + - Entrada: data: resultado de la descarga. Nos permite analizar si se trata de una intervención - Entrada: desactivar=True: indica que desactiva el canal o clone en caso de intervención judicial - Salida: item.intervencion: devuele un array con el nombre del clone intervenido y el thumb de la autoridad que interviene. El canal puede anunciarlo. - Salida: Si es un clone de Newpct1, se desactiva el clone en el .json del Canal. Si es otro canal, se desactiva el canal en su .json. - + """ - + intervencion = () judicial = '' @@ -1746,17 +1746,17 @@ def web_intervenida(item, data, desactivar=True): if not item.intervencion: item.intervencion = [] #Si no existe el array, lo creamos item.intervencion += [intervencion] #Añadimos esta intervención al array - + logger.error("ERROR 99: " + category + ": " + judicial + ": " + item.url + ": DESACTIVADO=" + str(desactivar) + " / DATA: " + data) - + if desactivar == False: #Si no queremos desactivar el canal, nos vamos return item - + #Cargamos en .json del canal para ver las listas de valores en settings. Carga las claves desordenadas !!! from core import filetools import json json_data = channeltools.get_channel_json(item.channel) - + if item.channel == channel_py: #Si es un clone de Newpct1, lo desactivamos for settings in json_data['settings']: #Se recorren todos los settings if settings['id'] == "clonenewpct1_channels_list": #Encontramos en setting @@ -1766,7 +1766,7 @@ def web_intervenida(item, data, desactivar=True): action_excluded += ', %s' % judicial #Agregamos el thumb de la autoridad judicial else: action_excluded = '%s' % judicial - + #Reemplazamos el estado a desactivado y agregamos el thumb de la autoridad judicial settings['default'] = re.sub(r"\('\d', '%s', ('[^']+', '[^']*'), '[^']*'\)" % item.category.lower(), r"('0', '%s', \1, '%s')" % (item.category.lower(), action_excluded), settings['default']) @@ -1788,10 +1788,10 @@ def web_intervenida(item, data, desactivar=True): logger.error(traceback.format_exc()) #logger.debug(item) - + return item - + def redirect_clone_newpct1(item, head_nfo=None, it=None, path=False, overwrite=False, lookup=False): # logger.info() # @@ -2271,20 +2271,20 @@ def redirect_clone_newpct1(item, head_nfo=None, it=None, path=False, overwrite=F # # return (item, it, overwrite) return item, item, False - + def verify_cached_torrents(): logger.info() import json - + """ Verifica que todos los archivos .torrent estén descomprimidos. Si no lo están, los descomprime y regraba - + Método para uso temporal y controlado - + Deja el archivo verify_cached_torrents.json como marca de que se ha ejecutado para esa versión de Alfa """ - + try: #Localiza los paths donde dejar el archivo .json de control, y de la Videoteca json_path = filetools.exists(filetools.join(config.get_runtime_path(), 'verify_cached_torrents.json')) @@ -2294,13 +2294,13 @@ def verify_cached_torrents(): json_path = filetools.join(config.get_runtime_path(), 'verify_cached_torrents.json') json_error_path = filetools.join(config.get_runtime_path(), 'error_cached_torrents.json') json_error_path_BK = filetools.join(config.get_runtime_path(), 'error_cached_torrents_BK.json') - + videolibrary_path = config.get_videolibrary_path() #Calculamos el path absoluto a partir de la Videoteca movies = config.get_setting("folder_movies") series = config.get_setting("folder_tvshows") torrents_movies = filetools.join(videolibrary_path, config.get_setting("folder_movies")) #path de CINE torrents_series = filetools.join(videolibrary_path, config.get_setting("folder_tvshows")) #path de SERIES - + #Inicializa variables torren_list = [] torren_list.append(torrents_movies) @@ -2311,7 +2311,7 @@ def verify_cached_torrents(): descomprimidos = [] errores = [] json_data = dict() - + #Recorre las carpetas de CINE y SERIES de la Videoteca, leyendo, descomprimiendo y regrabando los archivos .torrent for contentType in torren_list: for root, folders, files in filetools.walk(contentType): @@ -2340,7 +2340,7 @@ def verify_cached_torrents(): filetools.remove(torrent_json) filetools.remove(torrent_path) continue - + if not scrapertools.find_single_match(torrent_file_deco, '^d\d+:\w+\d+:'): logger.error('Error de DESCOMPRESIÓN: ' + str(torrent_path)) k += 1 @@ -2360,7 +2360,7 @@ def verify_cached_torrents(): except: logger.error('Error en el proceso de VERIFICACIÓN de los .torrents') logger.error(traceback.format_exc()) - + logger.error(str(i) + ' archivos .torrent revisados. / ' + str(j) + ' descomporimidos / ' + str(k) + ' errores') if descomprimidos: logger.error('Lista de .torrents DESCOMPRIMIDOS: ' + str(descomprimidos)) @@ -2372,14 +2372,14 @@ def regenerate_clones(): logger.info() import json from core import videolibrarytools - + """ Regenera los archivos .json que ha sido machacado con la migración. También borrar los archivos tvshow.nfo en películas. - + Método para uso temporal y controlado """ - + try: #Localiza los paths donde dejar el archivo .json de control, y de la Videoteca json_path = filetools.exists(filetools.join(config.get_runtime_path(), 'verify_cached_torrents.json')) @@ -2390,19 +2390,19 @@ def regenerate_clones(): filetools.write(json_path, json.dumps({"CINE_verify": True})) #Evita que se lance otro proceso simultaneo json_error_path = filetools.join(config.get_runtime_path(), 'error_cached_torrents.json') json_error_path_BK = filetools.join(config.get_runtime_path(), 'error_cached_torrents_BK.json') - + videolibrary_path = config.get_videolibrary_path() #Calculamos el path absoluto a partir de la Videoteca movies = config.get_setting("folder_movies") series = config.get_setting("folder_tvshows") torrents_movies = filetools.join(videolibrary_path, config.get_setting("folder_movies")) #path de CINE torrents_series = filetools.join(videolibrary_path, config.get_setting("folder_tvshows")) #path de SERIES - + #Cargamos en .json de Newpct1 para ver las listas de valores en settings fail_over_list = channeltools.get_channel_json(channel_py) for settings in fail_over_list['settings']: #Se recorren todos los settings if settings['id'] == "clonenewpct1_channels_list": #Encontramos en setting fail_over_list = settings['default'] #Carga lista de clones - + #Inicializa variables torren_list = [] torren_list.append(torrents_movies) @@ -2413,7 +2413,7 @@ def regenerate_clones(): descomprimidos = [] errores = [] json_data = dict() - + #Recorre las carpetas de CINE y SERIES de la Videoteca, leyendo, descomprimiendo y regrabando los archivos .torrent for contentType in torren_list: for root, folders, files in filetools.walk(contentType): @@ -2421,7 +2421,7 @@ def regenerate_clones(): newpct1 = False file_list = str(files) logger.error(file_list) - + #Borra los archivos Tvshow.nfo y verifica si el .nfo tiene más de un canal y uno es clone Newpct1 for file in files: #logger.info('file - nfos: ' + file) @@ -2429,7 +2429,7 @@ def regenerate_clones(): file_path = filetools.join(root, 'tvshow.nfo') filetools.remove(file_path) continue - + if '.nfo' in file: peli_name = file.replace('.nfo', '') nfo = '' @@ -2448,7 +2448,7 @@ def regenerate_clones(): except: logger.error('** NFO: error de escritura en: ' + file) break - + if '.torrent' not in file_list and nfo.emergency_urls: del nfo.emergency_urls #Si tiene emergency_urls, lo reseteamos try: @@ -2457,7 +2457,7 @@ def regenerate_clones(): logger.error('** NFO: error de escritura en: ' + file) break newpct1 = True #marcamos par a resetar los .jsons - + if len(nfo.library_urls) > 1: #Tiene más de un canal? for canal, url in nfo.library_urls.items(): canal_json = "[%s].json" % canal @@ -2472,7 +2472,7 @@ def regenerate_clones(): logger.error('** NFO: error de escritura en: ' + file) break newpct1 = True #marcamos par a resetar los .jsons - + canal_nwepct1 = "'%s'" % canal if canal_nwepct1 in fail_over_list: #Algún canal es clone de Newpct1 newpct1 = True #Si es que sí, lo marcamos @@ -2518,24 +2518,24 @@ def regenerate_clones(): errores += [file] if '.torrent' in file: filetools.remove(file_path) #borramos los .torrent salvados - - + + logger.error('** Lista de peliculas reparadas: ' + str(errores)) filetools.write(json_error_path, json.dumps(json_data)) filetools.write(json_error_path_BK, json.dumps(json_data)) - filetools.write(json_path, json.dumps({"CINE_verify": True})) + filetools.write(json_path, json.dumps({"CINE_verify": True})) except: filetools.remove(json_path) #borramos el bloqueo para que se pueda lanzar de nuevo logger.error('Error en el proceso de REPARACIÓN de Videoteca de CINE') logger.error(traceback.format_exc()) - + return True - + def dejuice(data): logger.info() # Metodo para desobfuscar datos de JuicyCodes - + import base64 from lib import jsunpack diff --git a/lib/python_libtorrent/__init__.py b/lib/python_libtorrent/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_armv7/0.16.19/__init__.py b/lib/python_libtorrent/android_armv7/0.16.19/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_armv7/0.16.19/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_armv7/0.16.19/libtorrent.so.size.txt b/lib/python_libtorrent/android_armv7/0.16.19/libtorrent.so.size.txt deleted file mode 100644 index 84e6fea8..00000000 --- a/lib/python_libtorrent/android_armv7/0.16.19/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6804840 \ No newline at end of file diff --git a/lib/python_libtorrent/android_armv7/1.0.6/__init__.py b/lib/python_libtorrent/android_armv7/1.0.6/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_armv7/1.0.6/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_armv7/1.0.6/libtorrent.so.size.txt b/lib/python_libtorrent/android_armv7/1.0.6/libtorrent.so.size.txt deleted file mode 100644 index 6de27f94..00000000 --- a/lib/python_libtorrent/android_armv7/1.0.6/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6545732 \ No newline at end of file diff --git a/lib/python_libtorrent/android_armv7/1.0.7/__init__.py b/lib/python_libtorrent/android_armv7/1.0.7/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_armv7/1.0.7/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_armv7/1.0.7/libtorrent.so.size.txt b/lib/python_libtorrent/android_armv7/1.0.7/libtorrent.so.size.txt deleted file mode 100644 index 2f7afd24..00000000 --- a/lib/python_libtorrent/android_armv7/1.0.7/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6519704 \ No newline at end of file diff --git a/lib/python_libtorrent/android_armv7/1.0.8/__init__.py b/lib/python_libtorrent/android_armv7/1.0.8/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_armv7/1.0.8/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_armv7/1.0.8/libtorrent.so.size.txt b/lib/python_libtorrent/android_armv7/1.0.8/libtorrent.so.size.txt deleted file mode 100644 index fce8b958..00000000 --- a/lib/python_libtorrent/android_armv7/1.0.8/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6513752 \ No newline at end of file diff --git a/lib/python_libtorrent/android_armv7/1.0.9/__init__.py b/lib/python_libtorrent/android_armv7/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_armv7/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_armv7/1.0.9/libtorrent.so.size.txt b/lib/python_libtorrent/android_armv7/1.0.9/libtorrent.so.size.txt deleted file mode 100644 index 36119234..00000000 --- a/lib/python_libtorrent/android_armv7/1.0.9/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6518156 \ No newline at end of file diff --git a/lib/python_libtorrent/android_armv7/1.1.0/__init__.py b/lib/python_libtorrent/android_armv7/1.1.0/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_armv7/1.1.0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_armv7/1.1.0/libtorrent.so.size.txt b/lib/python_libtorrent/android_armv7/1.1.0/libtorrent.so.size.txt deleted file mode 100644 index 5610ac18..00000000 --- a/lib/python_libtorrent/android_armv7/1.1.0/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -4608320 \ No newline at end of file diff --git a/lib/python_libtorrent/android_armv7/1.1.1/__init__.py b/lib/python_libtorrent/android_armv7/1.1.1/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_armv7/1.1.1/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_armv7/1.1.1/libtorrent.so.size.txt b/lib/python_libtorrent/android_armv7/1.1.1/libtorrent.so.size.txt deleted file mode 100644 index cc84d962..00000000 --- a/lib/python_libtorrent/android_armv7/1.1.1/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -4628960 \ No newline at end of file diff --git a/lib/python_libtorrent/android_armv7/__init__.py b/lib/python_libtorrent/android_armv7/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_armv7/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_x86/0.16.19/__init__.py b/lib/python_libtorrent/android_x86/0.16.19/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_x86/0.16.19/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_x86/0.16.19/libtorrent.so.size.txt b/lib/python_libtorrent/android_x86/0.16.19/libtorrent.so.size.txt deleted file mode 100644 index 559db63b..00000000 --- a/lib/python_libtorrent/android_x86/0.16.19/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -7145572 \ No newline at end of file diff --git a/lib/python_libtorrent/android_x86/1.0.6/__init__.py b/lib/python_libtorrent/android_x86/1.0.6/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_x86/1.0.6/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_x86/1.0.6/libtorrent.so.size.txt b/lib/python_libtorrent/android_x86/1.0.6/libtorrent.so.size.txt deleted file mode 100644 index 4f5d95fc..00000000 --- a/lib/python_libtorrent/android_x86/1.0.6/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6921524 \ No newline at end of file diff --git a/lib/python_libtorrent/android_x86/1.0.7/__init__.py b/lib/python_libtorrent/android_x86/1.0.7/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_x86/1.0.7/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_x86/1.0.7/libtorrent.so.size.txt b/lib/python_libtorrent/android_x86/1.0.7/libtorrent.so.size.txt deleted file mode 100644 index 623c5ec5..00000000 --- a/lib/python_libtorrent/android_x86/1.0.7/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6890380 \ No newline at end of file diff --git a/lib/python_libtorrent/android_x86/1.0.8/__init__.py b/lib/python_libtorrent/android_x86/1.0.8/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_x86/1.0.8/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_x86/1.0.8/libtorrent.so.size.txt b/lib/python_libtorrent/android_x86/1.0.8/libtorrent.so.size.txt deleted file mode 100644 index 4ae02ffd..00000000 --- a/lib/python_libtorrent/android_x86/1.0.8/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6889512 \ No newline at end of file diff --git a/lib/python_libtorrent/android_x86/1.0.9/__init__.py b/lib/python_libtorrent/android_x86/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_x86/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_x86/1.0.9/libtorrent.so.size.txt b/lib/python_libtorrent/android_x86/1.0.9/libtorrent.so.size.txt deleted file mode 100644 index ebea3968..00000000 --- a/lib/python_libtorrent/android_x86/1.0.9/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6889548 \ No newline at end of file diff --git a/lib/python_libtorrent/android_x86/1.1.0/__init__.py b/lib/python_libtorrent/android_x86/1.1.0/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_x86/1.1.0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_x86/1.1.0/libtorrent.so.size.txt b/lib/python_libtorrent/android_x86/1.1.0/libtorrent.so.size.txt deleted file mode 100644 index e29817fc..00000000 --- a/lib/python_libtorrent/android_x86/1.1.0/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -5369280 \ No newline at end of file diff --git a/lib/python_libtorrent/android_x86/1.1.1/__init__.py b/lib/python_libtorrent/android_x86/1.1.1/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_x86/1.1.1/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/android_x86/1.1.1/libtorrent.so.size.txt b/lib/python_libtorrent/android_x86/1.1.1/libtorrent.so.size.txt deleted file mode 100644 index 87c887ad..00000000 --- a/lib/python_libtorrent/android_x86/1.1.1/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -5393984 \ No newline at end of file diff --git a/lib/python_libtorrent/android_x86/__init__.py b/lib/python_libtorrent/android_x86/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/android_x86/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/darwin/0.16.19/__init__.py b/lib/python_libtorrent/darwin/0.16.19/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/darwin/0.16.19/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/darwin/0.16.19/libtorrent.so.size.txt b/lib/python_libtorrent/darwin/0.16.19/libtorrent.so.size.txt deleted file mode 100644 index f36331b7..00000000 --- a/lib/python_libtorrent/darwin/0.16.19/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -10425648 \ No newline at end of file diff --git a/lib/python_libtorrent/darwin/1.0.9/__init__.py b/lib/python_libtorrent/darwin/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/darwin/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/darwin/1.0.9/libtorrent.so.size.txt b/lib/python_libtorrent/darwin/1.0.9/libtorrent.so.size.txt deleted file mode 100644 index 39bbc11f..00000000 --- a/lib/python_libtorrent/darwin/1.0.9/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -3578388 \ No newline at end of file diff --git a/lib/python_libtorrent/darwin/1.1.0/__init__.py b/lib/python_libtorrent/darwin/1.1.0/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/darwin/1.1.0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/darwin/1.1.0/libtorrent.so.size.txt b/lib/python_libtorrent/darwin/1.1.0/libtorrent.so.size.txt deleted file mode 100644 index ffcb02f5..00000000 --- a/lib/python_libtorrent/darwin/1.1.0/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -5292640 \ No newline at end of file diff --git a/lib/python_libtorrent/darwin/1.1.1/__init__.py b/lib/python_libtorrent/darwin/1.1.1/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/darwin/1.1.1/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/darwin/1.1.1/libtorrent.so.size.txt b/lib/python_libtorrent/darwin/1.1.1/libtorrent.so.size.txt deleted file mode 100644 index 8b51a1f3..00000000 --- a/lib/python_libtorrent/darwin/1.1.1/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -5331516 \ No newline at end of file diff --git a/lib/python_libtorrent/darwin/__init__.py b/lib/python_libtorrent/darwin/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/darwin/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/ios_arm/1.0.7/__init__.py b/lib/python_libtorrent/ios_arm/1.0.7/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/ios_arm/1.0.7/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/ios_arm/1.0.7/libtorrent.so.size.txt b/lib/python_libtorrent/ios_arm/1.0.7/libtorrent.so.size.txt deleted file mode 100644 index 7ab22f29..00000000 --- a/lib/python_libtorrent/ios_arm/1.0.7/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -8834480 \ No newline at end of file diff --git a/lib/python_libtorrent/ios_arm/1.0.8/__init__.py b/lib/python_libtorrent/ios_arm/1.0.8/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/ios_arm/1.0.8/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/ios_arm/1.0.8/libtorrent.so.size.txt b/lib/python_libtorrent/ios_arm/1.0.8/libtorrent.so.size.txt deleted file mode 100644 index 7fc5097b..00000000 --- a/lib/python_libtorrent/ios_arm/1.0.8/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -8779608 \ No newline at end of file diff --git a/lib/python_libtorrent/ios_arm/1.0.9/__init__.py b/lib/python_libtorrent/ios_arm/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/ios_arm/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/ios_arm/1.0.9/libtorrent.so.size.txt b/lib/python_libtorrent/ios_arm/1.0.9/libtorrent.so.size.txt deleted file mode 100644 index 3fdc1bf1..00000000 --- a/lib/python_libtorrent/ios_arm/1.0.9/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -8831856 \ No newline at end of file diff --git a/lib/python_libtorrent/ios_arm/1.1.1/__init__.py b/lib/python_libtorrent/ios_arm/1.1.1/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/ios_arm/1.1.1/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/ios_arm/1.1.1/libtorrent.so.size.txt b/lib/python_libtorrent/ios_arm/1.1.1/libtorrent.so.size.txt deleted file mode 100644 index bee1908e..00000000 --- a/lib/python_libtorrent/ios_arm/1.1.1/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -3439420 \ No newline at end of file diff --git a/lib/python_libtorrent/ios_arm/__init__.py b/lib/python_libtorrent/ios_arm/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/ios_arm/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_aarch64_ucs2/1.1.0/__init__.py b/lib/python_libtorrent/linux_aarch64_ucs2/1.1.0/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_aarch64_ucs2/1.1.0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_aarch64_ucs2/1.1.0/libtorrent.so.size.txt b/lib/python_libtorrent/linux_aarch64_ucs2/1.1.0/libtorrent.so.size.txt deleted file mode 100644 index 8bf018bb..00000000 --- a/lib/python_libtorrent/linux_aarch64_ucs2/1.1.0/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -5191944 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_aarch64_ucs2/__init__.py b/lib/python_libtorrent/linux_aarch64_ucs2/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_aarch64_ucs2/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_aarch64_ucs4/1.1.0/__init__.py b/lib/python_libtorrent/linux_aarch64_ucs4/1.1.0/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_aarch64_ucs4/1.1.0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_aarch64_ucs4/1.1.0/libtorrent.so.size.txt b/lib/python_libtorrent/linux_aarch64_ucs4/1.1.0/libtorrent.so.size.txt deleted file mode 100644 index 8bf018bb..00000000 --- a/lib/python_libtorrent/linux_aarch64_ucs4/1.1.0/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -5191944 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_aarch64_ucs4/1.1.1/__init__.py b/lib/python_libtorrent/linux_aarch64_ucs4/1.1.1/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_aarch64_ucs4/1.1.1/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_aarch64_ucs4/1.1.1/libtorrent.so.size.txt b/lib/python_libtorrent/linux_aarch64_ucs4/1.1.1/libtorrent.so.size.txt deleted file mode 100644 index ef8c5644..00000000 --- a/lib/python_libtorrent/linux_aarch64_ucs4/1.1.1/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2884768 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_aarch64_ucs4/__init__.py b/lib/python_libtorrent/linux_aarch64_ucs4/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_aarch64_ucs4/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv6/0.16.19/__init__.py b/lib/python_libtorrent/linux_armv6/0.16.19/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv6/0.16.19/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv6/0.16.19/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv6/0.16.19/libtorrent.so.size.txt deleted file mode 100644 index 9d285b23..00000000 --- a/lib/python_libtorrent/linux_armv6/0.16.19/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2133072 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv6/1.0.11/__init__.py b/lib/python_libtorrent/linux_armv6/1.0.11/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv6/1.0.11/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv6/1.0.11/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv6/1.0.11/libtorrent.so.size.txt deleted file mode 100644 index 9a1d6002..00000000 --- a/lib/python_libtorrent/linux_armv6/1.0.11/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2286476 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv6/1.0.6/__init__.py b/lib/python_libtorrent/linux_armv6/1.0.6/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv6/1.0.6/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv6/1.0.6/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv6/1.0.6/libtorrent.so.size.txt deleted file mode 100644 index 62a4af3f..00000000 --- a/lib/python_libtorrent/linux_armv6/1.0.6/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -1979232 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv6/1.0.7/__init__.py b/lib/python_libtorrent/linux_armv6/1.0.7/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv6/1.0.7/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv6/1.0.7/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv6/1.0.7/libtorrent.so.size.txt deleted file mode 100644 index 5ff46c86..00000000 --- a/lib/python_libtorrent/linux_armv6/1.0.7/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2286424 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv6/1.0.9/__init__.py b/lib/python_libtorrent/linux_armv6/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv6/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv6/1.0.9/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv6/1.0.9/libtorrent.so.size.txt deleted file mode 100644 index 5ff46c86..00000000 --- a/lib/python_libtorrent/linux_armv6/1.0.9/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2286424 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv6/1.1.0/__init__.py b/lib/python_libtorrent/linux_armv6/1.1.0/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv6/1.1.0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv6/1.1.0/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv6/1.1.0/libtorrent.so.size.txt deleted file mode 100644 index 56d0afee..00000000 --- a/lib/python_libtorrent/linux_armv6/1.1.0/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2388664 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv6/1.1.1/__init__.py b/lib/python_libtorrent/linux_armv6/1.1.1/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv6/1.1.1/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv6/1.1.1/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv6/1.1.1/libtorrent.so.size.txt deleted file mode 100644 index e97c6282..00000000 --- a/lib/python_libtorrent/linux_armv6/1.1.1/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2577640 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv6/1.1.6/__init__.py b/lib/python_libtorrent/linux_armv6/1.1.6/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv6/1.1.6/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv6/1.1.6/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv6/1.1.6/libtorrent.so.size.txt deleted file mode 100644 index 8df81141..00000000 --- a/lib/python_libtorrent/linux_armv6/1.1.6/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -3630144 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv6/1.1.7/__init__.py b/lib/python_libtorrent/linux_armv6/1.1.7/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv6/1.1.7/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv6/1.1.7/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv6/1.1.7/libtorrent.so.size.txt deleted file mode 100644 index 0e905c96..00000000 --- a/lib/python_libtorrent/linux_armv6/1.1.7/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -3634324 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv6/__init__.py b/lib/python_libtorrent/linux_armv6/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv6/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv7/0.16.19/__init__.py b/lib/python_libtorrent/linux_armv7/0.16.19/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv7/0.16.19/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv7/0.16.19/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv7/0.16.19/libtorrent.so.size.txt deleted file mode 100644 index 375fc94c..00000000 --- a/lib/python_libtorrent/linux_armv7/0.16.19/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -1892840 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv7/1.0.6/__init__.py b/lib/python_libtorrent/linux_armv7/1.0.6/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv7/1.0.6/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv7/1.0.6/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv7/1.0.6/libtorrent.so.size.txt deleted file mode 100644 index 98acdd6d..00000000 --- a/lib/python_libtorrent/linux_armv7/1.0.6/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2048268 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv7/1.0.7/__init__.py b/lib/python_libtorrent/linux_armv7/1.0.7/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv7/1.0.7/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv7/1.0.7/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv7/1.0.7/libtorrent.so.size.txt deleted file mode 100644 index 7cdb4776..00000000 --- a/lib/python_libtorrent/linux_armv7/1.0.7/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2093128 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv7/1.0.9/__init__.py b/lib/python_libtorrent/linux_armv7/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv7/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv7/1.0.9/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv7/1.0.9/libtorrent.so.size.txt deleted file mode 100644 index bb85f14f..00000000 --- a/lib/python_libtorrent/linux_armv7/1.0.9/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2043172 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv7/1.1.0/__init__.py b/lib/python_libtorrent/linux_armv7/1.1.0/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv7/1.1.0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv7/1.1.0/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv7/1.1.0/libtorrent.so.size.txt deleted file mode 100644 index 0866378e..00000000 --- a/lib/python_libtorrent/linux_armv7/1.1.0/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2662156 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv7/1.1.1/__init__.py b/lib/python_libtorrent/linux_armv7/1.1.1/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv7/1.1.1/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_armv7/1.1.1/libtorrent.so.size.txt b/lib/python_libtorrent/linux_armv7/1.1.1/libtorrent.so.size.txt deleted file mode 100644 index 4a58671f..00000000 --- a/lib/python_libtorrent/linux_armv7/1.1.1/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -2674612 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_armv7/__init__.py b/lib/python_libtorrent/linux_armv7/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_armv7/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_mips/1.0.9/__init__.py b/lib/python_libtorrent/linux_mips/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_mips/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_mips/1.0.9/libtorrent.so.size.txt b/lib/python_libtorrent/linux_mips/1.0.9/libtorrent.so.size.txt deleted file mode 100644 index 476b9bff..00000000 --- a/lib/python_libtorrent/linux_mips/1.0.9/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -4598636 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_mips/__init__.py b/lib/python_libtorrent/linux_mips/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_mips/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_mipsel_ucs2/1.0.9/__init__.py b/lib/python_libtorrent/linux_mipsel_ucs2/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_mipsel_ucs2/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_mipsel_ucs2/1.0.9/libtorrent.so.size.txt b/lib/python_libtorrent/linux_mipsel_ucs2/1.0.9/libtorrent.so.size.txt deleted file mode 100644 index 314f7bd9..00000000 --- a/lib/python_libtorrent/linux_mipsel_ucs2/1.0.9/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -4596396 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_mipsel_ucs2/1.1.0/__init__.py b/lib/python_libtorrent/linux_mipsel_ucs2/1.1.0/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_mipsel_ucs2/1.1.0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_mipsel_ucs2/1.1.0/libtorrent.so.size.txt b/lib/python_libtorrent/linux_mipsel_ucs2/1.1.0/libtorrent.so.size.txt deleted file mode 100644 index faeab6c5..00000000 --- a/lib/python_libtorrent/linux_mipsel_ucs2/1.1.0/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6325240 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_mipsel_ucs2/__init__.py b/lib/python_libtorrent/linux_mipsel_ucs2/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_mipsel_ucs2/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_mipsel_ucs4/1.0.9/__init__.py b/lib/python_libtorrent/linux_mipsel_ucs4/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_mipsel_ucs4/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_mipsel_ucs4/1.0.9/libtorrent.so.size.txt b/lib/python_libtorrent/linux_mipsel_ucs4/1.0.9/libtorrent.so.size.txt deleted file mode 100644 index 476b9bff..00000000 --- a/lib/python_libtorrent/linux_mipsel_ucs4/1.0.9/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -4598636 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_mipsel_ucs4/1.1.0/__init__.py b/lib/python_libtorrent/linux_mipsel_ucs4/1.1.0/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_mipsel_ucs4/1.1.0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_mipsel_ucs4/1.1.0/libtorrent.so.size.txt b/lib/python_libtorrent/linux_mipsel_ucs4/1.1.0/libtorrent.so.size.txt deleted file mode 100644 index faeab6c5..00000000 --- a/lib/python_libtorrent/linux_mipsel_ucs4/1.1.0/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6325240 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_mipsel_ucs4/__init__.py b/lib/python_libtorrent/linux_mipsel_ucs4/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_mipsel_ucs4/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86/0.16.19/__init__.py b/lib/python_libtorrent/linux_x86/0.16.19/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86/0.16.19/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86/0.16.19/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86/0.16.19/libtorrent.so.size.txt deleted file mode 100644 index a346659a..00000000 --- a/lib/python_libtorrent/linux_x86/0.16.19/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6257605 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_x86/1.0.6/__init__.py b/lib/python_libtorrent/linux_x86/1.0.6/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86/1.0.6/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86/1.0.6/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86/1.0.6/libtorrent.so.size.txt deleted file mode 100644 index 3e74d111..00000000 --- a/lib/python_libtorrent/linux_x86/1.0.6/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -3517944 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_x86/1.0.7/__init__.py b/lib/python_libtorrent/linux_x86/1.0.7/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86/1.0.7/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86/1.0.7/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86/1.0.7/libtorrent.so.size.txt deleted file mode 100644 index c7e345be..00000000 --- a/lib/python_libtorrent/linux_x86/1.0.7/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -3544068 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_x86/1.0.9/__init__.py b/lib/python_libtorrent/linux_x86/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86/1.0.9/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86/1.0.9/libtorrent.so.size.txt deleted file mode 100644 index 5b7c9ab3..00000000 --- a/lib/python_libtorrent/linux_x86/1.0.9/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -3239792 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_x86/1.1.0/__init__.py b/lib/python_libtorrent/linux_x86/1.1.0/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86/1.1.0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86/1.1.0/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86/1.1.0/libtorrent.so.size.txt deleted file mode 100644 index 18303722..00000000 --- a/lib/python_libtorrent/linux_x86/1.1.0/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -4601280 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_x86/1.1.1/__init__.py b/lib/python_libtorrent/linux_x86/1.1.1/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86/1.1.1/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86/1.1.1/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86/1.1.1/libtorrent.so.size.txt deleted file mode 100644 index 9f9b66e9..00000000 --- a/lib/python_libtorrent/linux_x86/1.1.1/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6652780 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_x86/__init__.py b/lib/python_libtorrent/linux_x86/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86_64/0.16.19/__init__.py b/lib/python_libtorrent/linux_x86_64/0.16.19/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86_64/0.16.19/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86_64/0.16.19/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86_64/0.16.19/libtorrent.so.size.txt deleted file mode 100644 index 4b476b5b..00000000 --- a/lib/python_libtorrent/linux_x86_64/0.16.19/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -6620181 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_x86_64/1.0.6/__init__.py b/lib/python_libtorrent/linux_x86_64/1.0.6/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86_64/1.0.6/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86_64/1.0.6/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86_64/1.0.6/libtorrent.so.size.txt deleted file mode 100644 index bd538ff2..00000000 --- a/lib/python_libtorrent/linux_x86_64/1.0.6/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -3514688 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_x86_64/1.0.7/__init__.py b/lib/python_libtorrent/linux_x86_64/1.0.7/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86_64/1.0.7/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86_64/1.0.7/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86_64/1.0.7/libtorrent.so.size.txt deleted file mode 100644 index bea17883..00000000 --- a/lib/python_libtorrent/linux_x86_64/1.0.7/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -3576128 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_x86_64/1.0.9/__init__.py b/lib/python_libtorrent/linux_x86_64/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86_64/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86_64/1.0.9/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86_64/1.0.9/libtorrent.so.size.txt deleted file mode 100644 index 24691028..00000000 --- a/lib/python_libtorrent/linux_x86_64/1.0.9/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -3290600 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_x86_64/1.1.0/__init__.py b/lib/python_libtorrent/linux_x86_64/1.1.0/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86_64/1.1.0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86_64/1.1.0/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86_64/1.1.0/libtorrent.so.size.txt deleted file mode 100644 index c66f5c33..00000000 --- a/lib/python_libtorrent/linux_x86_64/1.1.0/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -4246184 \ No newline at end of file diff --git a/lib/python_libtorrent/linux_x86_64/1.1.1/__init__.py b/lib/python_libtorrent/linux_x86_64/1.1.1/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/linux_x86_64/1.1.1/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/linux_x86_64/1.1.1/libtorrent.so.size.txt b/lib/python_libtorrent/linux_x86_64/1.1.1/libtorrent.so.size.txt deleted file mode 100644 index 53ec69f8..00000000 --- a/lib/python_libtorrent/linux_x86_64/1.1.1/libtorrent.so.size.txt +++ /dev/null @@ -1 +0,0 @@ -4263000 \ No newline at end of file diff --git a/lib/python_libtorrent/platform_pulsar.py b/lib/python_libtorrent/platform_pulsar.py deleted file mode 100644 index db827cac..00000000 --- a/lib/python_libtorrent/platform_pulsar.py +++ /dev/null @@ -1,198 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' - -import sys -import os -try: - import xbmc, xbmcaddon - #__settings__ = xbmcaddon.Addon(id='script.module.libtorrent') ### Alfa - #__version__ = __settings__.getAddonInfo('version') ### Alfa - #__plugin__ = __settings__.getAddonInfo('name') + " v." + __version__ ### Alfa - __settings__ = xbmcaddon.Addon(id='plugin.video.kod') ### Alfa - __version__ = '1.1.17' ### Alfa - __plugin__ = "python-libtorrent v.1.1.7" ### Alfa -except: - __plugin__ = "python-libtorrent v.1.1.7" ### Alfa - pass - -def log(msg): - try: - xbmc.log("### [%s]: %s" % (__plugin__,msg,), level=xbmc.LOGNOTICE ) - except UnicodeEncodeError: - xbmc.log("### [%s]: %s" % (__plugin__,msg.encode("utf-8", "ignore"),), level=xbmc.LOGNOTICE ) - except: - try: - xbmc.log("### [%s]: %s" % (__plugin__,'ERROR LOG',), level=xbmc.LOGNOTICE ) - except: - print msg - -def get_libname(platform): - libname=[] - if platform['system'] in ['darwin', 'linux_x86', 'linux_arm', 'linux_armv6', - 'linux_armv7', 'linux_x86_64', 'ios_arm', - 'linux_mipsel_ucs2', 'linux_mipsel_ucs4', 'linux_aarch64_ucs2', 'linux_aarch64_ucs4']: - libname=['libtorrent.so'] - elif platform['system'] == 'windows': - libname=['libtorrent.pyd'] - elif platform['system'] in ['android_armv7', 'android_x86']: - libname=['libtorrent.so', 'liblibtorrent.so'] - return libname - -def get_platform(): - #__settings__ = xbmcaddon.Addon(id='script.module.libtorrent') - #__version__ = __settings__.getAddonInfo('version') - #__plugin__ = __settings__.getAddonInfo('name') + " v." + __version__ - __language__ = __settings__.getLocalizedString - - if __settings__.getSetting('custom_system').lower() == "true": - system = int(__settings__.getSetting('set_system')) - log('USE CUSTOM SYSTEM: '+__language__(1100+system)) - - ret={} - - if system==0: - ret["os"] = "windows" - ret["arch"] = "x86" - elif system==1: - ret["os"] = "linux" - ret["arch"] = "x86" - elif system==2: - ret["os"] = "linux" - ret["arch"] = "x64" - elif system==3: - ret["os"] = "linux" - ret["arch"] = "armv7" - elif system==4: - ret["os"] = "linux" - ret["arch"] = "armv6" - elif system==5: - ret["os"] = "android" - ret["arch"] = "arm" - elif system==6: - ret["os"] = "android" - ret["arch"] = "x86" - elif system==7: - ret["os"] = "darwin" - ret["arch"] = "x64" - elif system==8: - ret["os"] = "ios" - ret["arch"] = "arm" - elif system==9: - ret["os"] = "ios" - ret["arch"] = "arm" - elif system==10: - ret["os"] = "linux" - ret["arch"] = "mipsel_ucs2" - elif system==11: - ret["os"] = "linux" - ret["arch"] = "mipsel_ucs4" - elif system == 12: - ret["os"] = "linux" - ret["arch"] = "linux_aarch64_ucs2" - elif system == 13: - ret["os"] = "linux" - ret["arch"] = "linux_aarch64_ucs4" - else: - - ret = { - "arch": sys.maxsize > 2 ** 32 and "x64" or "x86", - } - if xbmc.getCondVisibility("system.platform.android"): - ret["os"] = "android" - if "arm" in os.uname()[4] or "aarch64" in os.uname()[4]: - ret["arch"] = "arm" - elif xbmc.getCondVisibility("system.platform.linux"): - ret["os"] = "linux" - uname=os.uname()[4] - if "arm" in uname: - if "armv7" in uname: - ret["arch"] = "armv7" - else: - ret["arch"] = "armv6" - elif "mips" in uname: - if sys.maxunicode > 65536: - ret["arch"] = 'mipsel_ucs4' - else: - ret["arch"] = 'mipsel_ucs2' - elif "aarch64" in uname: - if sys.maxint > 2147483647: #is_64bit_system - if sys.maxunicode > 65536: - ret["arch"] = 'aarch64_ucs4' - else: - ret["arch"] = 'aarch64_ucs2' - else: - ret["arch"] = "armv7" #32-bit userspace - elif xbmc.getCondVisibility("system.platform.windows"): - ret["os"] = "windows" - elif xbmc.getCondVisibility("system.platform.osx"): - ret["os"] = "darwin" - elif xbmc.getCondVisibility("system.platform.ios"): - ret["os"] = "ios" - ret["arch"] = "arm" - - ret=get_system(ret) - return ret - -def get_system(ret): - ret["system"] = '' - ret["message"] = ['', ''] - - if ret["os"] == 'windows': - ret["system"] = 'windows' - ret["message"] = ['Windows has static compiled python-libtorrent included.', - 'You should install "script.module.libtorrent" from "MyShows.me Kodi Repo"'] - elif ret["os"] == "linux" and ret["arch"] == "x64": - ret["system"] = 'linux_x86_64' - ret["message"] = ['Linux x64 has not static compiled python-libtorrent included.', - 'You should install it by "sudo apt-get install python-libtorrent"'] - elif ret["os"] == "linux" and ret["arch"] == "x86": - ret["system"] = 'linux_x86' - ret["message"] = ['Linux has static compiled python-libtorrent included but it didn\'t work.', - 'You should install it by "sudo apt-get install python-libtorrent"'] - elif ret["os"] == "linux" and "aarch64" in ret["arch"]: - ret["system"] = 'linux_' + ret["arch"] - ret["message"] = ['Linux has static compiled python-libtorrent included but it didn\'t work.', - 'You should install it by "sudo apt-get install python-libtorrent"'] - elif ret["os"] == "linux" and ("arm" or "mips" in ret["arch"]): - ret["system"] = 'linux_'+ret["arch"] - ret["message"] = ['As far as I know you can compile python-libtorrent for ARMv6-7.', - 'You should search for "OneEvil\'s OpenELEC libtorrent" or use Ace Stream.'] - elif ret["os"] == "android": - if ret["arch"]=='arm': - ret["system"] = 'android_armv7' - else: - ret["system"] = 'android_x86' - ret["message"] = ['Please contact DiMartino on kodi.tv forum. We compiled python-libtorrent for Android,', - 'but we need your help with some tests on different processors.'] - elif ret["os"] == "darwin": - ret["system"] = 'darwin' - ret["message"] = ['It is possible to compile python-libtorrent for OS X.', - 'But you would have to do it by yourself, there is some info on github.com.'] - elif ret["os"] == "ios" and ret["arch"] == "arm": - ret["system"] = 'ios_arm' - ret["message"] = ['It is probably NOT possible to compile python-libtorrent for iOS.', - 'But you can use torrent-client control functions.'] - - return ret \ No newline at end of file diff --git a/lib/python_libtorrent/public.py b/lib/python_libtorrent/public.py deleted file mode 100644 index 46afdf0c..00000000 --- a/lib/python_libtorrent/public.py +++ /dev/null @@ -1,83 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' - -import os - -from platform_pulsar import get_libname - -class Public: - def __init__( self ): - self.platforms=[] - self.root=os.path.dirname(__file__) - for dir in os.listdir(self.root): - if os.path.isdir(os.path.join(self.root,dir)): - for subdir in os.listdir(os.path.join(self.root,dir)): - if os.path.isdir(os.path.join(self.root,dir,subdir)): - self.platforms.append({'system':dir, 'version':subdir}) - self._generate_size_file() - - def _generate_size_file( self ): - for platform in self.platforms: - for libname in get_libname(platform): - self.libname=libname - self.platform=platform - self.libdir = os.path.join(self.root, self.platform['system'], self.platform['version']) - self.libpath = os.path.join(self.libdir, self.libname) - self.sizepath=self.libpath+'.size.txt' - self.zipname=self.libname+'.zip' - zippath=os.path.join(self.libdir, self.zipname) - system=platform['system']+'/'+platform['version']+'/' - if os.path.exists(self.libpath): - if not os.path.exists(self.sizepath): - print system+self.libname+' NO SIZE' - self._makezip() - elif not os.path.exists(zippath): - print system+self.libname+' NO ZIP' - self._makezip() - else: - size=str(os.path.getsize(self.libpath)) - size_old=open( self.sizepath, "r" ).read() - if size_old!=size: - print system+self.libname+' NOT EQUAL' - self._makezip() - else: - print system+self.libname+' NO ACTION' - else: - print system+self.libname+' NO LIB' - - def _makezip(self): - open( self.sizepath, "w" ).write( str(os.path.getsize(self.libpath)) ) - os.chdir(self.libdir) - os.system('del %s' % (self.zipname)) - os.system('"C:\\Program Files\\7-Zip\\7z.exe" a %s.zip %s' % - (self.libname, self.libname)) - os.chdir(self.root) - #os.system('"C:\\Program Files\\7-Zip\\7z.exe" a %s.zip %s' % - # (self.platform['system']+os.sep+self.libname, self.platform['system']+os.sep+self.libname)) - -if ( __name__ == "__main__" ): - # start - #TODO: publicate - Public() \ No newline at end of file diff --git a/lib/python_libtorrent/python_libtorrent/__init__.py b/lib/python_libtorrent/python_libtorrent/__init__.py deleted file mode 100644 index a0a8485e..00000000 --- a/lib/python_libtorrent/python_libtorrent/__init__.py +++ /dev/null @@ -1,243 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' -from __future__ import absolute_import -#from builtins import str -import sys -PY3 = False -if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int - -from .functions import * -import xbmc, xbmcaddon -import sys -import os -import traceback - -__version__ = '1.1.17' -__plugin__ = "python-libtorrent v.1.1.7" -__root__ = os.path.dirname(os.path.dirname(__file__)) - -libtorrent=None -platform = get_platform() -set_dirname=__root__ -if getSettingAsBool('custom_dirname') and set_dirname: - log('set_dirname:' +str(set_dirname)) - dirname=set_dirname -else: - dirname=set_dirname - -log('dirname: ' +str(dirname)) - -#versions = ['0.16.19', '1.0.6', '1.0.7', '1.0.8', '1.0.9', '1.0.11', '1.1.0', '1.1.1', '1.1.6', '1.1.7', '1.2.2', '1.2.3'] -versions = ['0.16.19', '1.0.6', '1.0.7', '1.0.8', '1.0.9', '1.0.11', '1.1.0', '1.1.1', '1.1.6', '1.1.7', '1.2.2'] -default_path = versions[-1] -set_version = 0 -if getSettingAsBool('custom_version'): - log('set_version:' +str(set_version)+' '+versions[set_version]) - platform['version'] = versions[set_version] -else: - platform['version'] = default_path - -sizefile_path = os.path.join(__root__, platform['system'], platform['version']) -if not os.path.exists(sizefile_path): - log('set_version: no sizefile at %s back to default %s' % (sizefile_path, default_path)) - platform['version'] = default_path - sizefile_path = os.path.join(__root__, platform['system'], platform['version']) - if not os.path.exists(sizefile_path): - log('set_version: no default at %s searching for any version' % sizefile_path) - try: - versions = sorted(os.listdir(os.path.join(__root__, platform['system']))) - except: - versions = [] - for ver in versions: - if not os.path.isdir(os.path.join(__root__, platform['system'], ver)): - versions.remove(ver) - - if len(versions)>0: - platform['version'] = versions[-1] - log('set_version: chose %s out of %s' % (platform['version'], str(versions))) - else: - e = 'die because the folder is empty' - log(e) - raise Exception(e) -dest_path = os.path.join(dirname, platform['system'], platform['version']) -sys.path.insert(0, dest_path) - -lm=LibraryManager(dest_path, platform) -if not lm.check_exist(): - ok=lm.download() - xbmc.sleep(2000) - - -log('platform: ' + str(platform)) -if platform['system'] not in ['windows', 'windows_x64']: - log('os: '+str(os.uname())) - log_text = 'ucs4' if sys.maxunicode > 65536 else 'ucs2' - log_text += ' x64' if sys.maxsize > 2147483647 else ' x86' - log(log_text) - -try: - fp = '' - pathname = '' - description = '' - libtorrent = '' - from platformcode import config - - if platform['system'] in ['linux_x86', 'windows', 'windows_x64', 'linux_armv6', 'linux_armv7', - 'linux_x86_64', 'linux_mipsel_ucs2', 'linux_mipsel_ucs4', - 'linux_aarch64_ucs2', 'linux_aarch64_ucs4']: - import libtorrent - - elif PY3 and platform['system'] not in ['android_armv7', 'android_x86']: - import libtorrent - - elif platform['system'] in ['darwin', 'ios_arm']: - import imp - - path_list = [dest_path] - log('path_list = ' + str(path_list)) - fp, pathname, description = imp.find_module('libtorrent', path_list) - log('fp = ' + str(fp)) - log('pathname = ' + str(pathname)) - log('description = ' + str(description)) - try: - libtorrent = imp.load_module('libtorrent', fp, pathname, description) - finally: - if fp: fp.close() - - elif platform['system'] in ['android_armv7', 'android_x86']: - try: - import imp - from ctypes import CDLL - - dest_path=lm.android_workaround(os.path.join(xbmc.translatePath('special://xbmc/'), 'files').replace('/cache/apk/assets', '')) - dll_path=os.path.join(dest_path, 'liblibtorrent.so') - log('CDLL path = ' + dll_path) - liblibtorrent=CDLL(dll_path) - log('CDLL = ' + str(liblibtorrent)) - path_list = [dest_path] - log('path_list = ' + str(path_list)) - fp, pathname, description = imp.find_module('libtorrent', path_list) - log('fp = ' + str(fp)) - log('pathname = ' + str(pathname)) - log('description = ' + str(description)) - try: - libtorrent = imp.load_module('libtorrent', fp, pathname, description) - finally: - if fp: fp.close() - except Exception as e: - if not PY3: - e = unicode(str(e), "utf8", errors="replace").encode("utf8") - config.set_setting("libtorrent_path", "", server="torrent") - config.set_setting("libtorrent_error", str(e), server="torrent") - log(traceback.format_exc(1)) - log('fp = ' + str(fp)) - log('pathname = ' + str(pathname)) - log('description = ' + str(description)) - log('Error importing libtorrent from "' + dest_path + '". Exception: ' + str(e)) - if fp: fp.close() - - # If no permission in dest_path we need to go deeper on root! - try: - sys_path = '/data/app/' - fp = '' - pathname = sys_path - dest_path = sys_path - description = '' - libtorrent = '' - LIBTORRENT_MSG = config.get_setting("libtorrent_msg", server="torrent", default='') - if not LIBTORRENT_MSG: - dialog = xbmcgui.Dialog() - dialog.notification('KoD: '+ config.get_localizad_string(70766), config.get_localizad_string(70767), time=15000) - config.set_setting("libtorrent_msg", 'OK', server="torrent") - - from core import scrapertools - kodi_app = xbmc.translatePath('special://xbmc') - kodi_app = scrapertools.find_single_match(kodi_app, '\/\w+\/\w+\/.*?\/(.*?)\/') - kodi_dir = '%s-1' % kodi_app - dir_list = '' - try: - dir_list = os.listdir(sys_path).split() - except: - import subprocess - command = ['su', '-c', 'ls', sys_path] - p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output_cmd, error_cmd = p.communicate() - log('Comando ROOT: %s' % str(command)) - dir_list = output_cmd.split() - - if not dir_list: - raise - - for file in dir_list: - if kodi_app in file: - kodi_dir = file - break - - bits = sys.maxsize > 2 ** 32 and "64" or "" - dest_path = os.path.join(sys_path, kodi_dir, 'lib', platform['arch'] + bits) - dest_path=lm.android_workaround(new_dest_path=dest_path) - sys.path.insert(0, dest_path) - dll_path=os.path.join(dest_path, 'liblibtorrent.so') - log('NEW CDLL path = ' + dll_path) - if not PY3: - liblibtorrent=CDLL(dll_path) - log('CDLL = ' + str(liblibtorrent)) - path_list = [dest_path] - log('path_list = ' + str(path_list)) - fp, pathname, description = imp.find_module('libtorrent', path_list) - try: - libtorrent = imp.load_module('libtorrent', fp, pathname, description) - finally: - if fp: fp.close() - else: - import libtorrent - - except Exception as e: - log('ERROR Comando ROOT: %s, %s' % (str(command), str(dest_path))) - if not PY3: - e = unicode(str(e), "utf8", errors="replace").encode("utf8") - log(traceback.format_exc(1)) - log('fp = ' + str(fp)) - log('pathname = ' + str(pathname)) - log('description = ' + str(description)) - log('Error importing libtorrent from "' + dest_path + '". Exception: ' + str(e)) - if fp: fp.close() - - if libtorrent: - config.set_setting("libtorrent_path", dest_path, server="torrent") - config.set_setting("libtorrent_error", "", server="torrent") - log('Imported libtorrent v' + libtorrent.version + ' from "' + dest_path + '"') - -except Exception as e: - if not PY3: - e = unicode(str(e), "utf8", errors="replace").encode("utf8") - config.set_setting("libtorrent_path", "", server="torrent") - config.set_setting("libtorrent_error", str(e), server="torrent") - log('Error importing libtorrent from "' + dest_path + '". Exception: ' + str(e)) - if fp: fp.close() - - -def get_libtorrent(): - return libtorrent diff --git a/lib/python_libtorrent/python_libtorrent/functions.py b/lib/python_libtorrent/python_libtorrent/functions.py deleted file mode 100644 index da479591..00000000 --- a/lib/python_libtorrent/python_libtorrent/functions.py +++ /dev/null @@ -1,187 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' -from __future__ import absolute_import -#from builtins import str -import sys -PY3 = False -if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int -from builtins import object - -import os -import xbmc, xbmcgui, xbmcaddon - -from .net import HTTP -from core import filetools ### Alfa - -__libbaseurl__ = "https://github.com/DiMartinoXBMC/script.module.libtorrent/raw/master/python_libtorrent" -#__settings__ = xbmcaddon.Addon(id='script.module.libtorrent') -#__version__ = __settings__.getAddonInfo('version') -#__plugin__ = __settings__.getAddonInfo('name') + " v." + __version__ -#__icon__=os.path.join(xbmc.translatePath('special://home'), 'addons', -# 'script.module.libtorrent', 'icon.png') -#__settings__ = xbmcaddon.Addon(id='plugin.video.kod') ### Alfa -__version__ = '1.1.17' ### Alfa -__plugin__ = "python-libtorrent v.1.1.7" ### Alfa -__icon__=os.path.join(xbmc.translatePath('special://home'), 'addons', - 'plugin.video.kod', 'icon.png') ### Alfa -#__language__ = __settings__.getLocalizedString ### Alfa - -#from python_libtorrent.platform_pulsar import get_platform, get_libname ### Alfa -from lib.python_libtorrent.python_libtorrent.platform_pulsar import get_platform, get_libname ### Alfa - -def log(msg): - try: - xbmc.log("### [%s]: %s" % (__plugin__,msg,), level=xbmc.LOGNOTICE ) - except UnicodeEncodeError: - xbmc.log("### [%s]: %s" % (__plugin__,msg.encode("utf-8", "ignore"),), level=xbmc.LOGNOTICE ) - except: - xbmc.log("### [%s]: %s" % (__plugin__,'ERROR LOG',), level=xbmc.LOGNOTICE ) - -def getSettingAsBool(setting): - __settings__ = xbmcaddon.Addon(id='plugin.video.kod') ### Alfa - return __settings__.getSetting(setting).lower() == "true" - -class LibraryManager(object): - def __init__(self, dest_path, platform): - self.dest_path = dest_path - self.platform = platform - self.root=os.path.dirname(os.path.dirname(__file__)) - ver1, ver2, ver3 = platform['version'].split('.') ### Alfa: resto método - try: - ver1 = int(ver1) - ver2 = int(ver2) - except: - pass - if ver1 >= 1 and ver2 >= 2: - global __libbaseurl__ - #__libbaseurl__ = 'https://github.com/alfa-addon/alfa-repo/raw/master/downloads/libtorrent' - __libbaseurl__ = 'https://bitbucket.org/alfa_addon/alfa-repo/raw/master/downloads/libtorrent' - - def check_exist(self): - for libname in get_libname(self.platform): - if not filetools.exists(os.path.join(self.dest_path,libname)): - return False - return True - - def check_update(self): - need_update=False - for libname in get_libname(self.platform): - if libname!='liblibtorrent.so': - self.libpath = os.path.join(self.dest_path, libname) - self.sizepath=os.path.join(self.root, self.platform['system'], self.platform['version'], libname+'.size.txt') - size=str(os.path.getsize(self.libpath)) - size_old=open( self.sizepath, "r" ).read() - if size_old!=size: - need_update=True - return need_update - - def update(self): - if self.check_update(): - for libname in get_libname(self.platform): - self.libpath = os.path.join(self.dest_path, libname) - filetools.remove(self.libpath) - self.download() - - def download(self): - __settings__ = xbmcaddon.Addon(id='plugin.video.kod') ### Alfa - filetools.mkdir(self.dest_path) - for libname in get_libname(self.platform): - dest = os.path.join(self.dest_path, libname) - log("try to fetch %s" % libname) - url = "%s/%s/%s/%s.zip" % (__libbaseurl__, self.platform['system'], self.platform['version'], libname) - if libname!='liblibtorrent.so': - try: - self.http = HTTP() - self.http.fetch(url, download=dest + ".zip", progress=False) ### Alfa - log("%s -> %s" % (url, dest)) - xbmc.executebuiltin('XBMC.Extract("%s.zip","%s")' % (dest, self.dest_path), True) - filetools.remove(dest + ".zip") - except: - text = 'Failed download %s!' % libname - xbmc.executebuiltin("XBMC.Notification(%s,%s,%s,%s)" % (__plugin__,text,750,__icon__)) - else: - filetools.copy(os.path.join(self.dest_path, 'libtorrent.so'), dest, silent=True) ### Alfa - dest_alfa = os.path.join(xbmc.translatePath(__settings__.getAddonInfo('Path')), \ - 'lib', libname) ### Alfa - filetools.copy(dest, dest_alfa, silent=True) ### Alfa - dest_alfa = os.path.join(xbmc.translatePath(__settings__.getAddonInfo('Profile')), \ - 'custom_code', 'lib', libname) ### Alfa - filetools.copy(dest, dest_alfa, silent=True) ### Alfa - return True - - def android_workaround(self, new_dest_path): ### Alfa (entera) - import subprocess - - for libname in get_libname(self.platform): - libpath=os.path.join(self.dest_path, libname) - size=str(os.path.getsize(libpath)) - new_libpath=os.path.join(new_dest_path, libname) - - if filetools.exists(new_libpath): - new_size=str(os.path.getsize(new_libpath)) - if size != new_size: - filetools.remove(new_libpath) - if filetools.exists(new_libpath): - try: - command = ['su', '-c', 'rm', '%s' % new_libpath] - p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output_cmd, error_cmd = p.communicate() - log('Comando ROOT: %s' % str(command)) - except: - log('Sin PERMISOS ROOT: %s' % str(command)) - - if not filetools.exists(new_libpath): - log('Deleted: (%s) %s -> (%s) %s' %(size, libpath, new_size, new_libpath)) - - if not filetools.exists(new_libpath): - filetools.copy(libpath, new_libpath, silent=True) ### ALFA - log('Copying... %s -> %s' %(libpath, new_libpath)) - - if not filetools.exists(new_libpath): - try: - command = ['su', '-c', 'cp', '%s' % libpath, '%s' % new_libpath] - p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output_cmd, error_cmd = p.communicate() - log('Comando ROOT: %s' % str(command)) - - command = ['su', '-c', 'chmod', '777', '%s' % new_libpath] - p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output_cmd, error_cmd = p.communicate() - log('Comando ROOT: %s' % str(command)) - except: - log('Sin PERMISOS ROOT: %s' % str(command)) - - if not filetools.exists(new_libpath): - log('ROOT Copy Failed!') - - else: - command = ['chmod', '777', '%s' % new_libpath] - p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output_cmd, error_cmd = p.communicate() - log('Comando: %s' % str(command)) - else: - log('Module exists. Not copied... %s' % new_libpath) ### ALFA - - return new_dest_path diff --git a/lib/python_libtorrent/python_libtorrent/net.py b/lib/python_libtorrent/python_libtorrent/net.py deleted file mode 100644 index 68519899..00000000 --- a/lib/python_libtorrent/python_libtorrent/net.py +++ /dev/null @@ -1,332 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' -from __future__ import division -from future import standard_library -standard_library.install_aliases() -#from builtins import str -import sys -PY3 = False -if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int -from builtins import object -from past.utils import old_div - -import os -import time -import re -import urllib.request, urllib.parse, urllib.error -# import http.cookiejar -import future.backports.http.cookiejar as http_cookiejar -import base64 - -import xbmc -import xbmcgui -#import xbmcvfs ### Alfa - -RE = { - 'content-disposition': re.compile('attachment;\sfilename="*([^"\s]+)"|\s') -} - -# ################################ -# -# HTTP -# -# ################################ - -class HTTP(object): - def __init__(self): - #self._dirname = xbmc.translatePath('special://temp') ### Alfa - #for subdir in ('xbmcup', 'script.module.libtorrent'): ### Alfa - self._dirname = os.path.dirname(os.path.dirname(__file__)) ### Alfa - #for subdir in ('lib', 'python_libtorrent'): ### Alfa - # self._dirname = os.path.join(self._dirname, subdir) ### Alfa - # if not xbmcvfs.exists(self._dirname): ### Alfa - # xbmcvfs.mkdir(self._dirname) ### Alfa - - def fetch(self, request, **kwargs): - self.con, self.fd, self.progress, self.cookies, self.request = None, None, None, None, request - - if not isinstance(self.request, HTTPRequest): - self.request = HTTPRequest(url=self.request, **kwargs) - - self.response = HTTPResponse(self.request) - - xbmc.log('XBMCup: HTTP: request: ' + str(self.request), xbmc.LOGDEBUG) - - try: - self._opener() - self._fetch() - except Exception as e: - xbmc.log('XBMCup: HTTP: ' + str(e), xbmc.LOGERROR) - if isinstance(e, urllib.error.HTTPError): - self.response.code = e.code - self.response.error = e - else: - self.response.code = 200 - - if self.fd: - self.fd.close() - self.fd = None - - if self.con: - self.con.close() - self.con = None - - if self.progress: - self.progress.close() - self.progress = None - - self.response.time = time.time() - self.response.time - - xbmc.log('XBMCup: HTTP: response: ' + str(self.response), xbmc.LOGDEBUG) - - return self.response - - def _opener(self): - - build = [urllib.request.HTTPHandler()] - - if self.request.redirect: - build.append(urllib.request.HTTPRedirectHandler()) - - if self.request.proxy_host and self.request.proxy_port: - build.append(urllib.request.ProxyHandler( - {self.request.proxy_protocol: self.request.proxy_host + ':' + str(self.request.proxy_port)})) - - if self.request.proxy_username: - proxy_auth_handler = urllib.request.ProxyBasicAuthHandler() - proxy_auth_handler.add_password('realm', 'uri', self.request.proxy_username, - self.request.proxy_password) - build.append(proxy_auth_handler) - - if self.request.cookies: - self.request.cookies = os.path.join(self._dirname, self.request.cookies) - self.cookies = http_cookiejar.MozillaCookieJar() - if os.path.isfile(self.request.cookies): - self.cookies.load(self.request.cookies) - build.append(urllib.request.HTTPCookieProcessor(self.cookies)) - - urllib.request.install_opener(urllib.request.build_opener(*build)) - - def _fetch(self): - params = {} if self.request.params is None else self.request.params - - if self.request.upload: - boundary, upload = self._upload(self.request.upload, params) - req = urllib.request.Request(self.request.url) - req.add_data(upload) - else: - - if self.request.method == 'POST': - if isinstance(params, dict) or isinstance(params, list): - params = urllib.parse.urlencode(params) - req = urllib.request.Request(self.request.url, params) - else: - req = urllib.request.Request(self.request.url) - - for key, value in self.request.headers.items(): - req.add_header(key, value) - - if self.request.upload: - req.add_header('Content-type', 'multipart/form-data; boundary=%s' % boundary) - req.add_header('Content-length', len(upload)) - - if self.request.auth_username and self.request.auth_password: - req.add_header('Authorization', 'Basic %s' % base64.encodestring( - ':'.join([self.request.auth_username, self.request.auth_password])).strip()) - - self.con = urllib.request.urlopen(req, timeout=self.request.timeout) - # self.con = urllib2.urlopen(req) - self.response.headers = self._headers(self.con.info()) - - if self.request.download: - self._download() - else: - self.response.body = self.con.read() - - if self.request.cookies: - self.cookies.save(self.request.cookies) - - def _download(self): - fd = open(self.request.download, 'wb') - if self.request.progress: - self.progress = xbmcgui.DialogProgress() - self.progress.create(u'Download') - - bs = 1024 * 8 - size = -1 - read = 0 - name = None - - if self.request.progress: - if 'content-length' in self.response.headers: - size = int(self.response.headers['content-length']) - if 'content-disposition' in self.response.headers: - r = RE['content-disposition'].search(self.response.headers['content-disposition']) - if r: - name = urllib.parse.unquote(r.group(1)) - - while 1: - buf = self.con.read(bs) - if not buf: - break - read += len(buf) - fd.write(buf) - - if self.request.progress: - self.progress.update(*self._progress(read, size, name)) - - self.response.filename = self.request.download - - def _upload(self, upload, params): - import mimetools - import itertools - - res = [] - boundary = mimetools.choose_boundary() - part_boundary = '--' + boundary - - if params: - for name, value in params.items(): - res.append([part_boundary, 'Content-Disposition: form-data; name="%s"' % name, '', value]) - - if isinstance(upload, dict): - upload = [upload] - - for obj in upload: - name = obj.get('name') - filename = obj.get('filename', 'default') - content_type = obj.get('content-type') - try: - body = obj['body'].read() - except AttributeError: - body = obj['body'] - - if content_type: - res.append([part_boundary, - 'Content-Disposition: file; name="%s"; filename="%s"' % (name, urllib.parse.quote(filename)), - 'Content-Type: %s' % content_type, '', body]) - else: - res.append([part_boundary, - 'Content-Disposition: file; name="%s"; filename="%s"' % (name, urllib.parse.quote(filename)), '', - body]) - - result = list(itertools.chain(*res)) - result.append('--' + boundary + '--') - result.append('') - return boundary, '\r\n'.join(result) - - def _headers(self, raw): - headers = {} - for line in str(raw).split('\n'): - pair = line.split(':', 1) - if len(pair) == 2: - tag = pair[0].lower().strip() - value = pair[1].strip() - if tag and value: - headers[tag] = value - return headers - - def _progress(self, read, size, name): - res = [] - if size < 0: - res.append(1) - else: - res.append(int(float(read) / (float(size) / 100.0))) - if name: - res.append(u'File: ' + name) - if size != -1: - res.append(u'Size: ' + self._human(size)) - res.append(u'Load: ' + self._human(read)) - return res - - def _human(self, size): - human = None - for h, f in (('KB', 1024), ('MB', 1024 * 1024), ('GB', 1024 * 1024 * 1024), ('TB', 1024 * 1024 * 1024 * 1024)): - if old_div(size, f) > 0: - human = h - factor = f - else: - break - if human is None: - return (u'%10.1f %s' % (size, u'byte')).replace(u'.0', u'') - else: - return u'%10.2f %s' % (float(size) / float(factor), human) - - -class HTTPRequest(object): - def __init__(self, url, method='GET', headers=None, cookies=None, params=None, upload=None, download=None, - progress=False, auth_username=None, auth_password=None, proxy_protocol='http', proxy_host=None, - proxy_port=None, proxy_username=None, proxy_password='', timeout=20.0, redirect=True, gzip=False): - if headers is None: - headers = {} - - self.url = url - self.method = method - self.headers = headers - - self.cookies = cookies - - self.params = params - - self.upload = upload - self.download = download - self.progress = progress - - self.auth_username = auth_username - self.auth_password = auth_password - - self.proxy_protocol = proxy_protocol - self.proxy_host = proxy_host - self.proxy_port = proxy_port - self.proxy_username = proxy_username - self.proxy_password = proxy_password - - self.timeout = timeout - - self.redirect = redirect - - self.gzip = gzip - - def __repr__(self): - return '%s(%s)' % (self.__class__.__name__, ','.join('%s=%r' % i for i in self.__dict__.items())) - - -class HTTPResponse(object): - def __init__(self, request): - self.request = request - self.code = None - self.headers = {} - self.error = None - self.body = None - self.filename = None - self.time = time.time() - - def __repr__(self): - args = ','.join('%s=%r' % i for i in self.__dict__.items() if i[0] != 'body') - if self.body: - args += ',body=' - else: - args += ',body=None' - return '%s(%s)' % (self.__class__.__name__, args) diff --git a/lib/python_libtorrent/python_libtorrent/platform_pulsar.py b/lib/python_libtorrent/python_libtorrent/platform_pulsar.py deleted file mode 100644 index 1153b44b..00000000 --- a/lib/python_libtorrent/python_libtorrent/platform_pulsar.py +++ /dev/null @@ -1,208 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' -from __future__ import print_function -import sys -PY3 = False -if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int - -import os -try: - import xbmc, xbmcaddon - #__settings__ = xbmcaddon.Addon(id='script.module.libtorrent') ### Alfa - #__version__ = __settings__.getAddonInfo('version') ### Alfa - #__plugin__ = __settings__.getAddonInfo('name') + " v." + __version__ ### Alfa - __settings__ = xbmcaddon.Addon(id='plugin.video.kod') ### Alfa - __version__ = '1.1.17' ### Alfa - __plugin__ = "python-libtorrent v.1.1.7" ### Alfa -except: - __plugin__ = "python-libtorrent v.1.1.7" ### Alfa - pass - -def log(msg): - try: - xbmc.log("### [%s]: %s" % (__plugin__,msg,), level=xbmc.LOGNOTICE ) - except UnicodeEncodeError: - xbmc.log("### [%s]: %s" % (__plugin__,msg.encode("utf-8", "ignore"),), level=xbmc.LOGNOTICE ) - except: - try: - xbmc.log("### [%s]: %s" % (__plugin__,'ERROR LOG',), level=xbmc.LOGNOTICE ) - except: - print(msg) - -def get_libname(platform): - libname=[] - if platform['system'] in ['darwin', 'linux_x86', 'linux_arm', 'linux_armv6', - 'linux_armv7', 'linux_x86_64', 'ios_arm', - 'linux_mipsel_ucs2', 'linux_mipsel_ucs4', 'linux_aarch64_ucs2', 'linux_aarch64_ucs4']: - libname=['libtorrent.so'] - elif platform['system'] in ['windows', 'windows_x64']: ### Alfa - libname=['libtorrent.pyd'] - elif platform['system'] in ['android_armv7', 'android_x86']: - libname=['libtorrent.so', 'liblibtorrent.so'] - return libname - -def get_platform(): - #__settings__ = xbmcaddon.Addon(id='script.module.libtorrent') ### Alfa - #__version__ = __settings__.getAddonInfo('version') ### Alfa - #__plugin__ = __settings__.getAddonInfo('name') + " v." + __version__ ### Alfa - __settings__ = xbmcaddon.Addon(id='plugin.video.kod') ### Alfa - __version__ = '1.1.17' ### Alfa - __plugin__ = "python-libtorrent v.1.1.7" ### Alfa - __language__ = __settings__.getLocalizedString - - if __settings__.getSetting('custom_system').lower() == "true": - system = int(__settings__.getSetting('set_system')) - log('USE CUSTOM SYSTEM: '+__language__(1100+system)) - - ret={} - - if system==0: - ret["os"] = "windows" - ret["arch"] = "x86" - elif system==1: - ret["os"] = "linux" - ret["arch"] = "x86" - elif system==2: - ret["os"] = "linux" - ret["arch"] = "x64" - elif system==3: - ret["os"] = "linux" - ret["arch"] = "armv7" - elif system==4: - ret["os"] = "linux" - ret["arch"] = "armv6" - elif system==5: - ret["os"] = "android" - ret["arch"] = "arm" - elif system==6: - ret["os"] = "android" - ret["arch"] = "x86" - elif system==7: - ret["os"] = "darwin" - ret["arch"] = "x64" - elif system==8: - ret["os"] = "ios" - ret["arch"] = "arm" - elif system==9: - ret["os"] = "ios" - ret["arch"] = "arm" - elif system==10: - ret["os"] = "linux" - ret["arch"] = "mipsel_ucs2" - elif system==11: - ret["os"] = "linux" - ret["arch"] = "mipsel_ucs4" - elif system == 12: - ret["os"] = "linux" - ret["arch"] = "linux_aarch64_ucs2" - elif system == 13: - ret["os"] = "linux" - ret["arch"] = "linux_aarch64_ucs4" - else: - - ret = { - "arch": sys.maxsize > 2 ** 32 and "x64" or "x86", - } - if xbmc.getCondVisibility("system.platform.android"): - ret["os"] = "android" - if "arm" in os.uname()[4] or "aarch64" in os.uname()[4]: - ret["arch"] = "arm" - elif xbmc.getCondVisibility("system.platform.linux"): - ret["os"] = "linux" - uname=os.uname()[4] - if "arm" in uname: - if "armv7" in uname: - ret["arch"] = "armv7" - else: - ret["arch"] = "armv6" - elif "mips" in uname: - if sys.maxunicode > 65536: - ret["arch"] = 'mipsel_ucs4' - else: - ret["arch"] = 'mipsel_ucs2' - elif "aarch64" in uname: - if sys.maxsize > 2147483647: #is_64bit_system - if sys.maxunicode > 65536: - ret["arch"] = 'aarch64_ucs4' - else: - ret["arch"] = 'aarch64_ucs2' - else: - ret["arch"] = "armv7" #32-bit userspace - elif xbmc.getCondVisibility("system.platform.windows"): - ret["os"] = "windows" - elif xbmc.getCondVisibility("system.platform.osx"): - ret["os"] = "darwin" - elif xbmc.getCondVisibility("system.platform.ios"): - ret["os"] = "ios" - ret["arch"] = "arm" - - ret=get_system(ret) - return ret - -def get_system(ret): - ret["system"] = '' - ret["message"] = ['', ''] - - if ret["os"] == 'windows' and ret["arch"] != "x64": ### Alfa - ret["system"] = 'windows' - ret["message"] = ['Windows has static compiled python-libtorrent included.', - 'You should install "script.module.libtorrent" from "MyShows.me Kodi Repo"'] - elif ret["os"] == 'windows' and ret["arch"] == "x64": ### Alfa - ret["system"] = 'windows_x64' ### Alfa - ret["message"] = ['Windows x64 has static compiled python-libtorrent included.', ### Alfa - 'You should install "script.module.libtorrent" from "MyShows.me Kodi Repo"'] ### Alfa - elif ret["os"] == "linux" and ret["arch"] == "x64": - ret["system"] = 'linux_x86_64' - ret["message"] = ['Linux x64 has not static compiled python-libtorrent included.', - 'You should install it by "sudo apt-get install python-libtorrent"'] - elif ret["os"] == "linux" and ret["arch"] == "x86": - ret["system"] = 'linux_x86' - ret["message"] = ['Linux has static compiled python-libtorrent included but it didn\'t work.', - 'You should install it by "sudo apt-get install python-libtorrent"'] - elif ret["os"] == "linux" and "aarch64" in ret["arch"]: - ret["system"] = 'linux_' + ret["arch"] - ret["message"] = ['Linux has static compiled python-libtorrent included but it didn\'t work.', - 'You should install it by "sudo apt-get install python-libtorrent"'] - elif ret["os"] == "linux" and ("arm" or "mips" in ret["arch"]): - ret["system"] = 'linux_'+ret["arch"] - ret["message"] = ['As far as I know you can compile python-libtorrent for ARMv6-7.', - 'You should search for "OneEvil\'s OpenELEC libtorrent" or use Ace Stream.'] - elif ret["os"] == "android": - if ret["arch"]=='arm': - ret["system"] = 'android_armv7' - else: - ret["system"] = 'android_x86' - ret["message"] = ['Please contact DiMartino on kodi.tv forum. We compiled python-libtorrent for Android,', - 'but we need your help with some tests on different processors.'] - elif ret["os"] == "darwin": - ret["system"] = 'darwin' - ret["message"] = ['It is possible to compile python-libtorrent for OS X.', - 'But you would have to do it by yourself, there is some info on github.com.'] - elif ret["os"] == "ios" and ret["arch"] == "arm": - ret["system"] = 'ios_arm' - ret["message"] = ['It is probably NOT possible to compile python-libtorrent for iOS.', - 'But you can use torrent-client control functions.'] - - return ret \ No newline at end of file diff --git a/lib/python_libtorrent/windows/0.16.19/__init__.py b/lib/python_libtorrent/windows/0.16.19/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/windows/0.16.19/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/windows/0.16.19/libtorrent.pyd.size.txt b/lib/python_libtorrent/windows/0.16.19/libtorrent.pyd.size.txt deleted file mode 100644 index f7b7ca56..00000000 --- a/lib/python_libtorrent/windows/0.16.19/libtorrent.pyd.size.txt +++ /dev/null @@ -1 +0,0 @@ -2363904 \ No newline at end of file diff --git a/lib/python_libtorrent/windows/1.0.6/__init__.py b/lib/python_libtorrent/windows/1.0.6/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/windows/1.0.6/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/windows/1.0.6/libtorrent.pyd.size.txt b/lib/python_libtorrent/windows/1.0.6/libtorrent.pyd.size.txt deleted file mode 100644 index 3c2fa282..00000000 --- a/lib/python_libtorrent/windows/1.0.6/libtorrent.pyd.size.txt +++ /dev/null @@ -1 +0,0 @@ -2281472 \ No newline at end of file diff --git a/lib/python_libtorrent/windows/1.0.8/__init__.py b/lib/python_libtorrent/windows/1.0.8/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/windows/1.0.8/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/windows/1.0.8/libtorrent.pyd.size.txt b/lib/python_libtorrent/windows/1.0.8/libtorrent.pyd.size.txt deleted file mode 100644 index d073a9fc..00000000 --- a/lib/python_libtorrent/windows/1.0.8/libtorrent.pyd.size.txt +++ /dev/null @@ -1 +0,0 @@ -2426368 \ No newline at end of file diff --git a/lib/python_libtorrent/windows/1.0.9/__init__.py b/lib/python_libtorrent/windows/1.0.9/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/windows/1.0.9/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/windows/1.0.9/libtorrent.pyd.size.txt b/lib/python_libtorrent/windows/1.0.9/libtorrent.pyd.size.txt deleted file mode 100644 index 117a8649..00000000 --- a/lib/python_libtorrent/windows/1.0.9/libtorrent.pyd.size.txt +++ /dev/null @@ -1 +0,0 @@ -2427392 \ No newline at end of file diff --git a/lib/python_libtorrent/windows/1.1.1/__init__.py b/lib/python_libtorrent/windows/1.1.1/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/windows/1.1.1/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/windows/1.1.1/libtorrent.pyd.size.txt b/lib/python_libtorrent/windows/1.1.1/libtorrent.pyd.size.txt deleted file mode 100644 index 9f5f81bd..00000000 --- a/lib/python_libtorrent/windows/1.1.1/libtorrent.pyd.size.txt +++ /dev/null @@ -1 +0,0 @@ -2671616 \ No newline at end of file diff --git a/lib/python_libtorrent/windows/1.2.2/__init__.py b/lib/python_libtorrent/windows/1.2.2/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/windows/1.2.2/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/windows/1.2.2/libtorrent.pyd.size.txt b/lib/python_libtorrent/windows/1.2.2/libtorrent.pyd.size.txt deleted file mode 100644 index 1b2e3d2c..00000000 --- a/lib/python_libtorrent/windows/1.2.2/libtorrent.pyd.size.txt +++ /dev/null @@ -1 +0,0 @@ -2996736 \ No newline at end of file diff --git a/lib/python_libtorrent/windows/1.2.3/__init__.py b/lib/python_libtorrent/windows/1.2.3/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/windows/1.2.3/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/windows/1.2.3/libtorrent.pyd.size.txt b/lib/python_libtorrent/windows/1.2.3/libtorrent.pyd.size.txt deleted file mode 100644 index 8d654ae7..00000000 --- a/lib/python_libtorrent/windows/1.2.3/libtorrent.pyd.size.txt +++ /dev/null @@ -1 +0,0 @@ -3049472 \ No newline at end of file diff --git a/lib/python_libtorrent/windows/__init__.py b/lib/python_libtorrent/windows/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/windows/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/windows_x64/1.2.2/__init__.py b/lib/python_libtorrent/windows_x64/1.2.2/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/windows_x64/1.2.2/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/windows_x64/1.2.2/libtorrent.pyd b/lib/python_libtorrent/windows_x64/1.2.2/libtorrent.pyd deleted file mode 100644 index eb0bf80f..00000000 Binary files a/lib/python_libtorrent/windows_x64/1.2.2/libtorrent.pyd and /dev/null differ diff --git a/lib/python_libtorrent/windows_x64/1.2.2/libtorrent.pyd.size.txt b/lib/python_libtorrent/windows_x64/1.2.2/libtorrent.pyd.size.txt deleted file mode 100644 index 449c75d2..00000000 --- a/lib/python_libtorrent/windows_x64/1.2.2/libtorrent.pyd.size.txt +++ /dev/null @@ -1 +0,0 @@ -4290048 \ No newline at end of file diff --git a/lib/python_libtorrent/windows_x64/1.2.3/__init__.py b/lib/python_libtorrent/windows_x64/1.2.3/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/windows_x64/1.2.3/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/python_libtorrent/windows_x64/1.2.3/libtorrent.pyd.size.txt b/lib/python_libtorrent/windows_x64/1.2.3/libtorrent.pyd.size.txt deleted file mode 100644 index 2a4790d3..00000000 --- a/lib/python_libtorrent/windows_x64/1.2.3/libtorrent.pyd.size.txt +++ /dev/null @@ -1 +0,0 @@ -3797504 \ No newline at end of file diff --git a/lib/python_libtorrent/windows_x64/__init__.py b/lib/python_libtorrent/windows_x64/__init__.py deleted file mode 100644 index e0aed70e..00000000 --- a/lib/python_libtorrent/windows_x64/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#-*- coding: utf-8 -*- -''' - python-libtorrent for Kodi (script.module.libtorrent) - Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' diff --git a/lib/quasar/daemon.py b/lib/quasar/daemon.py deleted file mode 100644 index 6f1dbe7e..00000000 --- a/lib/quasar/daemon.py +++ /dev/null @@ -1,295 +0,0 @@ -import os -import stat -import time -import xbmc -import shutil -import socket -import urllib2 -import xbmcgui -import threading -import subprocess -from quasar.logger import log -from quasar.osarch import PLATFORM -from quasar.config import QUASARD_HOST -from quasar.addon import ADDON, ADDON_ID, ADDON_PATH -from quasar.util import notify, system_information, getLocalizedString, getWindowsShortPath - -def ensure_exec_perms(file_): - st = os.stat(file_) - os.chmod(file_, st.st_mode | stat.S_IEXEC) - return file_ - -def android_get_current_appid(): - with open("/proc/%d/cmdline" % os.getpid()) as fp: - return fp.read().rstrip("\0") - -def get_quasard_checksum(path): - try: - with open(path) as fp: - fp.seek(-40, os.SEEK_END) # we put a sha1 there - return fp.read() - except Exception: - return "" - -def get_quasar_binary(): - binary = "quasar" + (PLATFORM["os"] == "windows" and ".exe" or "") - - log.info("PLATFORM: %s" % str(PLATFORM)) - binary_dir = os.path.join(ADDON_PATH, "resources", "bin", "%(os)s_%(arch)s" % PLATFORM) - if PLATFORM["os"] == "android": - log.info("Detected binary folder: %s" % binary_dir) - binary_dir_legacy = binary_dir.replace("/storage/emulated/0", "/storage/emulated/legacy") - if os.path.exists(binary_dir_legacy): - binary_dir = binary_dir_legacy - log.info("Using binary folder: %s" % binary_dir) - app_id = android_get_current_appid() - xbmc_data_path = os.path.join("/data", "data", app_id) - - try: #Test if there is any permisions problem - f = open(os.path.join(xbmc_data_path, "test.txt"), "wb") - f.write("test") - f.close() - os.remove(os.path.join(xbmc_data_path, "test.txt")) - except: - xbmc_data_path = '' - - if not os.path.exists(xbmc_data_path): - log.info("%s path does not exist, so using %s as xbmc_data_path" % (xbmc_data_path, xbmc.translatePath("special://xbmcbin/"))) - xbmc_data_path = xbmc.translatePath("special://xbmcbin/") - - try: #Test if there is any permisions problem - f = open(os.path.join(xbmc_data_path, "test.txt"), "wb") - f.write("test") - f.close() - os.remove(os.path.join(xbmc_data_path, "test.txt")) - except: - xbmc_data_path = '' - - if not os.path.exists(xbmc_data_path): - log.info("%s path does not exist, so using %s as xbmc_data_path" % (xbmc_data_path, xbmc.translatePath("special://masterprofile/"))) - xbmc_data_path = xbmc.translatePath("special://masterprofile/") - dest_binary_dir = os.path.join(xbmc_data_path, "files", ADDON_ID, "bin", "%(os)s_%(arch)s" % PLATFORM) - else: - dest_binary_dir = os.path.join(xbmc.translatePath(ADDON.getAddonInfo("profile")).decode('utf-8'), "bin", "%(os)s_%(arch)s" % PLATFORM) - - log.info("Using destination binary folder: %s" % dest_binary_dir) - binary_path = os.path.join(binary_dir, binary) - dest_binary_path = os.path.join(dest_binary_dir, binary) - - if not os.path.exists(binary_path): - notify((getLocalizedString(30103) + " %(os)s_%(arch)s" % PLATFORM), time=7000) - system_information() - try: - log.info("Source directory (%s):\n%s" % (binary_dir, os.listdir(os.path.join(binary_dir, "..")))) - log.info("Destination directory (%s):\n%s" % (dest_binary_dir, os.listdir(os.path.join(dest_binary_dir, "..")))) - except Exception: - pass - return False, False - - if os.path.isdir(dest_binary_path): - log.warning("Destination path is a directory, expected previous binary file, removing...") - try: - shutil.rmtree(dest_binary_path) - except Exception as e: - log.error("Unable to remove destination path for update: %s" % e) - system_information() - return False, False - - if not os.path.exists(dest_binary_path) or get_quasard_checksum(dest_binary_path) != get_quasard_checksum(binary_path): - log.info("Updating quasar daemon...") - try: - os.makedirs(dest_binary_dir) - except OSError: - pass - try: - shutil.rmtree(dest_binary_dir) - except Exception as e: - log.error("Unable to remove destination path for update: %s" % e) - system_information() - pass - try: - shutil.copytree(binary_dir, dest_binary_dir) - except Exception as e: - log.error("Unable to copy to destination path for update: %s" % e) - system_information() - return False, False - - # Clean stale files in the directory, as this can cause headaches on - # Android when they are unreachable - dest_files = set(os.listdir(dest_binary_dir)) - orig_files = set(os.listdir(binary_dir)) - log.info("Deleting stale files %s" % (dest_files - orig_files)) - for file_ in (dest_files - orig_files): - path = os.path.join(dest_binary_dir, file_) - if os.path.isdir(path): - shutil.rmtree(path) - else: - os.remove(path) - - return dest_binary_dir, ensure_exec_perms(dest_binary_path) - -def clear_fd_inherit_flags(): - # Ensure the spawned quasar binary doesn't inherit open files from Kodi - # which can break things like addon updates. [WINDOWS ONLY] - from ctypes import windll - - HANDLE_RANGE = xrange(0, 65536) - HANDLE_FLAG_INHERIT = 1 - FILE_TYPE_DISK = 1 - - for hd in HANDLE_RANGE: - if windll.kernel32.GetFileType(hd) == FILE_TYPE_DISK: - if not windll.kernel32.SetHandleInformation(hd, HANDLE_FLAG_INHERIT, 0): - log.error("Error clearing inherit flag, disk file handle %x" % hd) - - -def jsonrpc_enabled(notify=False): - try: - s = socket.socket() - s.connect(('127.0.0.1', 9090)) - s.close() - log.info("Kodi's JSON-RPC service is available, starting up...") - del s - return True - except Exception as e: - log.error(repr(e)) - if notify: - xbmc.executebuiltin("ActivateWindow(ServiceSettings)") - dialog = xbmcgui.Dialog() - dialog.ok("Quasar", getLocalizedString(30199)) - return False - -def start_quasard(**kwargs): - jsonrpc_failures = 0 - while jsonrpc_enabled() is False: - jsonrpc_failures += 1 - log.warning("Unable to connect to Kodi's JSON-RPC service, retrying...") - if jsonrpc_failures > 1: - time.sleep(5) - if not jsonrpc_enabled(notify=True): - log.error("Unable to reach Kodi's JSON-RPC service, aborting...") - return False - else: - break - time.sleep(3) - - quasar_dir, quasar_binary = get_quasar_binary() - - if quasar_dir is False or quasar_binary is False: - return False - - lockfile = os.path.join(ADDON_PATH, ".lockfile") - if os.path.exists(lockfile): - log.warning("Existing process found from lockfile, killing...") - try: - with open(lockfile) as lf: - pid = int(lf.read().rstrip(" \t\r\n\0")) - os.kill(pid, 9) - except Exception as e: - log.error(repr(e)) - - if PLATFORM["os"] == "windows": - log.warning("Removing library.db.lock file...") - try: - library_lockfile = os.path.join(xbmc.translatePath(ADDON.getAddonInfo("profile")).decode('utf-8'), "library.db.lock") - os.remove(library_lockfile) - except Exception as e: - log.error(repr(e)) - - SW_HIDE = 0 - STARTF_USESHOWWINDOW = 1 - - args = [quasar_binary] - kwargs["cwd"] = quasar_dir - - if PLATFORM["os"] == "windows": - args[0] = getWindowsShortPath(quasar_binary) - kwargs["cwd"] = getWindowsShortPath(quasar_dir) - si = subprocess.STARTUPINFO() - si.dwFlags = STARTF_USESHOWWINDOW - si.wShowWindow = SW_HIDE - clear_fd_inherit_flags() - kwargs["startupinfo"] = si - else: - env = os.environ.copy() - env["LD_LIBRARY_PATH"] = "%s:%s" % (quasar_dir, env.get("LD_LIBRARY_PATH", "")) - kwargs["env"] = env - kwargs["close_fds"] = True - - wait_counter = 1 - while xbmc.getCondVisibility('Window.IsVisible(10140)') or xbmc.getCondVisibility('Window.IsActive(10140)'): - if wait_counter == 1: - log.info('Add-on settings currently opened, waiting before starting...') - if wait_counter > 300: - break - time.sleep(1) - wait_counter += 1 - - return subprocess.Popen(args, **kwargs) - -def shutdown(): - try: - urllib2.urlopen(QUASARD_HOST + "/shutdown") - except: - pass - -def wait_for_abortRequested(proc, monitor): - monitor.closing.wait() - log.info("quasard: exiting quasard daemon") - try: - proc.terminate() - except OSError: - pass # Process already exited, nothing to terminate - log.info("quasard: quasard daemon exited") - -def quasard_thread(monitor): - crash_count = 0 - try: - while not xbmc.abortRequested: - log.info("quasard: starting quasard") - proc = start_quasard(stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - if not proc: - break - threading.Thread(target=wait_for_abortRequested, args=[proc, monitor]).start() - - if PLATFORM["os"] == "windows": - while proc.poll() is None: - log.info(proc.stdout.readline()) - else: - # Kodi hangs on some Android (sigh...) systems when doing a blocking - # read. We count on the fact that Quasar daemon flushes its log - # output on \n, creating a pretty clean output - import fcntl - import select - fd = proc.stdout.fileno() - fl = fcntl.fcntl(fd, fcntl.F_GETFL) - fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK) - while proc.poll() is None: - try: - to_read, _, _ = select.select([proc.stdout], [], []) - for ro in to_read: - line = ro.readline() - if line == "": # write end is closed - break - log.info(line) - except IOError: - time.sleep(1) # nothing to read, sleep - - log.info("quasard: proc.return code: %s" % str(proc.returncode)) - if proc.returncode == 0 or xbmc.abortRequested: - break - - crash_count += 1 - notify(getLocalizedString(30100), time=3000) - xbmc.executebuiltin("Dialog.Close(all, true)") - system_information() - time.sleep(5) - if crash_count >= 3: - notify(getLocalizedString(30110), time=3000) - break - - except Exception as e: - import traceback - map(log.error, traceback.format_exc().split("\n")) - notify("%s: %s" % (getLocalizedString(30226), repr(e).encode('utf-8'))) - raise diff --git a/lib/quasar/navigation.py b/lib/quasar/navigation.py deleted file mode 100644 index 70658b6c..00000000 --- a/lib/quasar/navigation.py +++ /dev/null @@ -1,260 +0,0 @@ -import os -import sys -import socket -import urllib2 -import urlparse -import xbmc -import xbmcgui -import xbmcplugin -from quasar.logger import log -from quasar.config import QUASARD_HOST -from quasar.addon import ADDON, ADDON_ID, ADDON_PATH -from quasar.util import notify, getLocalizedString, getLocalizedLabel, system_information - -try: - import simplejson as json -except ImportError: - import json - - -HANDLE = int(sys.argv[1]) - - -class InfoLabels(dict): - def __init__(self, *args, **kwargs): - self.update(*args, **kwargs) - - def __getitem__(self, key): - return dict.get(self, key.lower(), "") - - def __setitem__(self, key, val): - dict.__setitem__(self, key.lower(), val) - - def update(self, *args, **kwargs): - for k, v in dict(*args, **kwargs).iteritems(): - self[k] = v - - -class closing(object): - def __init__(self, thing): - self.thing = thing - - def __enter__(self): - return self.thing - - def __exit__(self, *exc_info): - self.thing.close() - - -class NoRedirectHandler(urllib2.HTTPRedirectHandler): - def http_error_302(self, req, fp, code, msg, headers): - import urllib - infourl = urllib.addinfourl(fp, headers, headers["Location"]) - infourl.status = code - infourl.code = code - return infourl - http_error_300 = http_error_302 - http_error_301 = http_error_302 - http_error_303 = http_error_302 - http_error_307 = http_error_302 - - -def getInfoLabels(): - id_list = [int(s) for s in sys.argv[0].split("/") if s.isdigit()] - tmdb_id = id_list[0] if id_list else None - - if not tmdb_id: - parsed_url = urlparse.urlparse(sys.argv[0] + sys.argv[2]) - query = urlparse.parse_qs(parsed_url.query) - log.debug("Parsed URL: %s, Query: %s", repr(parsed_url), repr(query)) - if 'tmdb' in query and 'show' not in query: - tmdb_id = query['tmdb'][0] - url = "%s/movie/%s/infolabels" % (QUASARD_HOST, tmdb_id) - elif 'show' in query: - tmdb_id = query['show'][0] - if 'season' in query and 'episode' in query: - url = "%s/show/%s/season/%s/episode/%s/infolabels" % (QUASARD_HOST, tmdb_id, query['season'][0], query['episode'][0]) - else: - url = "%s/show/%s/infolabels" % (QUASARD_HOST, tmdb_id) - else: - url = "%s/infolabels" % (QUASARD_HOST) - elif 'movie' in sys.argv[0]: - url = "%s/movie/%s/infolabels" % (QUASARD_HOST, tmdb_id) - elif ('episode' in sys.argv[0] or 'show' in sys.argv[0]) and len(id_list) > 2: - url = "%s/show/%s/season/%s/episode/%s/infolabels" % (QUASARD_HOST, tmdb_id, id_list[1], id_list[2]) - elif 'show' in sys.argv[0] and len(id_list) == 2: - url = "%s/show/%s/season/%s/episode/%s/infolabels" % (QUASARD_HOST, tmdb_id, id_list[1], 1) - else: - url = "%s/infolabels" % (QUASARD_HOST) - - log.debug("Resolving TMDB item by calling %s for %s" % (url, repr(sys.argv))) - - try: - with closing(urllib2.urlopen(url)) as response: - resolved = json.loads(response.read()) - if not resolved: - return {} - - if 'info' in resolved and resolved['info']: - resolved.update(resolved['info']) - - if 'art' in resolved and resolved['art']: - resolved['artbanner'] = '' - for k, v in resolved['art'].items(): - resolved['art' + k] = v - - if 'info' in resolved: - del resolved['info'] - if 'art' in resolved: - del resolved['art'] - if 'stream_info' in resolved: - del resolved['stream_info'] - - if 'dbtype' not in resolved: - resolved['dbtype'] = 'video' - if 'mediatype' not in resolved or resolved['mediatype'] == '': - resolved['Mediatype'] = resolved['dbtype'] - - return resolved - except: - log.debug("Could not resolve TMDB item: %s" % tmdb_id) - return {} - - -def _json(url): - with closing(urllib2.urlopen(url)) as response: - if response.code >= 300 and response.code <= 307: - # Pause currently playing Quasar file to avoid doubling requests - if xbmc.Player().isPlaying() and ADDON_ID in xbmc.Player().getPlayingFile(): - xbmc.Player().pause() - _infoLabels = InfoLabels(getInfoLabels()) - - item = xbmcgui.ListItem( - path=response.geturl(), - label=_infoLabels["label"], - label2=_infoLabels["label2"], - thumbnailImage=_infoLabels["thumbnail"]) - - item.setArt({ - "poster": _infoLabels["artposter"], - "banner": _infoLabels["artbanner"], - "fanart": _infoLabels["artfanart"] - }) - - item.setInfo(type='Video', infoLabels=_infoLabels) - xbmcplugin.setResolvedUrl(HANDLE, True, item) - return - - payload = response.read() - - try: - if payload: - return json.loads(payload) - except: - raise Exception(payload) - - -def run(url_suffix=""): - if not os.path.exists(os.path.join(ADDON_PATH, ".firstrun")): - notify(getLocalizedString(30101)) - system_information() - return - - donatePath = os.path.join(ADDON_PATH, ".donate") - if not os.path.exists(donatePath): - with open(donatePath, "w"): - os.utime(donatePath, None) - dialog = xbmcgui.Dialog() - dialog.ok("Quasar", getLocalizedString(30141)) - - socket.setdefaulttimeout(int(ADDON.getSetting("buffer_timeout"))) - urllib2.install_opener(urllib2.build_opener(NoRedirectHandler())) - - # Pause currently playing Quasar file to avoid doubling requests - if xbmc.Player().isPlaying() and ADDON_ID in xbmc.Player().getPlayingFile(): - xbmc.Player().pause() - - url = sys.argv[0].replace("plugin://%s" % ADDON_ID, QUASARD_HOST + url_suffix) + sys.argv[2] - log.debug("Requesting %s from %s" % (url, repr(sys.argv))) - - try: - data = _json(url) - except urllib2.URLError as e: - if 'Connection refused' in e.reason: - notify(getLocalizedString(30116), time=7000) - else: - import traceback - map(log.error, traceback.format_exc().split("\n")) - notify(e.reason, time=7000) - return - except Exception as e: - import traceback - map(log.error, traceback.format_exc().split("\n")) - try: - msg = unicode(e) - except: - try: - msg = str(e) - except: - msg = repr(e) - notify(getLocalizedLabel(msg), time=7000) - return - - if not data: - return - - if data["content_type"]: - content_type = data["content_type"] - if data["content_type"].startswith("menus"): - content_type = data["content_type"].split("_")[1] - - xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_UNSORTED) - if content_type != "tvshows": - xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_LABEL_IGNORE_THE) - xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_DATE) - xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_GENRE) - xbmcplugin.setContent(HANDLE, content_type) - - listitems = range(len(data["items"])) - for i, item in enumerate(data["items"]): - # Translate labels - if item["label"][0:8] == "LOCALIZE": - item["label"] = unicode(getLocalizedLabel(item["label"]), 'utf-8') - if item["label2"][0:8] == "LOCALIZE": - item["label2"] = getLocalizedLabel(item["label2"]) - - listItem = xbmcgui.ListItem(label=item["label"], label2=item["label2"], iconImage=item["icon"], thumbnailImage=item["thumbnail"]) - if item.get("info"): - listItem.setInfo("video", item["info"]) - if item.get("stream_info"): - for type_, values in item["stream_info"].items(): - listItem.addStreamInfo(type_, values) - if item.get("art"): - listItem.setArt(item["art"]) - elif ADDON.getSetting('default_fanart') == 'true' and item["label"] != unicode(getLocalizedString(30218), 'utf-8'): - fanart = os.path.join(ADDON_PATH, "fanart.jpg") - listItem.setArt({'fanart': fanart}) - if item.get("context_menu"): - # Translate context menus - for m, menu in enumerate(item["context_menu"]): - if menu[0][0:8] == "LOCALIZE": - menu[0] = getLocalizedLabel(menu[0]) - listItem.addContextMenuItems(item["context_menu"]) - listItem.setProperty("isPlayable", item["is_playable"] and "true" or "false") - if item.get("properties"): - for k, v in item["properties"].items(): - listItem.setProperty(k, v) - listitems[i] = (item["path"], listItem, not item["is_playable"]) - - xbmcplugin.addDirectoryItems(HANDLE, listitems, totalItems=len(listitems)) - - # Set ViewMode - if data["content_type"]: - viewMode = ADDON.getSetting("viewmode_%s" % data["content_type"]) - if viewMode: - try: - xbmc.executebuiltin('Container.SetViewMode(%s)' % viewMode) - except Exception as e: - log.warning("Unable to SetViewMode(%s): %s" % (viewMode, repr(e))) - - xbmcplugin.endOfDirectory(HANDLE, succeeded=True, updateListing=False, cacheToDisc=True) diff --git a/lib/quasar/osarch.py b/lib/quasar/osarch.py deleted file mode 100644 index 5b580c28..00000000 --- a/lib/quasar/osarch.py +++ /dev/null @@ -1,56 +0,0 @@ -import xbmc -import sys -import platform - -def get_platform(): - build = xbmc.getInfoLabel("System.BuildVersion") - kodi_version = int(build.split()[0][:2]) - ret = { - "auto_arch": sys.maxsize > 2 ** 32 and "64-bit" or "32-bit", - "arch": sys.maxsize > 2 ** 32 and "x64" or "x86", - "os": "", - "version": platform.release(), - "kodi": kodi_version, - "build": build - } - if xbmc.getCondVisibility("system.platform.android"): - ret["os"] = "android" - if "arm" in platform.machine() or "aarch" in platform.machine(): - ret["arch"] = "arm" - if "64" in platform.machine() and ret["auto_arch"] == "64-bit": - ret["arch"] = "arm" - #ret["arch"] = "x64" #The binary is corrupted in install package - elif xbmc.getCondVisibility("system.platform.linux"): - ret["os"] = "linux" - if "aarch" in platform.machine() or "arm64" in platform.machine(): - if xbmc.getCondVisibility("system.platform.linux.raspberrypi"): - ret["arch"] = "armv7" - elif ret["auto_arch"] == "32-bit": - ret["arch"] = "armv7" - elif ret["auto_arch"] == "64-bit": - ret["arch"] = "arm64" - elif platform.architecture()[0].startswith("32"): - ret["arch"] = "arm" - else: - ret["arch"] = "arm64" - elif "armv7" in platform.machine(): - ret["arch"] = "armv7" - elif "arm" in platform.machine(): - ret["arch"] = "arm" - elif xbmc.getCondVisibility("system.platform.xbox"): - ret["os"] = "windows" - ret["arch"] = "x64" - elif xbmc.getCondVisibility("system.platform.windows"): - ret["os"] = "windows" - if platform.machine().endswith('64'): - ret["arch"] = "x64" - elif xbmc.getCondVisibility("system.platform.osx"): - ret["os"] = "darwin" - ret["arch"] = "x64" - elif xbmc.getCondVisibility("system.platform.ios"): - ret["os"] = "ios" - ret["arch"] = "arm" - return ret - - -PLATFORM = get_platform() diff --git a/lib/quasar/util.py b/lib/quasar/util.py deleted file mode 100644 index c3c3b63b..00000000 --- a/lib/quasar/util.py +++ /dev/null @@ -1,72 +0,0 @@ -import platform -import xbmc -import xbmcgui -from quasar.logger import log -from quasar.osarch import PLATFORM -from quasar.addon import ADDON, ADDON_NAME, ADDON_ICON - - -def notify(message, header=ADDON_NAME, time=5000, image=ADDON_ICON): - sound = ADDON.getSetting('do_not_disturb') == 'false' - dialog = xbmcgui.Dialog() - return dialog.notification(toUtf8(header), toUtf8(message), toUtf8(image), time, sound) - -def getLocalizedLabel(label): - try: - if "LOCALIZE" not in label: - return label - if ";;" not in label and label.endswith(']'): - return getLocalizedString(int(label[9:-1])) - else: - parts = label.split(";;") - translation = getLocalizedString(int(parts[0][9:14])) - for i, part in enumerate(parts[1:]): - if part[0:8] == "LOCALIZE": - parts[i + 1] = getLocalizedString(int(part[9:14])) - - return (translation.decode('utf-8', 'replace') % tuple(parts[1:])).encode('utf-8', 'ignore') - except: - return label - -def getLocalizedString(stringId): - try: - return ADDON.getLocalizedString(stringId).encode('utf-8', 'ignore') - except: - return stringId - -def toUtf8(string): - if isinstance(string, unicode): - return string.encode('utf-8', 'ignore') - return string - -def system_information(): - build = xbmc.getInfoLabel("System.BuildVersion") - log.info("System information: %(os)s_%(arch)s %(version)s" % PLATFORM) - log.info("Kodi build version: %s" % build) - log.info("OS type: %s" % platform.system()) - log.info("uname: %s" % repr(platform.uname())) - return PLATFORM - -def getShortPath(path): - if PLATFORM["os"] == "windows": - return getWindowsShortPath(path) - return path - -def getWindowsShortPath(path): - try: - import ctypes - import ctypes.wintypes - - ctypes.windll.kernel32.GetShortPathNameW.argtypes = [ - ctypes.wintypes.LPCWSTR, # lpszLongPath - ctypes.wintypes.LPWSTR, # lpszShortPath - ctypes.wintypes.DWORD # cchBuffer - ] - ctypes.windll.kernel32.GetShortPathNameW.restype = ctypes.wintypes.DWORD - - buf = ctypes.create_unicode_buffer(1024) # adjust buffer size, if necessary - ctypes.windll.kernel32.GetShortPathNameW(path, buf, len(buf)) - - return buf.value - except: - return path diff --git a/platformcode/custom_code.py b/platformcode/custom_code.py index 46ce5009..0881057f 100644 --- a/platformcode/custom_code.py +++ b/platformcode/custom_code.py @@ -70,11 +70,11 @@ def init(): verify_Kodi_video_DB() #LIBTORRENT: se descarga el binario de Libtorrent cada vez que se actualiza Alfa - try: - threading.Thread(target=update_libtorrent).start() # Creamos un Thread independiente, hasta el fin de Kodi - time.sleep(2) # Dejamos terminar la inicialización... - except: # Si hay problemas de threading, nos vamos - logger.error(traceback.format_exc()) + # try: + # threading.Thread(target=update_libtorrent).start() # Creamos un Thread independiente, hasta el fin de Kodi + # time.sleep(2) # Dejamos terminar la inicialización... + # except: # Si hay problemas de threading, nos vamos + # logger.error(traceback.format_exc()) # #QUASAR: Preguntamos si se hacen modificaciones a Quasar # if not filetools.exists(filetools.join(config.get_data_path(), "quasar.json")) \ @@ -245,102 +245,102 @@ def update_external_addon(addon_name): return False -def update_libtorrent(): - logger.info() +# def update_libtorrent(): +# logger.info() - if not config.get_setting("mct_buffer", server="torrent", default=""): - default = config.get_setting("torrent_client", server="torrent", default=0) - config.set_setting("torrent_client", default, server="torrent") - config.set_setting("mct_buffer", "50", server="torrent") - if config.get_setting("mct_download_path", server="torrent", default=config.get_setting("downloadpath")): - config.set_setting("mct_download_path", config.get_setting("downloadpath"), server="torrent") - config.set_setting("mct_background_download", True, server="torrent") - config.set_setting("mct_rar_unpack", True, server="torrent") - config.set_setting("bt_buffer", "50", server="torrent") - if config.get_setting("bt_download_path", server="torrent", default=config.get_setting("downloadpath")): - config.set_setting("bt_download_path", config.get_setting("downloadpath"), server="torrent") - config.set_setting("mct_download_limit", "", server="torrent") - config.set_setting("magnet2torrent", False, server="torrent") +# if not config.get_setting("mct_buffer", server="torrent", default=""): +# default = config.get_setting("torrent_client", server="torrent", default=0) +# config.set_setting("torrent_client", default, server="torrent") +# config.set_setting("mct_buffer", "50", server="torrent") +# if config.get_setting("mct_download_path", server="torrent", default=config.get_setting("downloadpath")): +# config.set_setting("mct_download_path", config.get_setting("downloadpath"), server="torrent") +# config.set_setting("mct_background_download", True, server="torrent") +# config.set_setting("mct_rar_unpack", True, server="torrent") +# config.set_setting("bt_buffer", "50", server="torrent") +# if config.get_setting("bt_download_path", server="torrent", default=config.get_setting("downloadpath")): +# config.set_setting("bt_download_path", config.get_setting("downloadpath"), server="torrent") +# config.set_setting("mct_download_limit", "", server="torrent") +# config.set_setting("magnet2torrent", False, server="torrent") - if not filetools.exists(filetools.join(config.get_runtime_path(), "custom_code.json")) or not \ - config.get_setting("unrar_path", server="torrent", default=""): +# if not filetools.exists(filetools.join(config.get_runtime_path(), "custom_code.json")) or not \ +# config.get_setting("unrar_path", server="torrent", default=""): - path = filetools.join(config.get_runtime_path(), 'lib', 'rarfiles') - creationflags = '' - sufix = '' - unrar = '' - for device in filetools.listdir(path): - if xbmc.getCondVisibility("system.platform.android") and 'android' not in device: continue - if xbmc.getCondVisibility("system.platform.windows") and 'windows' not in device: continue - if not xbmc.getCondVisibility("system.platform.windows") and not xbmc.getCondVisibility("system.platform.android") \ - and ('android' in device or 'windows' in device): continue - if 'windows' in device: - creationflags = 0x08000000 - sufix = '.exe' - else: - creationflags = '' - sufix = '' - unrar = filetools.join(path, device, 'unrar%s') % sufix - if not filetools.exists(unrar): unrar = '' - if unrar: - if not xbmc.getCondVisibility("system.platform.windows"): - try: - if xbmc.getCondVisibility("system.platform.android"): - # Para Android copiamos el binario a la partición del sistema - unrar_org = unrar - unrar = filetools.join(xbmc.translatePath('special://xbmc/'), 'files').replace('/cache/apk/assets', '') - if not filetools.exists(unrar): - filetools.mkdir(unrar) - unrar = filetools.join(unrar, 'unrar') - filetools.copy(unrar_org, unrar, silent=True) +# path = filetools.join(config.get_runtime_path(), 'lib', 'rarfiles') +# creationflags = '' +# sufix = '' +# unrar = '' +# for device in filetools.listdir(path): +# if xbmc.getCondVisibility("system.platform.android") and 'android' not in device: continue +# if xbmc.getCondVisibility("system.platform.windows") and 'windows' not in device: continue +# if not xbmc.getCondVisibility("system.platform.windows") and not xbmc.getCondVisibility("system.platform.android") \ +# and ('android' in device or 'windows' in device): continue +# if 'windows' in device: +# creationflags = 0x08000000 +# sufix = '.exe' +# else: +# creationflags = '' +# sufix = '' +# unrar = filetools.join(path, device, 'unrar%s') % sufix +# if not filetools.exists(unrar): unrar = '' +# if unrar: +# if not xbmc.getCondVisibility("system.platform.windows"): +# try: +# if xbmc.getCondVisibility("system.platform.android"): +# # Para Android copiamos el binario a la partición del sistema +# unrar_org = unrar +# unrar = filetools.join(xbmc.translatePath('special://xbmc/'), 'files').replace('/cache/apk/assets', '') +# if not filetools.exists(unrar): +# filetools.mkdir(unrar) +# unrar = filetools.join(unrar, 'unrar') +# filetools.copy(unrar_org, unrar, silent=True) - command = ['chmod', '777', '%s' % unrar] - p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output_cmd, error_cmd = p.communicate() - command = ['ls', '-l', unrar] - p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output_cmd, error_cmd = p.communicate() - xbmc.log('######## UnRAR file: %s' % str(output_cmd), xbmc.LOGNOTICE) - except: - xbmc.log('######## UnRAR ERROR in path: %s' % str(unrar), xbmc.LOGNOTICE) - logger.error(traceback.format_exc(1)) +# command = ['chmod', '777', '%s' % unrar] +# p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) +# output_cmd, error_cmd = p.communicate() +# command = ['ls', '-l', unrar] +# p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) +# output_cmd, error_cmd = p.communicate() +# xbmc.log('######## UnRAR file: %s' % str(output_cmd), xbmc.LOGNOTICE) +# except: +# xbmc.log('######## UnRAR ERROR in path: %s' % str(unrar), xbmc.LOGNOTICE) +# logger.error(traceback.format_exc(1)) - try: - if xbmc.getCondVisibility("system.platform.windows"): - p = subprocess.Popen(unrar, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags=creationflags) - else: - p = subprocess.Popen(unrar, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output_cmd, error_cmd = p.communicate() - if p.returncode != 0 or error_cmd: - xbmc.log('######## UnRAR returncode in module %s: %s, %s in %s' % \ - (device, str(p.returncode), str(error_cmd), unrar), xbmc.LOGNOTICE) - unrar = '' - else: - xbmc.log('######## UnRAR OK in %s: %s' % (device, unrar), xbmc.LOGNOTICE) - break - except: - xbmc.log('######## UnRAR ERROR in module %s: %s' % (device, unrar), xbmc.LOGNOTICE) - logger.error(traceback.format_exc(1)) - unrar = '' +# try: +# if xbmc.getCondVisibility("system.platform.windows"): +# p = subprocess.Popen(unrar, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags=creationflags) +# else: +# p = subprocess.Popen(unrar, stdout=subprocess.PIPE, stderr=subprocess.PIPE) +# output_cmd, error_cmd = p.communicate() +# if p.returncode != 0 or error_cmd: +# xbmc.log('######## UnRAR returncode in module %s: %s, %s in %s' % \ +# (device, str(p.returncode), str(error_cmd), unrar), xbmc.LOGNOTICE) +# unrar = '' +# else: +# xbmc.log('######## UnRAR OK in %s: %s' % (device, unrar), xbmc.LOGNOTICE) +# break +# except: +# xbmc.log('######## UnRAR ERROR in module %s: %s' % (device, unrar), xbmc.LOGNOTICE) +# logger.error(traceback.format_exc(1)) +# unrar = '' - if unrar: config.set_setting("unrar_path", unrar, server="torrent") +# if unrar: config.set_setting("unrar_path", unrar, server="torrent") - if filetools.exists(filetools.join(config.get_runtime_path(), "custom_code.json")) and \ - config.get_setting("libtorrent_path", server="torrent", default="") : - return +# if filetools.exists(filetools.join(config.get_runtime_path(), "custom_code.json")) and \ +# config.get_setting("libtorrent_path", server="torrent", default="") : +# return - try: - from lib.python_libtorrent.python_libtorrent import get_libtorrent - except Exception as e: - logger.error(traceback.format_exc(1)) - if not PY3: - e = unicode(str(e), "utf8", errors="replace").encode("utf8") - config.set_setting("libtorrent_path", "", server="torrent") - if not config.get_setting("libtorrent_error", server="torrent", default=''): - config.set_setting("libtorrent_error", str(e), server="torrent") +# try: +# from lib.python_libtorrent.python_libtorrent import get_libtorrent +# except Exception as e: +# logger.error(traceback.format_exc(1)) +# if not PY3: +# e = unicode(str(e), "utf8", errors="replace").encode("utf8") +# config.set_setting("libtorrent_path", "", server="torrent") +# if not config.get_setting("libtorrent_error", server="torrent", default=''): +# config.set_setting("libtorrent_error", str(e), server="torrent") - return +# return def verify_Kodi_video_DB(): diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index a67ef160..010e0f53 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -1331,232 +1331,33 @@ def torrent_client_installed(show_tuple=False): def play_torrent(item, xlistitem, mediaurl): logger.info() - import time - import traceback - from core import filetools - from core import httptools - from lib import generictools from servers import torrent - - # Si Libtorrent ha dado error de inicialización, no se pueden usar los clientes internos - UNRAR = config.get_setting("unrar_path", server="torrent", default="") - LIBTORRENT = config.get_setting("libtorrent_path", server="torrent", default='') - size_rar = 2 - rar_files = [] - if item.password: - size_rar = 3 - - - # Opciones disponibles para Reproducir torrents - torrent_options = list() - torrent_options.append([config.get_localized_string(30033)]) - torrent_options.append([config.get_localized_string(30033) + ' MCT']) - - torrent_options.extend(torrent_client_installed(show_tuple=True)) - + torrent_options = torrent_client_installed(show_tuple=True) torrent_client = config.get_setting("torrent_client", server="torrent") - # Si es Libtorrent y no está soportado, se ofrecen alternativas, si las hay... - if not LIBTORRENT and len(torrent_options) < 3: - from specials import quasar_download + if len(torrent_options) == 0: + from specials import elementum_download if dialog_yesno(config.get_localized_string(70784), config.get_localized_string(70782)): - quasar_download.download() + elementum_download.download() - if torrent_client and torrent_client - 1 <= len(torrent_options): - if torrent_client == 0: - seleccion = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options]) - else: - seleccion = torrent_client - 1 + if len(torrent_options) > 1: + selection = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options]) else: - if len(torrent_options) > 1: - seleccion = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options]) - else: - seleccion = 0 + selection = 0 - if seleccion < 2 and not LIBTORRENT: - dialog_ok(config.get_localized_string(30033), config.get_localized_string(70774), \ - config.get_localized_string(70775) % config.get_setting("libtorrent_error", server="torrent", default=''), \ - config.get_localized_string(70776)) - if len(torrent_options) > 2: - seleccion = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options]) - if seleccion < 2: - return - else: - return - # Si es Torrenter o Elementum con opción de Memoria, se ofrece la posibilidad ee usar Libtorrent temporalemente - elif seleccion > 1 and LIBTORRENT and UNRAR and 'RAR-' in item.torrent_info and ( - "torrenter" in torrent_options[seleccion][0] \ - or ("elementum" in torrent_options[seleccion][0] and xbmcaddon.Addon(id="plugin.video.%s" % torrent_options[seleccion][0].replace('Plugin externo: ','')).getSetting('download_storage') == '1')): - if dialog_yesno(torrent_options[seleccion][0], config.get_localized_string(70777), config.get_localized_string(70778), config.get_localized_string(70779) % size_rar): - seleccion = 1 - else: - return - # Si es Elementum pero con opción de Memoria, se muestras los Ajustes de Elementum y se pide al usuario que cambie a "Usar Archivos" - elif seleccion > 1 and not LIBTORRENT and UNRAR and 'RAR-' in item.torrent_info and "elementum" in \ - torrent_options[seleccion][0] \ - and xbmcaddon.Addon(id="plugin.video.%s" % torrent_options[seleccion][0].replace('Plugin externo: ', '')) \ - .getSetting('download_storage') == '1': - if dialog_yesno(torrent_options[seleccion][0], config.get_localized_string(70780) % size_rar, config.get_localized_string(70781)): - __settings__ = xbmcaddon.Addon( - id="plugin.video.%s" % torrent_options[seleccion][0].replace('Plugin externo: ', '')) - __settings__.openSettings() # Se visulizan los Ajustes de Elementum - elementum_dl = xbmcaddon.Addon( - id="plugin.video.%s" % torrent_options[seleccion][0].replace('Plugin externo: ', '')) \ - .getSetting('download_storage') - if elementum_dl != '1': - config.set_setting("elementum_dl", "1", server="torrent") # Salvamos el cambio para restaurarlo luego - return # Se sale, porque habrá refresco y cancelaría Kodi si no + if selection >= 0: + mediaurl = urllib.quote_plus(item.url) + if ("quasar" in torrent_options[selection][1] or "elementum" in torrent_options[selection][1]) and item.infoLabels['tmdb_id']: + if item.contentType == 'episode' and "elementum" not in torrent_options[selection][1]: + mediaurl += "&episode=%s&library=&season=%s&show=%s&tmdb=%s&type=episode" % ( + item.infoLabels['episode'], item.infoLabels['season'], item.infoLabels['tmdb_id'], + item.infoLabels['tmdb_id']) + elif item.contentType == 'movie': + mediaurl += "&library=&tmdb=%s&type=movie" % (item.infoLabels['tmdb_id']) - # Descarga de torrents a local - if seleccion >= 0: - - #### Compatibilidad con Kodi 18: evita cuelgues/cancelaciones cuando el .torrent se lanza desde pantalla convencional - # if xbmc.getCondVisibility('Window.IsMedia'): - xbmcplugin.setResolvedUrl(int(sys.argv[1]), False, xlistitem) # Preparamos el entorno para evitar error Kod1 18 - time.sleep(0.5) # Dejamos tiempo para que se ejecute - - # Nuevo método de descarga previa del .torrent. Si da error, miramos si hay alternatica local. - # Si ya es local, lo usamos - url = '' - url_stat = False - torrents_path = '' - referer = None - post = None - rar = False - size = '' - password = '' - if item.password: - password = item.password - - videolibrary_path = config.get_videolibrary_path() # Calculamos el path absoluto a partir de la Videoteca - if scrapertools.find_single_match(videolibrary_path, '(^\w+:\/\/)'): # Si es una conexión REMOTA, usamos userdata local - videolibrary_path = config.get_data_path() # Calculamos el path absoluto a partir de Userdata - if not filetools.exists(videolibrary_path): # Si no existe el path, pasamos al modo clásico - videolibrary_path = False - else: - torrents_path = filetools.join(videolibrary_path, 'temp_torrents', 'client_torrent.torrent') # path descarga temporal - if not videolibrary_path or not filetools.exists(filetools.join(videolibrary_path, 'temp_torrents')): # Si no existe la carpeta temporal, la creamos - filetools.mkdir(filetools.join(videolibrary_path, 'temp_torrents')) - - # Si hay headers, se pasar a la petición de descarga del .torrent - headers = {} - if item.headers: - headers = item.headers - - # identificamos si es una url o un path de archivo - if not item.url.startswith("\\") and not item.url.startswith("/") and not url_stat: - timeout = 10 - if item.torrent_alt: - timeout = 5 - # Si es una llamada con POST, lo preparamos - if item.referer: referer = item.referer - if item.post: post = item.post - # Descargamos el .torrent - size, url, torrent_f, rar_files = generictools.get_torrent_size(item.url, referer, post, torrents_path=torrents_path, timeout=timeout, lookup=False, headers=headers, short_pad=True) - if url: - url_stat = True - item.url = url - if "torrentin" in torrent_options[seleccion][0]: - item.url = 'file://' + item.url - - if not url and item.torrent_alt: # Si hay error, se busca un .torrent alternativo - if (item.torrent_alt.startswith("\\") or item.torrent_alt.startswith("/")) and videolibrary_path: - item.url = item.torrent_alt # El .torrent alternativo puede estar en una url o en local - elif not item.url.startswith("\\") and not item.url.startswith("/"): - item.url = item.torrent_alt - - # Si es un archivo .torrent local, actualizamos el path relativo a path absoluto - if (item.url.startswith("\\") or item.url.startswith("/")) and not url_stat and videolibrary_path: # .torrent alternativo local - movies = config.get_setting("folder_movies") - series = config.get_setting("folder_tvshows") - if item.contentType == 'movie': - folder = movies # películas - else: - folder = series # o series - item.url = filetools.join(config.get_videolibrary_path(), folder, item.url) # dirección del .torrent local en la Videoteca - if filetools.copy(item.url, torrents_path, silent=True): # se copia a la carpeta generíca para evitar problemas de encode - item.url = torrents_path - if "torrentin" in torrent_options[seleccion][0]: # Si es Torrentin, hay que añadir un prefijo - item.url = 'file://' + item.url - size, rar_files = generictools.get_torrent_size('', file_list=True, local_torr=torrents_path,short_pad=True) - - mediaurl = item.url - - if seleccion >= 0: - - # Reproductor propio BT (libtorrent) - if seleccion == 0: - torrent.bt_client(mediaurl, xlistitem, rar_files, subtitle=item.subtitle, password=password, item=item) - - # Reproductor propio MCT (libtorrent) - elif seleccion == 1: - from platformcode import mct - mct.play(mediaurl, xlistitem, subtitle=item.subtitle, password=password, item=item) - - # Plugins externos - else: - mediaurl = urllib.quote_plus(item.url) - # Llamada con más parámetros para completar el título - if ("quasar" in torrent_options[seleccion][1] or "elementum" in torrent_options[seleccion][1]) and item.infoLabels['tmdb_id']: - if item.contentType == 'episode' and "elementum" not in torrent_options[seleccion][1]: - mediaurl += "&episode=%s&library=&season=%s&show=%s&tmdb=%s&type=episode" % ( - item.infoLabels['episode'], item.infoLabels['season'], item.infoLabels['tmdb_id'], - item.infoLabels['tmdb_id']) - elif item.contentType == 'movie': - mediaurl += "&library=&tmdb=%s&type=movie" % (item.infoLabels['tmdb_id']) - - xbmc.executebuiltin("PlayMedia(" + torrent_options[seleccion][1] % mediaurl + ")") - - # Si es un archivo RAR, monitorizamos el cliente Torrent hasta que haya descargado el archivo, - # y después lo extraemos, incluso con RAR's anidados y con contraseña - torr_client = torrent_options[seleccion][0].replace('Plugin externo: ', '') - if 'RAR-' in size and torr_client in ['quasar', 'elementum'] and UNRAR: - rar_file, save_path_videos, folder_torr = torrent.wait_for_download(item, mediaurl, rar_files, torr_client) # Esperamos mientras se descarga el RAR - if rar_file and save_path_videos: # Si se ha descargado el RAR... - dp = dialog_progress_bg('KoD %s' % torr_client) - video_file, rar, video_path, erase_file_path = torrent.extract_files(rar_file, save_path_videos, password, dp, item, torr_client) # ... extraemos el vídeo del RAR - dp.close() - - # Reproducimos el vídeo extraido, si no hay nada en reproducción - while is_playing() and rar and not xbmc.abortRequested: - time.sleep(3) # Repetimos cada intervalo - if rar and not xbmc.abortRequested: - time.sleep(1) - video_play = filetools.join(video_path, video_file) - log("##### video_play: %s" % video_play) - playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) - playlist.clear() - playlist.add(video_play, xlistitem) - xbmc_player.play(playlist) - - if seleccion > 1: - # Seleccionamos que clientes torrent soportamos para el marcado de vídeos vistos: asumimos que todos funcionan - torrent.mark_auto_as_watched(item) - - # Si se ha extraido un RAR, se pregunta para borrar los archivos después de reproducir el vídeo (plugins externos) - while is_playing() and rar and not xbmc.abortRequested: - time.sleep(3) # Repetimos cada intervalo - if rar and not xbmc.abortRequested: - if dialog_yesno('KoD %s' % torr_client, config.get_localized_string(30031)): - log("##### erase_file_path: %s" % erase_file_path) - try: - torr_data, deamon_url, index = torrent.get_tclient_data(folder_torr, torr_client) - if torr_data and deamon_url: - data = httptools.downloadpage('%sdelete/%s' % (deamon_url, index), timeout=5, alfa_s=True).data - time.sleep(1) - if filetools.isdir(erase_file_path): - filetools.rmdirtree(erase_file_path) - elif filetools.exists(erase_file_path) and filetools.isfile(erase_file_path): - filetools.remove(erase_file_path) - except: - logger.error(traceback.format_exc(1)) - elementum_dl = config.get_setting("elementum_dl", server="torrent", default='') # Si salvamos el cambio de Elementum - if elementum_dl: - config.set_setting("elementum_dl", "", server="torrent") # lo reseteamos en Alfa - xbmcaddon.Addon(id="plugin.video.%s" % torrent_options[seleccion][0].replace('Plugin externo: ', '')) \ - .setSetting('download_storage', elementum_dl) # y lo reseteamos en Elementum + xbmc.executebuiltin("PlayMedia(" + torrent_options[selection][1] % mediaurl + ")") def log(texto): diff --git a/resources/language/English/strings.po b/resources/language/English/strings.po index bb4d3874..8e582e40 100644 --- a/resources/language/English/strings.po +++ b/resources/language/English/strings.po @@ -5896,11 +5896,11 @@ msgid "Do you want to call Elementum Settings to temporarily switch to Use Files msgstr "" msgctxt "#70782" -msgid "Your device is not compatible with the Internal Client, do you want to use Quasar for Torrents?" +msgid "Per poter usufruire del support torrent devi installare un Client esterno. Vuoi installare Elementum?" msgstr "" msgctxt "#70783" -msgid "Quasar installed and configured, enjoy!" +msgid "Elementum installed and configured, enjoy!" msgstr "" msgctxt "#70784" @@ -5908,7 +5908,7 @@ msgid "Attention!!" msgstr "Attenzione!" msgctxt "#70785" -msgid "Install Quasar" +msgid "Install Elementum" msgstr "" msgctxt "#70786" diff --git a/resources/language/Italian/strings.po b/resources/language/Italian/strings.po index ba184a48..53c90b69 100644 --- a/resources/language/Italian/strings.po +++ b/resources/language/Italian/strings.po @@ -5896,20 +5896,20 @@ msgid "Do you want to call Elementum Settings to temporarily switch to Use Files msgstr "Vuoi aprire i settaggi di Elementum per passare temporaneamente a usare i file?" msgctxt "#70782" -msgid "Your device is not compatible with the Internal Client, do you want to use Quasar for Torrents?" -msgstr "Il tuo dispositivo non è compatibile con il Client Interno, Vuoi usare Quasar per i Torrent?" +msgid "Per poter usufruire del support torrent devi installare un Client esterno. Vuoi installare Elementum?" +msgstr "You must install an external Client to take advantage of the torrent support. Do you want to install Elementum?" msgctxt "#70783" -msgid "Quasar installed and configured, enjoy!" -msgstr "Quasar installato e configurato, buona Visione!" +msgid "Elementum installed and configured, enjoy!" +msgstr "Elementum installato e configurato, buona Visione!" msgctxt "#70784" msgid "Attention!" msgstr "Attenzione!" msgctxt "#70785" -msgid "Install Quasar" -msgstr "Installa Quasar" +msgid "Install Elementum" +msgstr "Installa Elementum" msgctxt "#70786" msgid "Autostart" diff --git a/resources/settings/elementum/settings.xml b/resources/settings/elementum/settings.xml new file mode 100644 index 00000000..092c9259 --- /dev/null +++ b/resources/settings/elementum/settings.xml @@ -0,0 +1,209 @@ + + false + false + false + true + true + true + 1 + true + true + 30 + false + false + 50 + 12 + 0 + 3 + true + 5 + 20 + 60 + 180 + false + + false + + + 0 + 0 + true + 30 + false + true + false + true + false + false + false + false + false + true + + 1 + true + 0 + 4 + false + false + false + true + + true + true + false + false + 1 + 1 + 1 + + + + + + + + + + + + true + true + true + true + special://temp/elementum_library/ + 0 + 300 + 6 + 0 + false + true + true + + 6899 + 6891 + false + 65221 + false + 0 + 0 + 0 + 100 + 4 + 100 + true + false + 1 + true + true + true + true + + + + + 150 + 25 + true + 0 + 85 + 3 + false + false + + + + 1080 + 1 + 127.0.0.1 + 65220 + 0 + 0 + 9 + true + 0 + 2 + 200 + 15 + 25 + false + true + true + true + 2 + 2 + 0 + true + 1 + Original + + 50 + special://temp/elementum_torrents/ + yellow + skyblue + none + deeppink + yyyy-mm-dd + + + yellow + skyblue + none + deeppink + yyyy-mm-dd + 0 + true + + false + true + 0 + + 0 + true + 0 + + 0 + true + 5 + true + true + true + 0 + + 0 + true + 0 + + 0 + true + true + false + true + true + + 0 + + false + false + false + true + false + true + false + true + false + false + false + true + true + true + true + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + diff --git a/servers/torrent.py b/servers/torrent.py index 631a4904..1bd90caf 100755 --- a/servers/torrent.py +++ b/servers/torrent.py @@ -79,222 +79,222 @@ class XBMCPlayer(xbmc.Player): xbmc_player = XBMCPlayer() -def caching_torrents(url, referer=None, post=None, torrents_path=None, timeout=10, \ - lookup=False, data_torrent=False, headers={}, proxy_retries=1): - if torrents_path != None: - logger.info("path = " + torrents_path) - else: - logger.info() - if referer and post: - logger.info('REFERER: ' + referer) +# def caching_torrents(url, referer=None, post=None, torrents_path=None, timeout=10, \ +# lookup=False, data_torrent=False, headers={}, proxy_retries=1): +# if torrents_path != None: +# logger.info("path = " + torrents_path) +# else: +# logger.info() +# if referer and post: +# logger.info('REFERER: ' + referer) - torrent_file = '' - t_hash = '' - if referer: - headers.update({'Content-Type': 'application/x-www-form-urlencoded', 'Referer': referer}) #Necesario para el Post del .Torrent +# torrent_file = '' +# t_hash = '' +# if referer: +# headers.update({'Content-Type': 'application/x-www-form-urlencoded', 'Referer': referer}) #Necesario para el Post del .Torrent - """ - Descarga en el path recibido el .torrent de la url recibida, y pasa el decode - Devuelve el path real del .torrent, o el path vacío si la operación no ha tenido éxito - """ +# """ +# Descarga en el path recibido el .torrent de la url recibida, y pasa el decode +# Devuelve el path real del .torrent, o el path vacío si la operación no ha tenido éxito +# """ - videolibrary_path = config.get_videolibrary_path() #Calculamos el path absoluto a partir de la Videoteca - if torrents_path == None: - if not videolibrary_path: - torrents_path = '' - if data_torrent: - return (torrents_path, torrent_file) - return torrents_path #Si hay un error, devolvemos el "path" vacío - torrents_path = filetools.join(videolibrary_path, 'temp_torrents_Alfa', 'cliente_torrent_Alfa.torrent') #path de descarga temporal - if '.torrent' not in torrents_path: - torrents_path += '.torrent' #path para dejar el .torrent - #torrents_path_encode = filetools.encode(torrents_path) #encode utf-8 del path - torrents_path_encode = torrents_path +# videolibrary_path = config.get_videolibrary_path() #Calculamos el path absoluto a partir de la Videoteca +# if torrents_path == None: +# if not videolibrary_path: +# torrents_path = '' +# if data_torrent: +# return (torrents_path, torrent_file) +# return torrents_path #Si hay un error, devolvemos el "path" vacío +# torrents_path = filetools.join(videolibrary_path, 'temp_torrents_Alfa', 'cliente_torrent_Alfa.torrent') #path de descarga temporal +# if '.torrent' not in torrents_path: +# torrents_path += '.torrent' #path para dejar el .torrent +# #torrents_path_encode = filetools.encode(torrents_path) #encode utf-8 del path +# torrents_path_encode = torrents_path - #if url.endswith(".rar") or url.startswith("magnet:"): #No es un archivo .torrent - if url.endswith(".rar"): #No es un archivo .torrent - logger.error('No es un archivo Torrent: ' + url) - torrents_path = '' - if data_torrent: - return (torrents_path, torrent_file) - return torrents_path #Si hay un error, devolvemos el "path" vacío +# #if url.endswith(".rar") or url.startswith("magnet:"): #No es un archivo .torrent +# if url.endswith(".rar"): #No es un archivo .torrent +# logger.error('No es un archivo Torrent: ' + url) +# torrents_path = '' +# if data_torrent: +# return (torrents_path, torrent_file) +# return torrents_path #Si hay un error, devolvemos el "path" vacío - try: - #Descargamos el .torrent - if url.startswith("magnet:"): - if config.get_setting("magnet2torrent", server="torrent", default=False): - torrent_file = magnet2torrent(url, headers=headers) #Convierte el Magnet en un archivo Torrent - else: - if data_torrent: - return (url, torrent_file) - return url - if not torrent_file: - logger.error('No es un archivo Magnet: ' + url) - torrents_path = '' - if data_torrent: - return (torrents_path, torrent_file) - return torrents_path #Si hay un error, devolvemos el "path" vacío - else: - if lookup: - proxy_retries = 0 - if post: #Descarga con POST - response = httptools.downloadpage(url, headers=headers, post=post, \ - follow_redirects=False, timeout=timeout, proxy_retries=proxy_retries) - else: #Descarga sin post - response = httptools.downloadpage(url, headers=headers, timeout=timeout, \ - proxy_retries=proxy_retries) - if not response.sucess: - logger.error('Archivo .torrent no encontrado: ' + url) - torrents_path = '' - if data_torrent: - return (torrents_path, torrent_file) - return torrents_path #Si hay un error, devolvemos el "path" vacío - torrent_file = response.data - torrent_file_uncoded = response.data - if PY3 and isinstance(torrent_file, bytes): - torrent_file = "".join(chr(x) for x in bytes(torrent_file_uncoded)) +# try: +# #Descargamos el .torrent +# if url.startswith("magnet:"): +# if config.get_setting("magnet2torrent", server="torrent", default=False): +# torrent_file = magnet2torrent(url, headers=headers) #Convierte el Magnet en un archivo Torrent +# else: +# if data_torrent: +# return (url, torrent_file) +# return url +# if not torrent_file: +# logger.error('No es un archivo Magnet: ' + url) +# torrents_path = '' +# if data_torrent: +# return (torrents_path, torrent_file) +# return torrents_path #Si hay un error, devolvemos el "path" vacío +# else: +# if lookup: +# proxy_retries = 0 +# if post: #Descarga con POST +# response = httptools.downloadpage(url, headers=headers, post=post, \ +# follow_redirects=False, timeout=timeout, proxy_retries=proxy_retries) +# else: #Descarga sin post +# response = httptools.downloadpage(url, headers=headers, timeout=timeout, \ +# proxy_retries=proxy_retries) +# if not response.sucess: +# logger.error('Archivo .torrent no encontrado: ' + url) +# torrents_path = '' +# if data_torrent: +# return (torrents_path, torrent_file) +# return torrents_path #Si hay un error, devolvemos el "path" vacío +# torrent_file = response.data +# torrent_file_uncoded = response.data +# if PY3 and isinstance(torrent_file, bytes): +# torrent_file = "".join(chr(x) for x in bytes(torrent_file_uncoded)) - #Si es un archivo .ZIP tratamos de extraer el contenido - if torrent_file.startswith("PK"): - logger.info("it's a zip archive: " + url) +# #Si es un archivo .ZIP tratamos de extraer el contenido +# if torrent_file.startswith("PK"): +# logger.info("it's a zip archive: " + url) - torrents_path_zip = filetools.join(videolibrary_path, 'temp_torrents_zip') #Carpeta de trabajo - torrents_path_zip = filetools.encode(torrents_path_zip) - torrents_path_zip_file = filetools.join(torrents_path_zip, 'temp_torrents_zip.zip') #Nombre del .zip +# torrents_path_zip = filetools.join(videolibrary_path, 'temp_torrents_zip') #Carpeta de trabajo +# torrents_path_zip = filetools.encode(torrents_path_zip) +# torrents_path_zip_file = filetools.join(torrents_path_zip, 'temp_torrents_zip.zip') #Nombre del .zip - import time - filetools.rmdirtree(torrents_path_zip) #Borramos la carpeta temporal - time.sleep(1) #Hay que esperar, porque si no da error - filetools.mkdir(torrents_path_zip) #La creamos de nuevo +# import time +# filetools.rmdirtree(torrents_path_zip) #Borramos la carpeta temporal +# time.sleep(1) #Hay que esperar, porque si no da error +# filetools.mkdir(torrents_path_zip) #La creamos de nuevo - if filetools.write(torrents_path_zip_file, torrent_file_uncoded, vfs=VFS): #Salvamos el .zip - torrent_file = '' #Borramos el contenido en memoria - try: #Extraemos el .zip - from core import ziptools - unzipper = ziptools.ziptools() - unzipper.extract(torrents_path_zip_file, torrents_path_zip) - except: - import xbmc - xbmc.executebuiltin('XBMC.Extract("%s", "%s")' % (torrents_path_zip_file, torrents_path_zip)) - time.sleep(1) +# if filetools.write(torrents_path_zip_file, torrent_file_uncoded, vfs=VFS): #Salvamos el .zip +# torrent_file = '' #Borramos el contenido en memoria +# try: #Extraemos el .zip +# from core import ziptools +# unzipper = ziptools.ziptools() +# unzipper.extract(torrents_path_zip_file, torrents_path_zip) +# except: +# import xbmc +# xbmc.executebuiltin('XBMC.Extract("%s", "%s")' % (torrents_path_zip_file, torrents_path_zip)) +# time.sleep(1) - for root, folders, files in filetools.walk(torrents_path_zip): #Recorremos la carpeta para leer el .torrent - for file in files: - if file.endswith(".torrent"): - input_file = filetools.join(root, file) #nombre del .torrent - torrent_file = filetools.read(input_file, vfs=VFS) #leemos el .torrent - torrent_file_uncoded = torrent_file - if PY3 and isinstance(torrent_file, bytes): - torrent_file = "".join(chr(x) for x in bytes(torrent_file_uncoded)) +# for root, folders, files in filetools.walk(torrents_path_zip): #Recorremos la carpeta para leer el .torrent +# for file in files: +# if file.endswith(".torrent"): +# input_file = filetools.join(root, file) #nombre del .torrent +# torrent_file = filetools.read(input_file, vfs=VFS) #leemos el .torrent +# torrent_file_uncoded = torrent_file +# if PY3 and isinstance(torrent_file, bytes): +# torrent_file = "".join(chr(x) for x in bytes(torrent_file_uncoded)) - filetools.rmdirtree(torrents_path_zip) #Borramos la carpeta temporal +# filetools.rmdirtree(torrents_path_zip) #Borramos la carpeta temporal - #Si no es un archivo .torrent (RAR, HTML,..., vacío) damos error - if not scrapertools.find_single_match(torrent_file, '^d\d+:.*?\d+:'): - logger.error('No es un archivo Torrent: ' + url) - torrents_path = '' - if data_torrent: - return (torrents_path, torrent_file) - return torrents_path #Si hay un error, devolvemos el "path" vacío +# #Si no es un archivo .torrent (RAR, HTML,..., vacío) damos error +# if not scrapertools.find_single_match(torrent_file, '^d\d+:.*?\d+:'): +# logger.error('No es un archivo Torrent: ' + url) +# torrents_path = '' +# if data_torrent: +# return (torrents_path, torrent_file) +# return torrents_path #Si hay un error, devolvemos el "path" vacío - #Calculamos el Hash del Torrent y modificamos el path - import bencode, hashlib +# #Calculamos el Hash del Torrent y modificamos el path +# import bencode, hashlib - decodedDict = bencode.bdecode(torrent_file_uncoded) - if not PY3: - t_hash = hashlib.sha1(bencode.bencode(decodedDict[b"info"])).hexdigest() - else: - t_hash = hashlib.sha1(bencode.bencode(decodedDict["info"])).hexdigest() +# decodedDict = bencode.bdecode(torrent_file_uncoded) +# if not PY3: +# t_hash = hashlib.sha1(bencode.bencode(decodedDict[b"info"])).hexdigest() +# else: +# t_hash = hashlib.sha1(bencode.bencode(decodedDict["info"])).hexdigest() - if t_hash: - torrents_path = filetools.join(filetools.dirname(torrents_path), t_hash + '.torrent') - torrents_path_encode = filetools.join(filetools.dirname(torrents_path_encode), t_hash + '.torrent') +# if t_hash: +# torrents_path = filetools.join(filetools.dirname(torrents_path), t_hash + '.torrent') +# torrents_path_encode = filetools.join(filetools.dirname(torrents_path_encode), t_hash + '.torrent') - #Salvamos el .torrent - if not lookup: - if not filetools.write(torrents_path_encode, torrent_file_uncoded, vfs=VFS): - logger.error('ERROR: Archivo .torrent no escrito: ' + torrents_path_encode) - torrents_path = '' #Si hay un error, devolvemos el "path" vacío - torrent_file = '' #... y el buffer del .torrent - if data_torrent: - return (torrents_path, torrent_file) - return torrents_path - except: - torrents_path = '' #Si hay un error, devolvemos el "path" vacío - torrent_file = '' #... y el buffer del .torrent - logger.error('Error en el proceso de descarga del .torrent: ' + url + ' / ' + torrents_path_encode) - logger.error(traceback.format_exc()) +# #Salvamos el .torrent +# if not lookup: +# if not filetools.write(torrents_path_encode, torrent_file_uncoded, vfs=VFS): +# logger.error('ERROR: Archivo .torrent no escrito: ' + torrents_path_encode) +# torrents_path = '' #Si hay un error, devolvemos el "path" vacío +# torrent_file = '' #... y el buffer del .torrent +# if data_torrent: +# return (torrents_path, torrent_file) +# return torrents_path +# except: +# torrents_path = '' #Si hay un error, devolvemos el "path" vacío +# torrent_file = '' #... y el buffer del .torrent +# logger.error('Error en el proceso de descarga del .torrent: ' + url + ' / ' + torrents_path_encode) +# logger.error(traceback.format_exc()) - #logger.debug(torrents_path) - if data_torrent: - return (torrents_path, torrent_file) - return torrents_path +# #logger.debug(torrents_path) +# if data_torrent: +# return (torrents_path, torrent_file) +# return torrents_path -def magnet2torrent(magnet, headers={}): - logger.info() +# def magnet2torrent(magnet, headers={}): +# logger.info() - torrent_file = '' - info = '' - post = '' - LIBTORRENT_PATH = config.get_setting("libtorrent_path", server="torrent", default="") - LIBTORRENT_MAGNET_PATH = filetools.join(config.get_setting("downloadpath"), 'magnet') - MAGNET2TORRENT = config.get_setting("magnet2torrent", server="torrent", default=False) - btih = scrapertools.find_single_match(magnet, 'urn:btih:([\w\d]+)\&').upper() +# torrent_file = '' +# info = '' +# post = '' +# LIBTORRENT_PATH = config.get_setting("libtorrent_path", server="torrent", default="") +# LIBTORRENT_MAGNET_PATH = filetools.join(config.get_setting("downloadpath"), 'magnet') +# MAGNET2TORRENT = config.get_setting("magnet2torrent", server="torrent", default=False) +# btih = scrapertools.find_single_match(magnet, 'urn:btih:([\w\d]+)\&').upper() - if magnet.startswith('magnet') and MAGNET2TORRENT: +# if magnet.startswith('magnet') and MAGNET2TORRENT: - # Tratamos de convertir el magnet on-line (opción más rápida, pero no se puede convertir más de un magnet a la vez) - url_list = [ - ('https://itorrents.org/torrent/', 6, '', '.torrent') - ] # Lista de servicios on-line testeados - for url, timeout, id, sufix in url_list: - if id: - post = '%s=%s' % (id, magnet) - else: - url = '%s%s%s' % (url, btih, sufix) - response = httptools.downloadpage(url, timeout=timeout, headers=headers, post=post) - if not response.sucess: - continue - if not scrapertools.find_single_match(response.data, '^d\d+:.*?\d+:') and not response.data.startswith("PK"): - continue - torrent_file = response.data - break +# # Tratamos de convertir el magnet on-line (opción más rápida, pero no se puede convertir más de un magnet a la vez) +# url_list = [ +# ('https://itorrents.org/torrent/', 6, '', '.torrent') +# ] # Lista de servicios on-line testeados +# for url, timeout, id, sufix in url_list: +# if id: +# post = '%s=%s' % (id, magnet) +# else: +# url = '%s%s%s' % (url, btih, sufix) +# response = httptools.downloadpage(url, timeout=timeout, headers=headers, post=post) +# if not response.sucess: +# continue +# if not scrapertools.find_single_match(response.data, '^d\d+:.*?\d+:') and not response.data.startswith("PK"): +# continue +# torrent_file = response.data +# break - #Usamos Libtorrent para la conversión del magnet como alternativa (es lento) - if not torrent_file: - lt, e, e1, e2 = import_libtorrent(LIBTORRENT_PATH) # Importamos Libtorrent - if lt: - ses = lt.session() # Si se ha importado bien, activamos Libtorrent - ses.add_dht_router("router.bittorrent.com",6881) - ses.add_dht_router("router.utorrent.com",6881) - ses.add_dht_router("dht.transmissionbt.com",6881) - if ses: - filetools.mkdir(LIBTORRENT_MAGNET_PATH) # Creamos la carpeta temporal - params = { - 'save_path': LIBTORRENT_MAGNET_PATH, - 'trackers': trackers, - 'storage_mode': lt.storage_mode_t.storage_mode_allocate - } # Creamos los parámetros de la sesión +# #Usamos Libtorrent para la conversión del magnet como alternativa (es lento) +# if not torrent_file: +# lt, e, e1, e2 = import_libtorrent(LIBTORRENT_PATH) # Importamos Libtorrent +# if lt: +# ses = lt.session() # Si se ha importado bien, activamos Libtorrent +# ses.add_dht_router("router.bittorrent.com",6881) +# ses.add_dht_router("router.utorrent.com",6881) +# ses.add_dht_router("dht.transmissionbt.com",6881) +# if ses: +# filetools.mkdir(LIBTORRENT_MAGNET_PATH) # Creamos la carpeta temporal +# params = { +# 'save_path': LIBTORRENT_MAGNET_PATH, +# 'trackers': trackers, +# 'storage_mode': lt.storage_mode_t.storage_mode_allocate +# } # Creamos los parámetros de la sesión - h = lt.add_magnet_uri(ses, magnet, params) # Abrimos la sesión - i = 0 - while not h.has_metadata() and not xbmc.abortRequested: # Esperamos mientras Libtorrent abre la sesión - h.force_dht_announce() - time.sleep(1) - i += 1 - logger.error(i) - if i > 5: - LIBTORRENT_PATH = '' # No puede convertir el magnet - break +# h = lt.add_magnet_uri(ses, magnet, params) # Abrimos la sesión +# i = 0 +# while not h.has_metadata() and not xbmc.abortRequested: # Esperamos mientras Libtorrent abre la sesión +# h.force_dht_announce() +# time.sleep(1) +# i += 1 +# logger.error(i) +# if i > 5: +# LIBTORRENT_PATH = '' # No puede convertir el magnet +# break - if LIBTORRENT_PATH: - info = h.get_torrent_info() # Obtiene la información del .torrent - torrent_file = lt.bencode(lt.create_torrent(info).generate()) # Obtiene los datos del .torrent - ses.remove_torrent(h) # Desactiva Libtorrent - filetools.rmdirtree(LIBTORRENT_MAGNET_PATH) # Elimina la carpeta temporal +# if LIBTORRENT_PATH: +# info = h.get_torrent_info() # Obtiene la información del .torrent +# torrent_file = lt.bencode(lt.create_torrent(info).generate()) # Obtiene los datos del .torrent +# ses.remove_torrent(h) # Desactiva Libtorrent +# filetools.rmdirtree(LIBTORRENT_MAGNET_PATH) # Elimina la carpeta temporal - return torrent_file +# return torrent_file def verify_url_torrent(url, timeout=5): @@ -314,314 +314,314 @@ def verify_url_torrent(url, timeout=5): # Reproductor Cliente Torrent propio (libtorrent) -def bt_client(mediaurl, xlistitem, rar_files, subtitle=None, password=None, item=None): - logger.info() +# def bt_client(mediaurl, xlistitem, rar_files, subtitle=None, password=None, item=None): +# logger.info() - # Importamos el cliente - from btserver import Client +# # Importamos el cliente +# from btserver import Client - played = False - debug = False +# played = False +# debug = False - try: - save_path_videos = '' - save_path_videos = filetools.join(config.get_setting("bt_download_path", server="torrent", \ - default=config.get_setting("downloadpath")), 'BT-torrents') - except: - pass - if not config.get_setting("bt_download_path", server="torrent") and save_path_videos: - config.set_setting("bt_download_path", filetools.join(config.get_data_path(), 'downloads'), server="torrent") - if not save_path_videos: - save_path_videos = filetools.join(config.get_data_path(), 'downloads', 'BT-torrents') - config.set_setting("bt_download_path", filetools.join(config.get_data_path(), 'downloads'), server="torrent") +# try: +# save_path_videos = '' +# save_path_videos = filetools.join(config.get_setting("bt_download_path", server="torrent", \ +# default=config.get_setting("downloadpath")), 'BT-torrents') +# except: +# pass +# if not config.get_setting("bt_download_path", server="torrent") and save_path_videos: +# config.set_setting("bt_download_path", filetools.join(config.get_data_path(), 'downloads'), server="torrent") +# if not save_path_videos: +# save_path_videos = filetools.join(config.get_data_path(), 'downloads', 'BT-torrents') +# config.set_setting("bt_download_path", filetools.join(config.get_data_path(), 'downloads'), server="torrent") - UNRAR = config.get_setting("unrar_path", server="torrent", default="") - BACKGROUND = config.get_setting("mct_background_download", server="torrent", default=True) - RAR = config.get_setting("mct_rar_unpack", server="torrent", default=True) - try: - BUFFER = int(config.get_setting("bt_buffer", server="torrent", default="50")) - except: - BUFFER = 50 - DOWNLOAD_LIMIT = config.get_setting("mct_download_limit", server="torrent", default="") - if DOWNLOAD_LIMIT: - try: - DOWNLOAD_LIMIT = int(DOWNLOAD_LIMIT) - except: - DOWNLOAD_LIMIT = 0 - else: - DOWNLOAD_LIMIT = 0 - UPLOAD_LIMIT = 100 +# UNRAR = config.get_setting("unrar_path", server="torrent", default="") +# BACKGROUND = config.get_setting("mct_background_download", server="torrent", default=True) +# RAR = config.get_setting("mct_rar_unpack", server="torrent", default=True) +# try: +# BUFFER = int(config.get_setting("bt_buffer", server="torrent", default="50")) +# except: +# BUFFER = 50 +# DOWNLOAD_LIMIT = config.get_setting("mct_download_limit", server="torrent", default="") +# if DOWNLOAD_LIMIT: +# try: +# DOWNLOAD_LIMIT = int(DOWNLOAD_LIMIT) +# except: +# DOWNLOAD_LIMIT = 0 +# else: +# DOWNLOAD_LIMIT = 0 +# UPLOAD_LIMIT = 100 - torr_client = 'BT' - rar_file = '' - rar_names = [] - rar = False - rar_res = False - bkg_user = False - video_names = [] - video_file = '' - video_path = '' - videourl = '' - msg_header = 'KoD %s Client Torrent' % torr_client - extensions_list = ['.aaf', '.3gp', '.asf', '.avi', '.flv', '.mpeg', - '.m1v', '.m2v', '.m4v', '.mkv', '.mov', '.mpg', - '.mpe', '.mp4', '.ogg', '.rar', '.wmv', '.zip'] +# torr_client = 'BT' +# rar_file = '' +# rar_names = [] +# rar = False +# rar_res = False +# bkg_user = False +# video_names = [] +# video_file = '' +# video_path = '' +# videourl = '' +# msg_header = 'KoD %s Client Torrent' % torr_client +# extensions_list = ['.aaf', '.3gp', '.asf', '.avi', '.flv', '.mpeg', +# '.m1v', '.m2v', '.m4v', '.mkv', '.mov', '.mpg', +# '.mpe', '.mp4', '.ogg', '.rar', '.wmv', '.zip'] - for entry in rar_files: - for file, path in list(entry.items()): - if file == 'path' and '.rar' in str(path): - for file_r in path: - rar_names += [file_r] - rar = True - if RAR and BACKGROUND: - bkg_user = True - elif file == 'path' and not '.rar' in str(path): - for file_r in path: - if os.path.splitext(file_r)[1] in extensions_list: - video_names += [file_r] - elif file == '__name': - video_path = path - video_file = path - if rar: rar_file = '%s/%s' % (video_path, rar_names[0]) - erase_file_path = filetools.join(save_path_videos, video_path) - video_path = erase_file_path - if video_names: video_file = video_names[0] - if not video_file and mediaurl.startswith('magnet'): - video_file = urllib.unquote_plus(scrapertools.find_single_match(mediaurl, '(?:\&|&)dn=([^\&]+)\&')) - erase_file_path = filetools.join(save_path_videos, video_file) +# for entry in rar_files: +# for file, path in list(entry.items()): +# if file == 'path' and '.rar' in str(path): +# for file_r in path: +# rar_names += [file_r] +# rar = True +# if RAR and BACKGROUND: +# bkg_user = True +# elif file == 'path' and not '.rar' in str(path): +# for file_r in path: +# if os.path.splitext(file_r)[1] in extensions_list: +# video_names += [file_r] +# elif file == '__name': +# video_path = path +# video_file = path +# if rar: rar_file = '%s/%s' % (video_path, rar_names[0]) +# erase_file_path = filetools.join(save_path_videos, video_path) +# video_path = erase_file_path +# if video_names: video_file = video_names[0] +# if not video_file and mediaurl.startswith('magnet'): +# video_file = urllib.unquote_plus(scrapertools.find_single_match(mediaurl, '(?:\&|&)dn=([^\&]+)\&')) +# erase_file_path = filetools.join(save_path_videos, video_file) - if rar and RAR and not UNRAR: - if not platformtools.dialog_yesno(msg_header, config.get_localized_string(70791)): - return +# if rar and RAR and not UNRAR: +# if not platformtools.dialog_yesno(msg_header, config.get_localized_string(70791)): +# return - # Iniciamos el cliente: - c = Client(url=mediaurl, is_playing_fnc=xbmc_player.isPlaying, wait_time=None, auto_shutdown=False, timeout=10, - temp_path=save_path_videos, print_status=debug, auto_delete=False) +# # Iniciamos el cliente: +# c = Client(url=mediaurl, is_playing_fnc=xbmc_player.isPlaying, wait_time=None, auto_shutdown=False, timeout=10, +# temp_path=save_path_videos, print_status=debug, auto_delete=False) - activo = True - finalizado = False - dp_cerrado = True +# activo = True +# finalizado = False +# dp_cerrado = True - # Mostramos el progreso - if rar and RAR and BACKGROUND: # Si se descarga un RAR... - progreso = platformtools.dialog_progress_bg(msg_header) - platformtools.dialog_notification(config.get_localized_string(70790), config.get_localized_string(70769), time=10000) - else: - progreso = platformtools.dialog_progress('%s Torrent Client' % torr_client, '') - dp_cerrado = False +# # Mostramos el progreso +# if rar and RAR and BACKGROUND: # Si se descarga un RAR... +# progreso = platformtools.dialog_progress_bg(msg_header) +# platformtools.dialog_notification(config.get_localized_string(70790), config.get_localized_string(70769), time=10000) +# else: +# progreso = platformtools.dialog_progress('%s Torrent Client' % torr_client, '') +# dp_cerrado = False - # Mientras el progreso no sea cancelado ni el cliente cerrado - try: - while not c.closed and not xbmc.abortRequested: - # Obtenemos el estado del torrent - s = c.status - if debug: - # Montamos las tres lineas con la info del torrent - txt = '%.2f%% de %.1fMB %s | %.1f kB/s' % \ - (s.progress_file, s.file_size, s.str_state, s._download_rate) - txt2 = 'S: %d(%d) P: %d(%d) | DHT:%s (%d) | Trakers: %d | Pi: %d(%d)' % \ - (s.num_seeds, s.num_complete, s.num_peers, s.num_incomplete, s.dht_state, s.dht_nodes, - s.trackers, s.pieces_sum, s.pieces_len) - txt3 = 'Origen Peers TRK: %d DHT: %d PEX: %d LSD %d ' % \ - (s.trk_peers, s.dht_peers, s.pex_peers, s.lsd_peers) - else: - txt = '%.2f%% de %.1fMB %s | %.1f kB/s' % \ - (s.progress_file, s.file_size, s.str_state, s._download_rate) - txt2 = 'S: %d(%d) P: %d(%d) | DHT:%s (%d) | Trakers: %d | Pi: %d(%d)' % \ - (s.num_seeds, s.num_complete, s.num_peers, s.num_incomplete, s.dht_state, s.dht_nodes, - s.trackers, s.pieces_sum, s.pieces_len) - txt3 = video_file +# # Mientras el progreso no sea cancelado ni el cliente cerrado +# try: +# while not c.closed and not xbmc.abortRequested: +# # Obtenemos el estado del torrent +# s = c.status +# if debug: +# # Montamos las tres lineas con la info del torrent +# txt = '%.2f%% de %.1fMB %s | %.1f kB/s' % \ +# (s.progress_file, s.file_size, s.str_state, s._download_rate) +# txt2 = 'S: %d(%d) P: %d(%d) | DHT:%s (%d) | Trakers: %d | Pi: %d(%d)' % \ +# (s.num_seeds, s.num_complete, s.num_peers, s.num_incomplete, s.dht_state, s.dht_nodes, +# s.trackers, s.pieces_sum, s.pieces_len) +# txt3 = 'Origen Peers TRK: %d DHT: %d PEX: %d LSD %d ' % \ +# (s.trk_peers, s.dht_peers, s.pex_peers, s.lsd_peers) +# else: +# txt = '%.2f%% de %.1fMB %s | %.1f kB/s' % \ +# (s.progress_file, s.file_size, s.str_state, s._download_rate) +# txt2 = 'S: %d(%d) P: %d(%d) | DHT:%s (%d) | Trakers: %d | Pi: %d(%d)' % \ +# (s.num_seeds, s.num_complete, s.num_peers, s.num_incomplete, s.dht_state, s.dht_nodes, +# s.trackers, s.pieces_sum, s.pieces_len) +# txt3 = video_file - if rar and RAR and BACKGROUND or bkg_user: - progreso.update(s.buffer, txt, txt2) - else: - progreso.update(s.buffer, txt, txt2, txt3) - time.sleep(1) +# if rar and RAR and BACKGROUND or bkg_user: +# progreso.update(s.buffer, txt, txt2) +# else: +# progreso.update(s.buffer, txt, txt2, txt3) +# time.sleep(1) - if (not bkg_user and progreso.iscanceled()) and (not (rar and RAR and BACKGROUND) and progreso.iscanceled()): +# if (not bkg_user and progreso.iscanceled()) and (not (rar and RAR and BACKGROUND) and progreso.iscanceled()): - if not dp_cerrado: - progreso.close() - dp_cerrado = True - if 'Finalizado' in s.str_state or 'Seeding' in s.str_state: - """ - if not rar and platformtools.dialog_yesno(msg_header, config.get_localized_string(70198)): - played = False - dp_cerrado = False - progreso = platformtools.dialog_progress(msg_header, '') - progreso.update(s.buffer, txt, txt2, txt3) - else: - """ - dp_cerrado = False - progreso = platformtools.dialog_progress(msg_header, '') - break +# if not dp_cerrado: +# progreso.close() +# dp_cerrado = True +# if 'Finalizado' in s.str_state or 'Seeding' in s.str_state: +# """ +# if not rar and platformtools.dialog_yesno(msg_header, config.get_localized_string(70198)): +# played = False +# dp_cerrado = False +# progreso = platformtools.dialog_progress(msg_header, '') +# progreso.update(s.buffer, txt, txt2, txt3) +# else: +# """ +# dp_cerrado = False +# progreso = platformtools.dialog_progress(msg_header, '') +# break - else: - if not platformtools.dialog_yesno(msg_header, config.get_localized_string(30031), config.get_localized_string(30032)): - dp_cerrado = False - progreso = platformtools.dialog_progress(msg_header, '') - break +# else: +# if not platformtools.dialog_yesno(msg_header, config.get_localized_string(30031), config.get_localized_string(30032)): +# dp_cerrado = False +# progreso = platformtools.dialog_progress(msg_header, '') +# break - else: - bkg_user = True - if not dp_cerrado: progreso.close() - dp_cerrado = False - progreso = platformtools.dialog_progress_bg(msg_header) - progreso.update(s.buffer, txt, txt2) - if not c.closed: - c.set_speed_limits(DOWNLOAD_LIMIT, UPLOAD_LIMIT) # Bajamos la velocidad en background +# else: +# bkg_user = True +# if not dp_cerrado: progreso.close() +# dp_cerrado = False +# progreso = platformtools.dialog_progress_bg(msg_header) +# progreso.update(s.buffer, txt, txt2) +# if not c.closed: +# c.set_speed_limits(DOWNLOAD_LIMIT, UPLOAD_LIMIT) # Bajamos la velocidad en background - # Si el buffer se ha llenado y la reproduccion no ha sido iniciada, se inicia - if ((s.pieces_sum >= BUFFER or 'Finalizado' in s.str_state or 'Seeding' in s.str_state) and not rar and not bkg_user) or \ - (s.pieces_sum >= s.pieces_len - 3 and s.pieces_len > 0 and ('Finalizado' in s.str_state or 'Seeding' \ - in s.str_state) and (rar or bkg_user)) and not played: +# # Si el buffer se ha llenado y la reproduccion no ha sido iniciada, se inicia +# if ((s.pieces_sum >= BUFFER or 'Finalizado' in s.str_state or 'Seeding' in s.str_state) and not rar and not bkg_user) or \ +# (s.pieces_sum >= s.pieces_len - 3 and s.pieces_len > 0 and ('Finalizado' in s.str_state or 'Seeding' \ +# in s.str_state) and (rar or bkg_user)) and not played: - if rar and RAR and UNRAR: - c.stop() - activo = False - finalizado = True - bkg_user = False - dp_cerrado = False - video_file, rar_res, video_path, erase_file_path = extract_files(rar_file, \ - save_path_videos, password, progreso, item, torr_client) # ... extraemos el vídeo del RAR - if rar_res and not xbmc.abortRequested: - time.sleep(1) - else: - break - elif (rar and not UNRAR) or (rar and not RAR): - break - elif bkg_user: - finalizado = True - break +# if rar and RAR and UNRAR: +# c.stop() +# activo = False +# finalizado = True +# bkg_user = False +# dp_cerrado = False +# video_file, rar_res, video_path, erase_file_path = extract_files(rar_file, \ +# save_path_videos, password, progreso, item, torr_client) # ... extraemos el vídeo del RAR +# if rar_res and not xbmc.abortRequested: +# time.sleep(1) +# else: +# break +# elif (rar and not UNRAR) or (rar and not RAR): +# break +# elif bkg_user: +# finalizado = True +# break - # Cerramos el progreso - if not dp_cerrado: - progreso.close() - dp_cerrado = True +# # Cerramos el progreso +# if not dp_cerrado: +# progreso.close() +# dp_cerrado = True - # Reproducimos el vídeo extraido, si no hay nada en reproducción - if not c.closed: - c.set_speed_limits(DOWNLOAD_LIMIT, UPLOAD_LIMIT) # Bajamos la velocidad en background - bkg_auto = True - while xbmc_player.isPlaying() and not xbmc.abortRequested: - time.sleep(3) +# # Reproducimos el vídeo extraido, si no hay nada en reproducción +# if not c.closed: +# c.set_speed_limits(DOWNLOAD_LIMIT, UPLOAD_LIMIT) # Bajamos la velocidad en background +# bkg_auto = True +# while xbmc_player.isPlaying() and not xbmc.abortRequested: +# time.sleep(3) - # Obtenemos el playlist del torrent - #videourl = c.get_play_list() - if not rar_res: # Es un Magnet ? - video_file = filetools.join(save_path_videos, s.file_name) - if erase_file_path == save_path_videos: - erase_file_path = video_file - videourl = video_file - else: - videourl = filetools.join(video_path, video_file) +# # Obtenemos el playlist del torrent +# #videourl = c.get_play_list() +# if not rar_res: # Es un Magnet ? +# video_file = filetools.join(save_path_videos, s.file_name) +# if erase_file_path == save_path_videos: +# erase_file_path = video_file +# videourl = video_file +# else: +# videourl = filetools.join(video_path, video_file) - # Iniciamos el reproductor - playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) - playlist.clear() - playlist.add(videourl, xlistitem) - # xbmc_player = xbmc_player - log("##### videourl: %s" % videourl) - xbmc_player.play(playlist) +# # Iniciamos el reproductor +# playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) +# playlist.clear() +# playlist.add(videourl, xlistitem) +# # xbmc_player = xbmc_player +# log("##### videourl: %s" % videourl) +# xbmc_player.play(playlist) - # Marcamos como reproducido para que no se vuelva a iniciar - played = True +# # Marcamos como reproducido para que no se vuelva a iniciar +# played = True - mark_auto_as_watched(item) +# mark_auto_as_watched(item) - # Y esperamos a que el reproductor se cierre - bkg_auto = True - dp_cerrado = True - while xbmc_player.isPlaying() and not xbmc.abortRequested: - time.sleep(1) +# # Y esperamos a que el reproductor se cierre +# bkg_auto = True +# dp_cerrado = True +# while xbmc_player.isPlaying() and not xbmc.abortRequested: +# time.sleep(1) - if xbmc.getCondVisibility('Player.Playing'): - if not dp_cerrado: - dp_cerrado = True - progreso.close() +# if xbmc.getCondVisibility('Player.Playing'): +# if not dp_cerrado: +# dp_cerrado = True +# progreso.close() - if xbmc.getCondVisibility('Player.Paused') and not rar_res: - if not c.closed: s = c.status - txt = '%.2f%% de %.1fMB %s | %.1f kB/s' % \ - (s.progress_file, s.file_size, s.str_state, s._download_rate) - txt2 = 'S: %d(%d) P: %d(%d) | DHT:%s (%d) | Trakers: %d | Pi: %d(%d)' % \ - (s.num_seeds, s.num_complete, s.num_peers, s.num_incomplete, s.dht_state, s.dht_nodes, - s.trackers, s.pieces_sum, s.pieces_len) - txt3 = video_file[:99] - if dp_cerrado: - dp_cerrado = False - progreso = xbmcgui.DialogProgressBG() - progreso.create(msg_header) - progreso.update(s.buffer, msg_header, '[CR][CR]' + txt + '[CR]' + txt2) +# if xbmc.getCondVisibility('Player.Paused') and not rar_res: +# if not c.closed: s = c.status +# txt = '%.2f%% de %.1fMB %s | %.1f kB/s' % \ +# (s.progress_file, s.file_size, s.str_state, s._download_rate) +# txt2 = 'S: %d(%d) P: %d(%d) | DHT:%s (%d) | Trakers: %d | Pi: %d(%d)' % \ +# (s.num_seeds, s.num_complete, s.num_peers, s.num_incomplete, s.dht_state, s.dht_nodes, +# s.trackers, s.pieces_sum, s.pieces_len) +# txt3 = video_file[:99] +# if dp_cerrado: +# dp_cerrado = False +# progreso = xbmcgui.DialogProgressBG() +# progreso.create(msg_header) +# progreso.update(s.buffer, msg_header, '[CR][CR]' + txt + '[CR]' + txt2) - if not dp_cerrado: - dp_cerrado = True - progreso.close() +# if not dp_cerrado: +# dp_cerrado = True +# progreso.close() - # Miramos si se ha completado la descarga para borrar o no los archivos - if activo: - s = c.status - if s.pieces_sum == s.pieces_len: - finalizado = True - break +# # Miramos si se ha completado la descarga para borrar o no los archivos +# if activo: +# s = c.status +# if s.pieces_sum == s.pieces_len: +# finalizado = True +# break - if not platformtools.dialog_yesno(msg_header, config.get_localized_string(30031), config.get_localized_string(30032)): - progreso = platformtools.dialog_progress(msg_header, '') - dp_cerrado = False - break - else: - bkg_user = True - played = False - if not dp_cerrado: progreso.close() - progreso = platformtools.dialog_progress_bg(msg_header) - progreso.update(s.buffer, txt, txt2) - dp_cerrado = False - continue +# if not platformtools.dialog_yesno(msg_header, config.get_localized_string(30031), config.get_localized_string(30032)): +# progreso = platformtools.dialog_progress(msg_header, '') +# dp_cerrado = False +# break +# else: +# bkg_user = True +# played = False +# if not dp_cerrado: progreso.close() +# progreso = platformtools.dialog_progress_bg(msg_header) +# progreso.update(s.buffer, txt, txt2) +# dp_cerrado = False +# continue - # Cuando este cerrado, Volvemos a mostrar el dialogo - if not (rar and bkg_user): - progreso = platformtools.dialog_progress(msg_header, '') - progreso.update(s.buffer, txt, txt2, txt3) - dp_cerrado = False +# # Cuando este cerrado, Volvemos a mostrar el dialogo +# if not (rar and bkg_user): +# progreso = platformtools.dialog_progress(msg_header, '') +# progreso.update(s.buffer, txt, txt2, txt3) +# dp_cerrado = False - break - except: - logger.error(traceback.format_exc(1)) - return +# break +# except: +# logger.error(traceback.format_exc(1)) +# return - if not dp_cerrado: - if rar or bkg_user: - progreso.update(100, config.get_localized_string(70200), " ") - else: - progreso.update(100, config.get_localized_string(70200), " ", " ") +# if not dp_cerrado: +# if rar or bkg_user: +# progreso.update(100, config.get_localized_string(70200), " ") +# else: +# progreso.update(100, config.get_localized_string(70200), " ", " ") - # Detenemos el cliente - if activo and not c.closed: - c.stop() - activo = False +# # Detenemos el cliente +# if activo and not c.closed: +# c.stop() +# activo = False - # Cerramos el progreso - if not dp_cerrado: - progreso.close() - dp_cerrado = True +# # Cerramos el progreso +# if not dp_cerrado: +# progreso.close() +# dp_cerrado = True - # Y borramos los archivos de descarga restantes - time.sleep(1) - if filetools.exists(erase_file_path) and not bkg_user: - if finalizado and not platformtools.dialog_yesno(msg_header, config.get_localized_string(70792)): - return - log("##### erase_file_path: %s" % erase_file_path) - for x in range(10): - if filetools.isdir(erase_file_path): - if erase_file_path != save_path_videos: - filetools.rmdirtree(erase_file_path) - else: - break - else: - filetools.remove(erase_file_path) - time.sleep(5) - if not filetools.exists(erase_file_path): - break +# # Y borramos los archivos de descarga restantes +# time.sleep(1) +# if filetools.exists(erase_file_path) and not bkg_user: +# if finalizado and not platformtools.dialog_yesno(msg_header, config.get_localized_string(70792)): +# return +# log("##### erase_file_path: %s" % erase_file_path) +# for x in range(10): +# if filetools.isdir(erase_file_path): +# if erase_file_path != save_path_videos: +# filetools.rmdirtree(erase_file_path) +# else: +# break +# else: +# filetools.remove(erase_file_path) +# time.sleep(5) +# if not filetools.exists(erase_file_path): +# break def call_torrent_via_web(mediaurl, torr_client): @@ -1273,76 +1273,76 @@ def update_rar_control(path, newpath='', newextract='', password='', error='', e return rar_control -def import_libtorrent(LIBTORRENT_PATH): - logger.info(LIBTORRENT_PATH) +# def import_libtorrent(LIBTORRENT_PATH): +# logger.info(LIBTORRENT_PATH) - e = '' - e1 = '' - e2 = '' - fp = '' - pathname = '' - description = '' - lt = '' +# e = '' +# e1 = '' +# e2 = '' +# fp = '' +# pathname = '' +# description = '' +# lt = '' - try: - sys.path.insert(0, LIBTORRENT_PATH) - if LIBTORRENT_PATH: - try: - if not xbmc.getCondVisibility("system.platform.android"): - import libtorrent as lt - pathname = LIBTORRENT_PATH - else: - import imp - from ctypes import CDLL - dll_path = os.path.join(LIBTORRENT_PATH, 'liblibtorrent.so') - liblibtorrent = CDLL(dll_path) +# try: +# sys.path.insert(0, LIBTORRENT_PATH) +# if LIBTORRENT_PATH: +# try: +# if not xbmc.getCondVisibility("system.platform.android"): +# import libtorrent as lt +# pathname = LIBTORRENT_PATH +# else: +# import imp +# from ctypes import CDLL +# dll_path = os.path.join(LIBTORRENT_PATH, 'liblibtorrent.so') +# liblibtorrent = CDLL(dll_path) - path_list = [LIBTORRENT_PATH, xbmc.translatePath('special://xbmc')] - fp, pathname, description = imp.find_module('libtorrent', path_list) +# path_list = [LIBTORRENT_PATH, xbmc.translatePath('special://xbmc')] +# fp, pathname, description = imp.find_module('libtorrent', path_list) - # Esta parte no funciona en Android. Por algún motivo da el error "dlopen failed: library "liblibtorrent.so" not found" - # Hay que encontrar un hack para rodear el problema. Lo siguiente ha sido probado sin éxito: - #if fp: fp.close() - #fp = filetools.file_open(filetools.join(LIBTORRENT_PATH, 'libtorrent.so'), mode='rb') # Usa XbmcVFS - #fp = open(os.path.join(LIBTORRENT_PATH, 'libtorrent.so'), 'rb') +# # Esta parte no funciona en Android. Por algún motivo da el error "dlopen failed: library "liblibtorrent.so" not found" +# # Hay que encontrar un hack para rodear el problema. Lo siguiente ha sido probado sin éxito: +# #if fp: fp.close() +# #fp = filetools.file_open(filetools.join(LIBTORRENT_PATH, 'libtorrent.so'), mode='rb') # Usa XbmcVFS +# #fp = open(os.path.join(LIBTORRENT_PATH, 'libtorrent.so'), 'rb') - try: - lt = imp.load_module('libtorrent', fp, pathname, description) - finally: - if fp: fp.close() +# try: +# lt = imp.load_module('libtorrent', fp, pathname, description) +# finally: +# if fp: fp.close() - except Exception as e1: - logger.error(traceback.format_exc(1)) - log('fp = ' + str(fp)) - log('pathname = ' + str(pathname)) - log('description = ' + str(description)) - if fp: fp.close() - from lib.python_libtorrent.python_libtorrent import get_libtorrent - lt = get_libtorrent() +# except Exception as e1: +# logger.error(traceback.format_exc(1)) +# log('fp = ' + str(fp)) +# log('pathname = ' + str(pathname)) +# log('description = ' + str(description)) +# if fp: fp.close() +# from lib.python_libtorrent.python_libtorrent import get_libtorrent +# lt = get_libtorrent() - except Exception as e2: - try: - logger.error(traceback.format_exc()) - if fp: fp.close() - e = e1 or e2 - ok = platformtools.dialog_ok(config.get_localized_string(30035), config.get_localized_string(30036), config.get_localized_string(60015), str(e2)) - except: - pass +# except Exception as e2: +# try: +# logger.error(traceback.format_exc()) +# if fp: fp.close() +# e = e1 or e2 +# ok = platformtools.dialog_ok(config.get_localized_string(30035), config.get_localized_string(30036), config.get_localized_string(60015), str(e2)) +# except: +# pass - try: - if not e1 and e2: e1 = e2 - except: - try: - if e2: - e1 = e2 - else: - e1 = '' - e2 = '' - except: - e1 = '' - e2 = '' +# try: +# if not e1 and e2: e1 = e2 +# except: +# try: +# if e2: +# e1 = e2 +# else: +# e1 = '' +# e2 = '' +# except: +# e1 = '' +# e2 = '' - return lt, e, e1, e2 +# return lt, e, e1, e2 def log(texto): diff --git a/specials/quasar_download.py b/specials/elementum_download.py similarity index 69% rename from specials/quasar_download.py rename to specials/elementum_download.py index a2e5c884..4823bc66 100644 --- a/specials/quasar_download.py +++ b/specials/elementum_download.py @@ -6,17 +6,17 @@ from time import sleep import xbmc, xbmcaddon, os, sys, platform host = 'https://github.com' -quasar_url = host + '/scakemyer/plugin.video.quasar/releases' -filename = filetools.join(config.get_data_path(),'quasar.zip') +elementum_url = host + '/elgatito/plugin.video.elementum/releases' +filename = filetools.join(config.get_data_path(),'elementum.zip') addon_path = xbmc.translatePath("special://home/addons/") -quasar_path = filetools.join(addon_path,'plugin.video.quasar') +elementum_path = filetools.join(addon_path,'plugin.video.elementum') def download(item=None): - if filetools.exists(quasar_path): - xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id":1, "method": "Addons.SetAddonEnabled", "params": { "addonid": "plugin.video.quasar", "enabled": false }}') + if filetools.exists(elementum_path): + xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id":1, "method": "Addons.SetAddonEnabled", "params": { "addonid": "plugin.video.elementum", "enabled": false }}') sleep(1) - filetools.rmdirtree(quasar_path) + filetools.rmdirtree(elementum_path) if filetools.exists(filename): filetools.remove(filename) @@ -24,8 +24,8 @@ def download(item=None): else: platform = get_platform() support.log('OS:', platform) - support.log('Extract IN:', quasar_path) - url = support.match(quasar_url, patronBlock=r'
(.*?)', patron=r'(.*?)', patron=r'