Merge branch 'master' into prueba_request

This commit is contained in:
Alfa
2018-07-18 08:42:00 -05:00
committed by GitHub
19 changed files with 129 additions and 54 deletions
+4 -3
View File
@@ -198,6 +198,9 @@ def post_tmdb_listado(item, itemlist):
for item_local in itemlist: #Recorremos el Itenlist generado por el canal
title = item_local.title
#logger.debug(item_local)
item_local.last_page = 0
del item_local.last_page #Borramos restos de paginación
if item_local.contentSeason_save: #Restauramos el num. de Temporada
item_local.contentSeason = item_local.contentSeason_save
@@ -710,9 +713,7 @@ def post_tmdb_findvideos(item, itemlist):
title_gen = '%s: %s' % (item.category.capitalize(), title_gen)
#Pintamos el pseudo-título con toda la información disponible del vídeo
item.action = ""
item.server = ""
itemlist.append(item.clone(title=title_gen)) #Título con todos los datos del vídeo
itemlist.append(item.clone(action="", server = "", title=title_gen)) #Título con todos los datos del vídeo
#agregamos la opción de Añadir a Videoteca para péliculas (no series)
if item.contentType == 'movie' and item.contentChannel != "videolibrary":
+5 -3
View File
@@ -4,6 +4,7 @@ import random
import struct
import time
import urllib
from core import httptools
from threading import Thread
from file import File
@@ -132,9 +133,9 @@ class Client(object):
raise Exception("Enlace no valido")
def api_req(self, req, get=""):
seqno = random.randint(0, 0xFFFFFFFF)
url = 'https://g.api.mega.co.nz/cs?id=%d%s' % (seqno, get)
return json.loads(self.post(url, json.dumps([req])))[0]
seqno = random.randint(0, 0xFFFFFFFF)
url = 'https://g.api.mega.co.nz/cs?id=%d%s' % (seqno, get)
return json.loads(self.post(url, json.dumps([req])))[0]
def base64urldecode(self,data):
data += '=='[(2 - len(data) * 3) % 4:]
@@ -179,6 +180,7 @@ class Client(object):
return sum((self.aes_cbc_decrypt_a32(a[i:i+4], key) for i in xrange(0, len(a), 4)), ())
def post(self, url, data):
return httptools.downloadpage(url, data).data
import ssl
from functools import wraps
def sslwrap(func):