Merge pull request #440 from lopezvg/master
Kodi 18: arreglos de compatibilidad, Autoplay y Filtrado de idiomas, y rediseño de canales PelisMagnet y TodoPeliculas
This commit is contained in:
@@ -97,7 +97,9 @@ class Main(xbmcgui.WindowXMLDialog):
|
||||
self.items = []
|
||||
|
||||
def onInit(self):
|
||||
self.setCoordinateResolution(2)
|
||||
#### Compatibilidad con Kodi 18 ####
|
||||
if config.get_platform(True)['num_version'] < 18:
|
||||
self.setCoordinateResolution(2)
|
||||
|
||||
for menuentry in MAIN_MENU.keys():
|
||||
item = xbmcgui.ListItem(MAIN_MENU[menuentry]["label"])
|
||||
|
||||
@@ -1071,8 +1071,8 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
|
||||
#### 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 evutar error Kod1 18
|
||||
time.sleep(1) #Dejamos que se ejecute
|
||||
xbmcplugin.setResolvedUrl(int(sys.argv[1]), False, xlistitem) #Preparamos el entorno para evitar error Kod1 18
|
||||
time.sleep(1) #Dejamos tiempo para que se ejecute
|
||||
|
||||
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
|
||||
@@ -1083,17 +1083,17 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
|
||||
xbmc.executebuiltin("PlayMedia(" + torrent_options[seleccion][1] % mediaurl + ")")
|
||||
|
||||
#Seleccionamos que clientes torrent soportamos para el marcado de vídeos vistos
|
||||
if "quasar" in torrent_options[seleccion][1] or "elementum" in torrent_options[seleccion][1]:
|
||||
time_limit = time.time() + 150 #Marcamos el timepo máx. de buffering
|
||||
while not is_playing() and time.time() < time_limit: #Esperamos mientra buffera
|
||||
time.sleep(5) #Repetimos cada intervalo
|
||||
#logger.debug(str(time_limit))
|
||||
|
||||
if item.strm_path and is_playing(): #Sólo si es de Videoteca
|
||||
from platformcode import xbmc_videolibrary
|
||||
xbmc_videolibrary.mark_auto_as_watched(item) #Marcamos como visto al terminar
|
||||
#logger.debug("Llamado el marcado")
|
||||
#Seleccionamos que clientes torrent soportamos para el marcado de vídeos vistos: asumimos que todos funcionan
|
||||
#if "quasar" in torrent_options[seleccion][1] or "elementum" in torrent_options[seleccion][1]:
|
||||
time_limit = time.time() + 150 #Marcamos el timepo máx. de buffering
|
||||
while not is_playing() and time.time() < time_limit: #Esperamos mientra buffera
|
||||
time.sleep(5) #Repetimos cada intervalo
|
||||
#logger.debug(str(time_limit))
|
||||
|
||||
if item.strm_path and is_playing(): #Sólo si es de Videoteca
|
||||
from platformcode import xbmc_videolibrary
|
||||
xbmc_videolibrary.mark_auto_as_watched(item) #Marcamos como visto al terminar
|
||||
#logger.debug("Llamado el marcado")
|
||||
|
||||
if seleccion == 1:
|
||||
from platformcode import mct
|
||||
|
||||
@@ -40,7 +40,9 @@ class Recaptcha(xbmcgui.WindowXMLDialog):
|
||||
self.imagen = kwargs.get("imagen")
|
||||
|
||||
def onInit(self):
|
||||
self.setCoordinateResolution(2)
|
||||
#### Compatibilidad con Kodi 18 ####
|
||||
if config.get_platform(True)['num_version'] < 18:
|
||||
self.setCoordinateResolution(2)
|
||||
self.update_window()
|
||||
|
||||
def onClick(self, control):
|
||||
|
||||
@@ -469,6 +469,7 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
|
||||
self.ok_enabled = False
|
||||
self.default_enabled = False
|
||||
|
||||
#### Compatibilidad con Kodi 18 ####
|
||||
if config.get_platform(True)['num_version'] < 18:
|
||||
if xbmcgui.__version__ == "1.2":
|
||||
self.setCoordinateResolution(1)
|
||||
|
||||
@@ -184,10 +184,12 @@ class InfoWindow(xbmcgui.WindowXMLDialog):
|
||||
self.scraper = Tmdb
|
||||
|
||||
def onInit(self):
|
||||
if xbmcgui.__version__ == "1.2":
|
||||
self.setCoordinateResolution(1)
|
||||
else:
|
||||
self.setCoordinateResolution(5)
|
||||
#### Compatibilidad con Kodi 18 ####
|
||||
if config.get_platform(True)['num_version'] < 18:
|
||||
if xbmcgui.__version__ == "1.2":
|
||||
self.setCoordinateResolution(1)
|
||||
else:
|
||||
self.setCoordinateResolution(5)
|
||||
|
||||
# Ponemos el título y las imagenes
|
||||
self.getControl(10002).setLabel(self.caption)
|
||||
|
||||
Reference in New Issue
Block a user