Fix Salva Link
This commit is contained in:
+1
-1
@@ -441,7 +441,7 @@ class AddonMonitor(xbmc.Monitor):
|
|||||||
logger.debug('scheduled videolibrary at ' + str(self.update_hour).zfill(2) + ':00')
|
logger.debug('scheduled videolibrary at ' + str(self.update_hour).zfill(2) + ':00')
|
||||||
|
|
||||||
def scheduleScreenOnJobs(self):
|
def scheduleScreenOnJobs(self):
|
||||||
schedule.every(0.5).seconds.do(platformtools.viewmodeMonitor).tag('screenOn')
|
schedule.every().second.do(platformtools.viewmodeMonitor).tag('screenOn')
|
||||||
schedule.every().second.do(torrent.elementum_monitor).tag('screenOn')
|
schedule.every().second.do(torrent.elementum_monitor).tag('screenOn')
|
||||||
|
|
||||||
def onDPMSActivated(self):
|
def onDPMSActivated(self):
|
||||||
|
|||||||
+32
-37
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
# from builtins import str
|
# from builtins import str
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from lib import requests
|
||||||
PY3 = False
|
PY3 = False
|
||||||
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
|
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
|
||||||
from builtins import object
|
from builtins import object
|
||||||
@@ -158,9 +160,9 @@ def addFavourite(item):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
# If it is a movie / series, fill in tmdb information if tmdb_plus_info is not activated (for season / episode it is not necessary because the "second pass" will have already been done)
|
# If it is a movie / series, fill in tmdb information if tmdb_plus_info is not activated (for season / episode it is not necessary because the "second pass" will have already been done)
|
||||||
if (item.contentType == 'movie' or item.contentType == 'tvshow') and not config.get_setting('tmdb_plus_info', default=False):
|
# if (item.contentType == 'movie' or item.contentType == 'tvshow') and not config.get_setting('tmdb_plus_info', default=False):
|
||||||
from core import tmdb
|
# from core import tmdb
|
||||||
tmdb.set_infoLabels(item, True) # get more data in "second pass" (actors, duration, ...)
|
# tmdb.set_infoLabels(item, True) # get more data in "second pass" (actors, duration, ...)
|
||||||
|
|
||||||
# Add date saved
|
# Add date saved
|
||||||
item.date_added = fechahora_actual()
|
item.date_added = fechahora_actual()
|
||||||
@@ -239,14 +241,14 @@ def mostrar_perfil(item):
|
|||||||
|
|
||||||
# If it is not a url, nor does it have the system path, convert the path since it will have been copied from another device.
|
# If it is not a url, nor does it have the system path, convert the path since it will have been copied from another device.
|
||||||
# It would be more optimal if the conversion was done with an import menu, but at the moment it is controlled in run-time.
|
# It would be more optimal if the conversion was done with an import menu, but at the moment it is controlled in run-time.
|
||||||
if it.thumbnail and '://' not in it.thumbnail and not it.thumbnail.startswith(ruta_runtime):
|
# if it.thumbnail and '://' not in it.thumbnail and not it.thumbnail.startswith(ruta_runtime):
|
||||||
ruta, fichero = filetools.split(it.thumbnail)
|
# ruta, fichero = filetools.split(it.thumbnail)
|
||||||
if ruta == '' and fichero == it.thumbnail: # in linux the split with a windows path does not separate correctly
|
# if ruta == '' and fichero == it.thumbnail: # in linux the split with a windows path does not separate correctly
|
||||||
ruta, fichero = filetools.split(it.thumbnail.replace('\\','/'))
|
# ruta, fichero = filetools.split(it.thumbnail.replace('\\','/'))
|
||||||
if 'channels' in ruta and 'thumb' in ruta:
|
# if 'channels' in ruta and 'thumb' in ruta:
|
||||||
it.thumbnail = filetools.join(ruta_runtime, 'resources', 'media', 'channels', 'thumb', fichero)
|
# it.thumbnail = filetools.join(ruta_runtime, 'resources', 'media', 'channels', 'thumb', fichero)
|
||||||
elif 'themes' in ruta and 'default' in ruta:
|
# elif 'themes' in ruta and 'default' in ruta:
|
||||||
it.thumbnail = filetools.join(ruta_runtime, 'resources', 'media', 'themes', 'default', fichero)
|
# it.thumbnail = filetools.join(ruta_runtime, 'resources', 'media', 'themes', 'default', fichero)
|
||||||
|
|
||||||
itemlist.append(it)
|
itemlist.append(it)
|
||||||
|
|
||||||
@@ -425,37 +427,30 @@ def editar_enlace_thumbnail(item):
|
|||||||
# Dialog to choose thumbnail (the channel or predefined icons)
|
# Dialog to choose thumbnail (the channel or predefined icons)
|
||||||
opciones = []
|
opciones = []
|
||||||
ids = []
|
ids = []
|
||||||
try:
|
# try:
|
||||||
from core import channeltools
|
# from core import channeltools
|
||||||
channel_parameters = channeltools.get_channel_parameters(it.channel)
|
# channel_parameters = channeltools.get_channel_parameters(it.channel)
|
||||||
if channel_parameters['thumbnail'] != '':
|
# if channel_parameters['thumbnail'] != '':
|
||||||
nombre = 'Canal %s' % it.channel
|
# nombre = 'Channel %s' % it.channel
|
||||||
if is_kodi17:
|
# if is_kodi17:
|
||||||
it_thumb = xbmcgui.ListItem(nombre)
|
# it_thumb = xbmcgui.ListItem(nombre)
|
||||||
it_thumb.setArt({ 'thumb': channel_parameters['thumbnail'] })
|
# it_thumb.setArt({ 'thumb': channel_parameters['thumbnail'] })
|
||||||
opciones.append(it_thumb)
|
# opciones.append(it_thumb)
|
||||||
else:
|
# else:
|
||||||
opciones.append(nombre)
|
# opciones.append(nombre)
|
||||||
ids.append(channel_parameters['thumbnail'])
|
# ids.append(channel_parameters['thumbnail'])
|
||||||
except:
|
# except:
|
||||||
pass
|
# pass
|
||||||
|
|
||||||
resource_path = os.path.join(config.get_runtime_path(), 'resources', 'media', 'themes', 'default')
|
resource_path = 'https://api.github.com/repos/kodiondemand/media/git/trees/b36040432b9be120f04e986277fd34f09dcdb4db'
|
||||||
for f in sorted(os.listdir(resource_path)):
|
for f in sorted(requests.get(resource_path).json().get('tree', []), key=lambda p: p.get('path')):
|
||||||
if f.startswith('thumb_') and not f.startswith('thumb_intervenido') and f != 'thumb_back.png':
|
nombre = f['path'].replace('thumb_', '').replace('.png', '')
|
||||||
nombre = f.replace('thumb_', '').replace('_', ' ').replace('.png', '')
|
|
||||||
if is_kodi17:
|
|
||||||
it_thumb = xbmcgui.ListItem(nombre)
|
it_thumb = xbmcgui.ListItem(nombre)
|
||||||
it_thumb.setArt({ 'thumb': os.path.join(resource_path, f) })
|
it_thumb.setArt({ 'thumb': support.thumb(nombre)})
|
||||||
opciones.append(it_thumb)
|
opciones.append(it_thumb)
|
||||||
else:
|
ids.append(support.thumb(nombre))
|
||||||
opciones.append(nombre)
|
|
||||||
ids.append(os.path.join(resource_path, f))
|
|
||||||
|
|
||||||
if is_kodi17:
|
|
||||||
ret = xbmcgui.Dialog().select(config.get_localized_string(70554), opciones, useDetails=True)
|
ret = xbmcgui.Dialog().select(config.get_localized_string(70554), opciones, useDetails=True)
|
||||||
else:
|
|
||||||
ret = platformtools.dialog_select(config.get_localized_string(70554), opciones)
|
|
||||||
|
|
||||||
if ret == -1: return False # order cancel
|
if ret == -1: return False # order cancel
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user