Merge pull request #452 from lopezvg/master
Kodi 18: mejoras de compatibilidad
This commit is contained in:
@@ -3,11 +3,13 @@
|
|||||||
"name": "CineCalidad",
|
"name": "CineCalidad",
|
||||||
"active": true,
|
"active": true,
|
||||||
"adult": false,
|
"adult": false,
|
||||||
"language": ["cast", "lat"],
|
"language": ["cast", "lat", "por"],
|
||||||
"thumbnail": "https://s9.postimg.cc/58xyblsvj/cinecalidad.png",
|
"thumbnail": "https://s9.postimg.cc/58xyblsvj/cinecalidad.png",
|
||||||
"banner": "https://s32.postimg.cc/kihkdpx1x/banner_cinecalidad.png",
|
"banner": "https://s32.postimg.cc/kihkdpx1x/banner_cinecalidad.png",
|
||||||
"categories": [
|
"categories": [
|
||||||
"movie",
|
"movie",
|
||||||
|
"direct",
|
||||||
|
"vos",
|
||||||
"torrent"
|
"torrent"
|
||||||
],
|
],
|
||||||
"settings": [
|
"settings": [
|
||||||
@@ -15,9 +17,9 @@
|
|||||||
"id": "include_in_global_search",
|
"id": "include_in_global_search",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"label": "Incluir en busqueda global",
|
"label": "Incluir en busqueda global",
|
||||||
"default": false,
|
"default": true,
|
||||||
"enabled": false,
|
"enabled": true,
|
||||||
"visible": false
|
"visible": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "filter_languages",
|
"id": "filter_languages",
|
||||||
|
|||||||
@@ -6,9 +6,7 @@
|
|||||||
"language": ["cast", "lat"],
|
"language": ["cast", "lat"],
|
||||||
"thumbnail": "http://imgur.com/lmYQgOu.png",
|
"thumbnail": "http://imgur.com/lmYQgOu.png",
|
||||||
"categories": [
|
"categories": [
|
||||||
"torrent",
|
|
||||||
"movie",
|
"movie",
|
||||||
"tvshow",
|
|
||||||
"direct"
|
"direct"
|
||||||
],
|
],
|
||||||
"settings": [
|
"settings": [
|
||||||
|
|||||||
@@ -461,6 +461,10 @@ def findvideos(item):
|
|||||||
server.nfo = item.nfo
|
server.nfo = item.nfo
|
||||||
server.strm_path = item.strm_path
|
server.strm_path = item.strm_path
|
||||||
|
|
||||||
|
#### Compatibilidad con Kodi 18: evita que se quede la ruedecedita dando vueltas en enlaces Directos
|
||||||
|
if server.action == 'play':
|
||||||
|
server.folder = False
|
||||||
|
|
||||||
# Se añade el nombre del canal si se desea
|
# Se añade el nombre del canal si se desea
|
||||||
if config.get_setting("quit_channel_name", "videolibrary") == 0:
|
if config.get_setting("quit_channel_name", "videolibrary") == 0:
|
||||||
server.title = "%s: %s" % (nom_canal.capitalize(), server.title)
|
server.title = "%s: %s" % (nom_canal.capitalize(), server.title)
|
||||||
|
|||||||
@@ -486,7 +486,7 @@ def post_tmdb_seasons(item, itemlist):
|
|||||||
Pasada para gestión del menú de Temporadas de una Serie
|
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.
|
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ña a la Videoteca para que se analicen los episodios de la forma tradicional
|
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.
|
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
|
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
|
||||||
@@ -1743,7 +1743,7 @@ def redirect_clone_newpct1(item, head_nfo=None, it=None, path=False, overwrite=F
|
|||||||
if ow_force == 'del': #Si es un borrado de estructuras erroneas, hacemos un proceso aparte
|
if ow_force == 'del': #Si es un borrado de estructuras erroneas, hacemos un proceso aparte
|
||||||
canal_des_def = canal_des #Si hay canal de sustitución para item.library_urls, lo usamos
|
canal_des_def = canal_des #Si hay canal de sustitución para item.library_urls, lo usamos
|
||||||
if not canal_des_def and canal_org in item.library_urls and len(item.library_urls) == 1: #Si no, lo extraemos de la url
|
if not canal_des_def and canal_org in item.library_urls and len(item.library_urls) == 1: #Si no, lo extraemos de la url
|
||||||
canal_des_def = scrapertools.find_single_match(item.library_urls[canal_org], 'http.?\:\/\/(?:www.)?(\w+)\.\w+\/').lower() #salvamos la url actual de la estructura a borrar
|
canal_des_def = scrapertools.find_single_match(item.library_urls[canal_org], 'http.?\:\/\/(?:www.)?(\w+)\.\w+\/').lower() #salvamos la url actual de la estructura a borrar
|
||||||
url_total = ''
|
url_total = ''
|
||||||
if item.url:
|
if item.url:
|
||||||
url_total = item.url #Si existe item.url, lo salvamos para futuro uso
|
url_total = item.url #Si existe item.url, lo salvamos para futuro uso
|
||||||
@@ -1795,7 +1795,7 @@ def redirect_clone_newpct1(item, head_nfo=None, it=None, path=False, overwrite=F
|
|||||||
channel_alt = channel_py
|
channel_alt = channel_py
|
||||||
if channel_alt == 'videolibrary':
|
if channel_alt == 'videolibrary':
|
||||||
continue
|
continue
|
||||||
if item.contentType == "list": #Si viene de Videolibrary, le cambiamos ya el canal
|
if item.contentType == "list": #Si viene de Videolibrary, le cambiamos ya el canal
|
||||||
if item.channel != channel_py:
|
if item.channel != channel_py:
|
||||||
item.channel = canal_des #Cambiamos el canal. Si es clone, lo hace el canal
|
item.channel = canal_des #Cambiamos el canal. Si es clone, lo hace el canal
|
||||||
continue #Salimos sin hacer nada más. item está casi vacío
|
continue #Salimos sin hacer nada más. item está casi vacío
|
||||||
@@ -1811,7 +1811,7 @@ def redirect_clone_newpct1(item, head_nfo=None, it=None, path=False, overwrite=F
|
|||||||
continue #... una intervención que afecte solo a una región
|
continue #... una intervención que afecte solo a una región
|
||||||
if ow_force == 'no' and it.library_urls: #Esta regla solo vale para findvideos...
|
if ow_force == 'no' and it.library_urls: #Esta regla solo vale para findvideos...
|
||||||
continue #... salidmos si estamos actualizando
|
continue #... salidmos si estamos actualizando
|
||||||
if lookup == True: #Queremos que el canal solo visualice sin migración?
|
if lookup == True: #Queremos que el canal solo visualice sin migración?
|
||||||
if ow_force != 'no':
|
if ow_force != 'no':
|
||||||
overwrite = True #Avisamos que hay cambios
|
overwrite = True #Avisamos que hay cambios
|
||||||
continue #Salimos sin tocar archivos
|
continue #Salimos sin tocar archivos
|
||||||
@@ -1820,7 +1820,7 @@ def redirect_clone_newpct1(item, head_nfo=None, it=None, path=False, overwrite=F
|
|||||||
url_total = item.url
|
url_total = item.url
|
||||||
elif not item.url and item.library_urls:
|
elif not item.url and item.library_urls:
|
||||||
url_total = item.library_urls[canal_org]
|
url_total = item.library_urls[canal_org]
|
||||||
url_total = url_total.replace(url_org, url_des) #reemplazamos una parte de url
|
url_total = url_total.replace(url_org, url_des) #reemplazamos una parte de url
|
||||||
url = ''
|
url = ''
|
||||||
if patron1: #Hay expresión regex?
|
if patron1: #Hay expresión regex?
|
||||||
url += scrapertools.find_single_match(url_total, patron1) #La aplicamos a url
|
url += scrapertools.find_single_match(url_total, patron1) #La aplicamos a url
|
||||||
@@ -1856,7 +1856,7 @@ def redirect_clone_newpct1(item, head_nfo=None, it=None, path=False, overwrite=F
|
|||||||
item.channel = canal_des_def #Cambiamos el canal. Si es clone, lo hace el canal
|
item.channel = canal_des_def #Cambiamos el canal. Si es clone, lo hace el canal
|
||||||
if channel_alt == item.category.lower(): #Actualizamos la Categoría y si la tenía
|
if channel_alt == item.category.lower(): #Actualizamos la Categoría y si la tenía
|
||||||
item.category = item.channel.capitalize()
|
item.category = item.channel.capitalize()
|
||||||
if ow_force_def == 'force': #Queremos que el canal revise la serie entera?
|
if ow_force_def == 'force' and item.contentType != 'movie': #Queremos que el canal revise la serie entera?
|
||||||
item.ow_force = '1' #Se lo decimos
|
item.ow_force = '1' #Se lo decimos
|
||||||
if ow_force_def in ['force', 'auto']: #Sobreescribir la series?
|
if ow_force_def in ['force', 'auto']: #Sobreescribir la series?
|
||||||
overwrite = True #Sí, lo marcamos
|
overwrite = True #Sí, lo marcamos
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ def play_from_library(item):
|
|||||||
@param item: elemento con información
|
@param item: elemento con información
|
||||||
"""
|
"""
|
||||||
logger.info()
|
logger.info()
|
||||||
# logger.debug("item: \n" + item.tostring('\n'))
|
#logger.debug("item: \n" + item.tostring('\n'))
|
||||||
|
|
||||||
import xbmcgui
|
import xbmcgui
|
||||||
import xbmcplugin
|
import xbmcplugin
|
||||||
@@ -437,33 +437,39 @@ def play_from_library(item):
|
|||||||
itemlist = reorder_itemlist(itemlist)
|
itemlist = reorder_itemlist(itemlist)
|
||||||
|
|
||||||
|
|
||||||
|
import time
|
||||||
p_dialog.update(100, '')
|
p_dialog.update(100, '')
|
||||||
xbmc.sleep(500)
|
time.sleep(0.5)
|
||||||
p_dialog.close()
|
p_dialog.close()
|
||||||
|
|
||||||
|
|
||||||
if len(itemlist) > 0:
|
if len(itemlist) > 0:
|
||||||
# El usuario elige el mirror
|
while not xbmc.Monitor().abortRequested():
|
||||||
opciones = []
|
# El usuario elige el mirror
|
||||||
for item in itemlist:
|
opciones = []
|
||||||
opciones.append(item.title)
|
for item in itemlist:
|
||||||
|
opciones.append(item.title)
|
||||||
|
|
||||||
# Se abre la ventana de seleccion
|
# Se abre la ventana de seleccion
|
||||||
if (item.contentSerieName != "" and
|
if (item.contentSerieName != "" and
|
||||||
item.contentSeason != "" and
|
item.contentSeason != "" and
|
||||||
item.contentEpisodeNumber != ""):
|
item.contentEpisodeNumber != ""):
|
||||||
cabecera = ("%s - %sx%s -- %s" %
|
cabecera = ("%s - %sx%s -- %s" %
|
||||||
(item.contentSerieName,
|
(item.contentSerieName,
|
||||||
item.contentSeason,
|
item.contentSeason,
|
||||||
item.contentEpisodeNumber,
|
item.contentEpisodeNumber,
|
||||||
config.get_localized_string(30163)))
|
config.get_localized_string(30163)))
|
||||||
else:
|
else:
|
||||||
cabecera = config.get_localized_string(30163)
|
cabecera = config.get_localized_string(30163)
|
||||||
|
|
||||||
seleccion = platformtools.dialog_select(cabecera, opciones)
|
seleccion = platformtools.dialog_select(cabecera, opciones)
|
||||||
|
|
||||||
if seleccion == -1:
|
if seleccion == -1:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
item = videolibrary.play(itemlist[seleccion])[0]
|
item = videolibrary.play(itemlist[seleccion])[0]
|
||||||
platformtools.play_video(item)
|
platformtools.play_video(item)
|
||||||
|
|
||||||
|
from channels import autoplay
|
||||||
|
if (platformtools.is_playing() and item.action) or item.server == 'torrent' or autoplay.is_active(item.contentChannel):
|
||||||
|
break
|
||||||
|
|||||||
@@ -1080,12 +1080,13 @@ def play_torrent(item, xlistitem, mediaurl):
|
|||||||
if seleccion > 1:
|
if seleccion > 1:
|
||||||
|
|
||||||
#### Compatibilidad con Kodi 18: evita cuelgues/cancelaciones cuando el .torrent se lanza desde pantalla convencional
|
#### Compatibilidad con Kodi 18: evita cuelgues/cancelaciones cuando el .torrent se lanza desde pantalla convencional
|
||||||
if xbmc.getCondVisibility('Window.IsMedia'):
|
#if xbmc.getCondVisibility('Window.IsMedia'):
|
||||||
xbmcplugin.setResolvedUrl(int(sys.argv[1]), False, xlistitem) #Preparamos el entorno para evitar error Kod1 18
|
xbmcplugin.setResolvedUrl(int(sys.argv[1]), False, xlistitem) #Preparamos el entorno para evitar error Kod1 18
|
||||||
xbmc.sleep(500) #Dejamos tiempo para que se ejecute
|
time.sleep(0.5) #Dejamos tiempo para que se ejecute
|
||||||
|
|
||||||
mediaurl = urllib.quote_plus(item.url)
|
mediaurl = urllib.quote_plus(item.url)
|
||||||
if ("quasar" in torrent_options[seleccion][1] or "elementum" in torrent_options[seleccion][1]) and item.infoLabels['tmdb_id']: #Llamada con más parámetros para completar el título
|
#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]:
|
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'])
|
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':
|
elif item.contentType == 'movie':
|
||||||
|
|||||||
Reference in New Issue
Block a user