pelisplusco: add videoteca
This commit is contained in:
@@ -103,7 +103,7 @@ def sub_search(item):
|
||||
title = dict["title"] + " (" + dict["release_year"] + ")",
|
||||
url = host + dict["slug"]
|
||||
))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
tmdb.set_infoLabels(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -278,6 +278,7 @@ def seasons(item):
|
||||
for title in matches:
|
||||
season = title.replace('Temporada ','')
|
||||
infoLabels['season'] = season
|
||||
title = 'Temporada %s' % season.lstrip('0')
|
||||
itemlist.append(Item(
|
||||
channel=item.channel,
|
||||
title=title,
|
||||
@@ -289,7 +290,23 @@ def seasons(item):
|
||||
))
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist[::-1]
|
||||
itemlist = itemlist[::-1]
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title='[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]', url=item.url,
|
||||
action="add_serie_to_library", extra="episodios", contentSerieName=item.contentSerieName))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
templist = seasons(item)
|
||||
for tempitem in templist:
|
||||
itemlist += season_episodes(tempitem)
|
||||
|
||||
return itemlist
|
||||
|
||||
def season_episodes(item):
|
||||
logger.info()
|
||||
@@ -304,8 +321,9 @@ def season_episodes(item):
|
||||
for url, episode in matches:
|
||||
episodenumber = re.sub('C.* ','',episode)
|
||||
infoLabels['episode'] = episodenumber
|
||||
title = '%sx%s - %s' % (infoLabels['season'], episodenumber, episode)
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
title= episode,
|
||||
title= title,
|
||||
url = host+url,
|
||||
action = 'findvideos',
|
||||
infoLabels=infoLabels,
|
||||
@@ -366,15 +384,18 @@ def findvideos(item):
|
||||
for language in matches:
|
||||
video_list.extend(get_links_by_language(item, language))
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
|
||||
url=item.url,
|
||||
action="add_pelicula_to_library",
|
||||
extra="findvideos",
|
||||
contentTitle=item.contentTitle
|
||||
))
|
||||
video_list = servertools.get_servers_itemlist(video_list, lambda i: i.title % (i.server.capitalize(), i.language,i.quality) )
|
||||
video_list = servertools.get_servers_itemlist(video_list, lambda i: i.title % (i.server.capitalize(), i.language,
|
||||
i.quality) )
|
||||
if item.contentType != 'episode':
|
||||
if config.get_videolibrary_support() and len(video_list) > 0 and item.extra != 'findvideos':
|
||||
video_list.append(
|
||||
Item(channel=item.channel,
|
||||
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
|
||||
url=item.url,
|
||||
action="add_pelicula_to_library",
|
||||
extra="findvideos",
|
||||
contentTitle=item.contentTitle
|
||||
))
|
||||
|
||||
return video_list
|
||||
|
||||
|
||||
Reference in New Issue
Block a user