Merge pull request #355 from lopezvg/master
Quasar: Marcado automático de vídeos vistos
This commit is contained in:
@@ -98,7 +98,10 @@ def mainlist(item):
|
|||||||
|
|
||||||
def settingCanal(item):
|
def settingCanal(item):
|
||||||
from platformcode import platformtools
|
from platformcode import platformtools
|
||||||
return platformtools.show_channel_settings()
|
platformtools.show_channel_settings()
|
||||||
|
platformtools.itemlist_refresh()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def submenu(item):
|
def submenu(item):
|
||||||
|
|||||||
@@ -199,6 +199,9 @@ def post_tmdb_listado(item, itemlist):
|
|||||||
title = item_local.title
|
title = item_local.title
|
||||||
#logger.debug(item_local)
|
#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
|
if item_local.contentSeason_save: #Restauramos el num. de Temporada
|
||||||
item_local.contentSeason = item_local.contentSeason_save
|
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)
|
title_gen = '%s: %s' % (item.category.capitalize(), title_gen)
|
||||||
|
|
||||||
#Pintamos el pseudo-título con toda la información disponible del vídeo
|
#Pintamos el pseudo-título con toda la información disponible del vídeo
|
||||||
item.action = ""
|
itemlist.append(item.clone(action="", server = "", title=title_gen)) #Título con todos los datos del vídeo
|
||||||
item.server = ""
|
|
||||||
itemlist.append(item.clone(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)
|
#agregamos la opción de Añadir a Videoteca para péliculas (no series)
|
||||||
if item.contentType == 'movie' and item.contentChannel != "videolibrary":
|
if item.contentType == 'movie' and item.contentChannel != "videolibrary":
|
||||||
|
|||||||
@@ -1049,6 +1049,21 @@ def play_torrent(item, xlistitem, mediaurl):
|
|||||||
mediaurl = urllib.quote_plus(item.url)
|
mediaurl = urllib.quote_plus(item.url)
|
||||||
xbmc.executebuiltin("PlayMedia(" + torrent_options[seleccion][1] % mediaurl + ")")
|
xbmc.executebuiltin("PlayMedia(" + torrent_options[seleccion][1] % mediaurl + ")")
|
||||||
|
|
||||||
|
if "quasar" in torrent_options[seleccion][1]: #Seleccionamos que clientes torrent soportamos
|
||||||
|
if item.strm_path: #Sólo si es de Videoteca
|
||||||
|
import time
|
||||||
|
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 is_playing(): #Ha terminado de bufferar o ha cancelado
|
||||||
|
from platformcode import xbmc_videolibrary
|
||||||
|
xbmc_videolibrary.mark_auto_as_watched(item) #Marcamos como visto al terminar
|
||||||
|
logger.debug("Llamado el marcado")
|
||||||
|
else:
|
||||||
|
logger.debug("Video cancelado o timeout")
|
||||||
|
|
||||||
if seleccion == 1:
|
if seleccion == 1:
|
||||||
from platformcode import mct
|
from platformcode import mct
|
||||||
mct.play(mediaurl, xlistitem, subtitle=item.subtitle, item=item)
|
mct.play(mediaurl, xlistitem, subtitle=item.subtitle, item=item)
|
||||||
|
|||||||
Reference in New Issue
Block a user