Rinumerazione all'aggiunta in videoteca
This commit is contained in:
+20
-20
@@ -453,14 +453,14 @@ def scrape(func):
|
||||
if anime:
|
||||
if function == 'episodios' or item.action == 'episodios': autorenumber.renumber(itemlist, item, 'bold')
|
||||
else: autorenumber.renumber(itemlist)
|
||||
if anime and autorenumber.check(item) == False and len(itemlist)>0 and not scrapertools.find_single_match(itemlist[0].title, r'(\d+.\d+)'):
|
||||
pass
|
||||
else:
|
||||
if addVideolibrary and (item.infoLabels["title"] or item.fulltitle):
|
||||
# item.fulltitle = item.infoLabels["title"]
|
||||
videolibrary(itemlist, item, function=function)
|
||||
if function == 'episodios' or function == 'findvideos':
|
||||
download(itemlist, item, function=function)
|
||||
# if anime and autorenumber.check(item) == False and len(itemlist)>0 and not scrapertools.find_single_match(itemlist[0].title, r'(\d+.\d+)'):
|
||||
# pass
|
||||
# else:
|
||||
if addVideolibrary and (item.infoLabels["title"] or item.fulltitle):
|
||||
# item.fulltitle = item.infoLabels["title"]
|
||||
videolibrary(itemlist, item, function=function)
|
||||
if function == 'episodios' or function == 'findvideos':
|
||||
download(itemlist, item, function=function)
|
||||
|
||||
if 'patronMenu' in args and itemlist:
|
||||
itemlist = thumb(itemlist, genre=True)
|
||||
@@ -1008,18 +1008,18 @@ def videolibrary(itemlist, item, typography='', function_level=1, function=''):
|
||||
from channelselector import get_thumb
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title=title,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.fulltitle,
|
||||
contentType=contentType,
|
||||
contentTitle=contentTitle,
|
||||
contentSerieName=contentSerieName,
|
||||
url=item.url,
|
||||
action=action,
|
||||
extra=extra,
|
||||
path=item.path,
|
||||
thumbnail=get_thumb('add_to_videolibrary.png')
|
||||
))
|
||||
title=title,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.fulltitle,
|
||||
contentType=contentType,
|
||||
contentTitle=contentTitle,
|
||||
contentSerieName=contentSerieName,
|
||||
url=item.url,
|
||||
action=action,
|
||||
extra=extra,
|
||||
path=item.path,
|
||||
thumbnail=get_thumb('add_to_videolibrary.png')
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -922,7 +922,7 @@ def add_tvshow(item, channel=None):
|
||||
|
||||
else:
|
||||
# Esta marca es porque el item tiene algo más aparte en el atributo "extra"
|
||||
item.action = item.extra
|
||||
item.action = item.extra if item.extra else item.action
|
||||
if isinstance(item.extra, str) and "###" in item.extra:
|
||||
item.action = item.extra.split("###")[0]
|
||||
item.extra = item.extra.split("###")[1]
|
||||
@@ -951,7 +951,17 @@ def add_tvshow(item, channel=None):
|
||||
# del item.tmdb_stat #Limpiamos el status para que no se grabe en la Videoteca
|
||||
|
||||
# Obtiene el listado de episodios
|
||||
|
||||
itemlist = getattr(channel, item.action)(item)
|
||||
if itemlist and not scrapertools.find_single_match(itemlist[0].title, r'(\d+.\d+)'):
|
||||
from specials.autorenumber import select_type, renumber, check
|
||||
if not check(item):
|
||||
action = item.action
|
||||
select_type(item)
|
||||
item.action = action
|
||||
return add_tvshow(item, channel)
|
||||
else:
|
||||
itemlist = renumber(itemlist)
|
||||
|
||||
global magnet_caching
|
||||
magnet_caching = False
|
||||
|
||||
Reference in New Issue
Block a user