Grantorrent: Novedades 4K

This commit is contained in:
Kingbox
2019-01-15 21:25:08 +01:00
parent e7d092f24c
commit 79f289b283
2 changed files with 34 additions and 0 deletions

View File

@@ -113,6 +113,14 @@
"14",
"15"
]
},
{
"id": "include_in_newest_4k",
"type": "bool",
"label": "Incluir en Novedades - 4K",
"default": true,
"enabled": true,
"visible": true
}
]
}

View File

@@ -1086,3 +1086,29 @@ def search(item, texto):
for line in sys.exc_info():
logger.error("ERROR: %s: SEARCH" % line)
return []
def newest(categoria):
logger.info()
itemlist = []
item = Item()
try:
if categoria == '4k':
item.url = host + "categoria/4k/"
item.extra = "peliculas"
item.channel = channel
item.category_new= 'newest'
itemlist = listado(item)
if ">> Página siguiente" in itemlist[-1].title:
itemlist.pop()
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
except:
import sys
for line in sys.exc_info():
logger.error("{0}".format(line))
return []
return itemlist