Riscrittura del canale altadefinizione01_club.* (#19)
* Altadefinizione01 L
speriamo...io me la cavo!
* eurostreaming
Sostituiscono gli attuali che hanno i seguenti problemi:
1. Non aprono tutte le serie, in quanto nella pagina del sito si deve cliccare su una voce per aprire la lista degli episodi
2. Quando si aggiungono una serie nella videoteca e si hanno episodi in italiano e sottotitolati, vengono aggiunti correttamente i titoli in italiano ma i video sono sottotitolati.
* Update unify.py
Proposta per italianizzare le thumb!
* Add files via upload
* Add files via upload
* Delete altadefinizione01_link.json
ops!
* Delete altadefinizione01_link.py
ariops!
* Add files via upload
aggiunti i server in lista_servers
* Update eurostreaming.py
aggiunto autoplay nella home menu
* Altadefinizione 2
Ci sono problemi con la ricerca dei server. Prende o solo openload o quello e un altro
* Update altadefinizione_2.json
tolta la parte serie tv
* Aggiornamento canale
Tolte le voci su TMDB che indicavano la lingua italiana e fatto pulizia di alcuni commenti
* Delete altadefinizione_2.json
da modificare
* Delete altadefinizione_2.py
da modificare
* Cambio url
* fix vari
tra cui l'inserimento in videoteca dei giusti video: o ita o sub-ita
* Riscrittura canali alla KOD
Modificate alcune voci alla maniera di KOD.
Da ultimare perchè le voci nel menu:
lettera e anno
non danno le giuste icone...
* Fix completo
Riscrittura del canale alla KOD, o almeno in parte!
* Piccola aggiunta alle voci
Per visualizzare le icone su alcune voci del menu
* Riscrittura canale
Riscritto il canale.
Per delle icone del menu vengono inoltre richieste delle modifiche al file channelselector.py
in particolare:
'lucky': ['fortunato'], # se potete inserire la icona anche per questa voce
'channels_musical':['musical'],
'channels_mistery':['mistero', 'giallo'],
'channels_noir':['noir'],
'popular' : ['popolari','popolare', 'più visti'],
'channels_thriller':['thriller'],
'top_rated' : ['fortunato'], #da tocgliere aggiunte la voce lucky o quello che volete
'channels_western':['western'],
* Update altadefinizione01_club.py
commentato:FilterTools
* Update altadefinizione01_link.py
commentato: FilterTools
* Update altadefinizione01_club.py
sistemato un errore
* Add files via upload
Fixato e rifixato.
Dovrebbe essere ok
This commit is contained in:
@@ -71,22 +71,6 @@
|
||||
"Non filtrare",
|
||||
"IT"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "perfil",
|
||||
"type": "list",
|
||||
"label": "profilo dei colori",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Sin color",
|
||||
"Perfil 5",
|
||||
"Perfil 4",
|
||||
"Perfil 3",
|
||||
"Perfil 2",
|
||||
"Perfil 1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- Channel Altadefinizione01C Film -*-
|
||||
# -*- Created for IcarusbyGreko -*-
|
||||
# -*- Riscritto per KOD -*-
|
||||
# -*- By Greko -*-
|
||||
# -*- last change: 3/05/2019
|
||||
# -*- last change: 04/05/2019
|
||||
|
||||
|
||||
from channels import autoplay, support, filtertools
|
||||
from channelselector import get_thumb
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
from core import httptools
|
||||
from core import channeltools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from core import channeltools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
__channel__ = "altadefinizione01_club"
|
||||
@@ -20,23 +20,8 @@ __channel__ = "altadefinizione01_club"
|
||||
#host = "https://www.altadefinizione01.club/" # host da cambiare
|
||||
#host = "https://www.altadefinizione01.team/" #aggiornato al 22 marzo 2019
|
||||
host = "https://www.altadefinizione01.vision/" #aggiornato al 30-04-209
|
||||
# ======== def per utility INIZIO =============================
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
__perfil__ = int(config.get_setting('perfil', __channel__))
|
||||
except:
|
||||
__modo_grafico__ = True
|
||||
__perfil__ = 0
|
||||
|
||||
# Fijar perfil de color
|
||||
perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFFFFD700']]
|
||||
|
||||
if __perfil__ < 3:
|
||||
color1, color2, color3, color4, color5 = perfil[__perfil__]
|
||||
else:
|
||||
color1 = color2 = color3 = color4 = color5 = ""
|
||||
# ======== Funzionalità =============================
|
||||
|
||||
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__)
|
||||
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__)
|
||||
@@ -44,9 +29,9 @@ __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channe
|
||||
headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||
['Referer', host]]
|
||||
|
||||
#parameters = channeltools.get_channel_parameters(__channel__)
|
||||
#fanart_host = parameters['fanart']
|
||||
#thumbnail_host = parameters['thumbnail']
|
||||
parameters = channeltools.get_channel_parameters(__channel__)
|
||||
fanart_host = parameters['fanart']
|
||||
thumbnail_host = parameters['thumbnail']
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
@@ -62,57 +47,19 @@ def mainlist(item):
|
||||
:param item:
|
||||
:return: itemlist []
|
||||
"""
|
||||
logger.info("%s mainlist log: %s" % (__channel__, item))
|
||||
logger.info("%s mainlist log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
title = ''
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = [
|
||||
# new upload
|
||||
Item(channel=__channel__, title="Ultimi Arrivi", action="peliculas",
|
||||
url="%s" % host, text_color=color4, extra="film",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x to Cinema
|
||||
Item(channel=__channel__, title="Al Cinema", action="peliculas",
|
||||
url="%scinema/" % host, text_color=color4, extra="film",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
# x Sub-ita
|
||||
Item(channel=__channel__, title="Sottotitolati", action="peliculas",
|
||||
url="%ssub-ita/" % host, text_color=color4, extra="film",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
# x Category
|
||||
Item(channel=__channel__, title="Generi", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="genres",
|
||||
viewcontent='movies',
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
# x year
|
||||
Item(channel=__channel__, title="Anno", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="year",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
# x lettera
|
||||
Item(channel=__channel__, title="Lettera", action="categorie",
|
||||
url="%scatalog/a/" % host, text_color=color4, extra="orderalf",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
# Search
|
||||
Item(channel=__channel__, title="Cerca Film...", action="search",
|
||||
text_color=color4, extra="",
|
||||
infoLabels={'plot': item.category},
|
||||
thumbnail = get_thumb(title, auto = True)
|
||||
),
|
||||
]
|
||||
|
||||
# Menu Principale
|
||||
support.menu(itemlist, 'Film Ultimi Arrivi bold', 'peliculas', host, args='pellicola')
|
||||
support.menu(itemlist, 'Genere', 'categorie', host, args='genres')
|
||||
support.menu(itemlist, 'Per anno submenu', 'categorie', host, args=['Film per Anno','years'])
|
||||
support.menu(itemlist, 'Per lettera', 'categorie', host+'catalog/a/', args=['Film per Lettera','orderalf'])
|
||||
support.menu(itemlist, 'Al Cinema bold', 'peliculas', host+'cinema/', args='pellicola')
|
||||
support.menu(itemlist, 'Sub-ITA bold', 'peliculas', host+'sub-ita/', args='pellicola')
|
||||
support.menu(itemlist, 'Cerca film submenu', 'search', host)
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
@@ -127,12 +74,12 @@ def peliculas(item):
|
||||
# scarico la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
# da qui fare le opportuni modifiche
|
||||
if item.extra != 'orderalf':
|
||||
if item.extra == 'film' or item.extra == 'year':
|
||||
if item.args != 'orderalf':
|
||||
if item.args == 'pellicola' or item.args == 'years':
|
||||
bloque = scrapertools.find_single_match(data, '<div class="cover boxcaption">(.*?)<div id="right_bar">')
|
||||
elif item.extra == "search":
|
||||
elif item.args == "search":
|
||||
bloque = scrapertools.find_single_match(data, '<div class="cover boxcaption">(.*?)</a>')
|
||||
else: #item.extra == 'cat':
|
||||
else:
|
||||
bloque = scrapertools.find_single_match(data, '<div class="cover boxcaption">(.*?)<div class="page_nav">')
|
||||
patron = '<h2>.<a href="(.*?)".*?src="(.*?)".*?class="trdublaj">(.*?)<div class="ml-item-hiden".*?class="h4">(.*?)<.*?label">(.*?)</span'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
@@ -144,7 +91,7 @@ def peliculas(item):
|
||||
scrapedlang = 'ITA'
|
||||
itemlist.append(Item(
|
||||
channel=item.channel,
|
||||
action="findvideos_film",
|
||||
action="findvideos",
|
||||
contentTitle=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
@@ -152,30 +99,16 @@ def peliculas(item):
|
||||
contenType="movie",
|
||||
thumbnail=host+scrapedimg,
|
||||
title= "%s [%s]" % (scrapedtitle, scrapedlang),
|
||||
text_color=color5,
|
||||
language=scrapedlang
|
||||
))
|
||||
|
||||
# se il sito permette l'estrazione dell'anno del film aggiungere la riga seguente
|
||||
# poichè il sito ha l'anno del film con TMDB la ricerca titolo-anno è esatta quindi inutile fare lo scrap delle locandine
|
||||
# e della trama dal sito che a volte toppano
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazione
|
||||
next_page = scrapertools.find_single_match(data, "<link rel='next' href='(.*?)' />")
|
||||
if not next_page:
|
||||
next_page = scrapertools.find_single_match(data, '<span>\d</span> <a href="([^"]+)">')
|
||||
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="peliculas",
|
||||
title=config.get_localized_string(30992),
|
||||
url=next_page,
|
||||
extra=item.extra,
|
||||
text_color=color4,
|
||||
#thumbnail="http://icons.iconarchive.com/icons/ahmadhania/spherical/128/forward-icon.png"
|
||||
thumbnail= get_thumb('nextpage', auto = True)
|
||||
))
|
||||
|
||||
support.nextPage(itemlist,item,data,'<span>[^<]+</span>[^<]+<a href="(.*?)">')
|
||||
|
||||
return itemlist
|
||||
|
||||
# =========== def pagina categorie ======================================
|
||||
@@ -187,13 +120,13 @@ def categorie(item):
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# da qui fare le opportuni modifiche
|
||||
if item.extra == 'genres':
|
||||
if item.args == 'genres':
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="kategori_list">(.*?)</ul>')
|
||||
patron = '<li><a href="/(.*?)">(.*?)</a>'
|
||||
elif item.extra == 'year':
|
||||
elif item.args[1] == 'years':
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="anno_list">(.*?)</ul>')
|
||||
patron = '<li><a href="/(.*?)">(.*?)</a>'
|
||||
elif item.extra == 'orderalf':
|
||||
elif item.args[1] == 'orderalf':
|
||||
bloque = scrapertools.find_single_match(data, '<div class="movies-letter">(.*)<div class="clearfix">')
|
||||
patron = '<a title=.*?href="(.*?)"><span>(.*?)</span>'
|
||||
|
||||
@@ -206,19 +139,15 @@ def categorie(item):
|
||||
else:
|
||||
scrapurl = host+scrapurl
|
||||
|
||||
if item.extra != 'orderalf':
|
||||
action = "peliculas"
|
||||
else:
|
||||
action = 'orderalf'
|
||||
if item.args[1] != 'orderalf': action = "peliculas"
|
||||
else: action = 'orderalf'
|
||||
itemlist.append(Item(
|
||||
channel=item.channel,
|
||||
action= action,
|
||||
title = scraptitle,
|
||||
url= scrapurl,
|
||||
text_color=color4,
|
||||
thumbnail = get_thumb(scraptitle, auto = True),
|
||||
extra = item.extra,
|
||||
#Folder = True,
|
||||
))
|
||||
|
||||
return itemlist
|
||||
@@ -248,9 +177,7 @@ def orderalf(item):
|
||||
infoLabels={'year': scrapedyear},
|
||||
contenType="movie",
|
||||
thumbnail=host+scrapedimg,
|
||||
#title=scrapedtitle + ' %s' % scrapedlang,
|
||||
title = "%s [%s]" % (scrapedtitle, scrapedlang),
|
||||
text_color=color5,
|
||||
language=scrapedlang,
|
||||
context="buscar_trailer"
|
||||
))
|
||||
@@ -259,31 +186,17 @@ def orderalf(item):
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazione
|
||||
next_page = scrapertools.find_single_match(data, "<link rel='next' href='(.*?)' />")
|
||||
if not next_page:
|
||||
next_page = scrapertools.find_single_match(data, '<div class=\'wp-pagenavi\'>.*?href="(.*?)">')
|
||||
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="orderalf",
|
||||
title=config.get_localized_string(30992),
|
||||
url=next_page,
|
||||
extra=item.extra,
|
||||
text_color=color4,
|
||||
thumbnail= get_thumb('nextpage', auto = True)
|
||||
))
|
||||
support.nextPage(itemlist,item,data,'<span>[^<]+</span>[^<]+<a href="(.*?)">')
|
||||
|
||||
return itemlist
|
||||
|
||||
# =========== def pagina del film con i server per verderlo =============
|
||||
|
||||
def findvideos_film(item):
|
||||
def findvideos(item):
|
||||
logger.info("%s mainlist findvideos_film log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
|
||||
# scarico la pagina
|
||||
#data = scrapertools.cache_page(item.url)
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
# da qui fare le opportuni modifiche
|
||||
patron = '<a href="#" data-link="(.*?)">'
|
||||
@@ -296,12 +209,11 @@ def findvideos_film(item):
|
||||
|
||||
for videoitem in itemlist:
|
||||
logger.info("Videoitemlist2: %s" % videoitem)
|
||||
videoitem.title = "%s [%s]" % (item.contentTitle, videoitem.title)#"[%s] %s" % (videoitem.server, item.title) #"[%s]" % (videoitem.title)
|
||||
videoitem.title = "%s [%s]" % (item.contentTitle, videoitem.title)
|
||||
videoitem.show = item.show
|
||||
videoitem.contentTitle = item.contentTitle
|
||||
videoitem.contentType = item.contentType
|
||||
videoitem.channel = item.channel
|
||||
videoitem.text_color = color5
|
||||
videoitem.year = item.infoLabels['year']
|
||||
videoitem.infoLabels['plot'] = item.infoLabels['plot']
|
||||
except AttributeError:
|
||||
@@ -312,19 +224,14 @@ def findvideos_film(item):
|
||||
itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
|
||||
|
||||
# Requerido para FilterTools
|
||||
# itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||
if item.extra != "library":
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Aggiungi alla Videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url,
|
||||
thumbnail= get_thumb('videolibrary', auto = True),
|
||||
contentTitle=item.contentTitle, infoLabels = item.infoLabels
|
||||
))
|
||||
# Aggiunge alla videoteca
|
||||
if item.extra != 'findvideos' and item.extra != "library" and config.get_videolibrary_support() and len(itemlist) != 0 :
|
||||
support.videolibrary(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -335,10 +242,10 @@ def search(item, text):
|
||||
itemlist = []
|
||||
text = text.replace(" ", "+")
|
||||
item.url = host+"index.php?do=search&story=%s&subaction=search" % (text)
|
||||
item.extra = "search"
|
||||
#item.extra = "search"
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Se captura la excepciÛn, para no interrumpir al buscador global si un canal falla
|
||||
# Cattura la eccezione così non interrompe la ricerca globle se il canale si rompe!
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -351,7 +258,6 @@ def newest(categoria):
|
||||
logger.info("%s mainlist newest log: %s %s %s" % (__channel__, categoria))
|
||||
itemlist = []
|
||||
item = Item()
|
||||
#item.extra = 'film'
|
||||
try:
|
||||
if categoria == "film":
|
||||
item.url = host
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
# -*- Creato per Alfa-addon -*-
|
||||
# -*- e adattato for KOD -*-
|
||||
# -*- By Greko -*-
|
||||
# -*- last change: 3/05/2019
|
||||
# -*- last change: 04/05/2019
|
||||
|
||||
|
||||
from channels import autoplay, support, filtertools
|
||||
from channelselector import get_thumb
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
from core import httptools
|
||||
from core import channeltools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from core import channeltools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
__channel__ = "altadefinizione01_link"
|
||||
@@ -24,23 +24,7 @@ __channel__ = "altadefinizione01_link"
|
||||
#host = "http://altadefinizione01.date/" #aggiornato al 3 maggio 2019
|
||||
host = "https://altadefinizione01.voto/" #aggiornato al 3 maggio 2019
|
||||
|
||||
# ======== def per utility INIZIO =============================
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
__perfil__ = int(config.get_setting('perfil', __channel__))
|
||||
except:
|
||||
__modo_grafico__ = True
|
||||
__perfil__ = 0
|
||||
|
||||
# Fijar perfil de color
|
||||
perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFFFFD700'],
|
||||
['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFFFFD700']]
|
||||
|
||||
if __perfil__ < 3:
|
||||
color1, color2, color3, color4, color5 = perfil[__perfil__]
|
||||
else:
|
||||
color1 = color2 = color3 = color4 = color5 = ""
|
||||
# ======== def per utility INIZIO ============================
|
||||
|
||||
__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__)
|
||||
__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__)
|
||||
@@ -48,7 +32,6 @@ __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channe
|
||||
headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||
['Referer', host]]#,['Accept-Language','it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3']]
|
||||
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['openload', 'streamcherry','rapidvideo', 'streamango', 'supervideo']
|
||||
@@ -64,57 +47,18 @@ def mainlist(item):
|
||||
"""
|
||||
logger.info("%s mainlist log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
title = ''
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = [
|
||||
# new upload
|
||||
Item(channel=__channel__, title="Ultimi Arrivi", action="peliculas",
|
||||
url="%s" % host, text_color=color4, extra="film", # color4 = red
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x to Cinema
|
||||
Item(channel=__channel__, title="Al Cinema", action="peliculas",
|
||||
url="%sfilm-del-cinema" % host, text_color=color4, extra="",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# Popolari
|
||||
Item(channel=__channel__, title="Popolari", action="peliculas",
|
||||
url="%spiu-visti.html" % host, text_color=color4, extra="",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x Sub-ita
|
||||
Item(channel=__channel__, title="Sottotitolati", action="peliculas",
|
||||
url="%sfilm-sub-ita/" % host, text_color=color4, extra="",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x mi sento fortunato - Prende solo film con player a pagamento
|
||||
Item(channel=__channel__, title="Mi Sento Fortunato", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="lucky",
|
||||
thumbnail=""),
|
||||
# x Category
|
||||
Item(channel=__channel__, title="Generi", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="genres",
|
||||
viewcontent='movies',
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x year
|
||||
Item(channel=__channel__, title="Anno", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="year",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# x quality
|
||||
Item(channel=__channel__, title="Qualità", action="categorie",
|
||||
url="%s" % host, text_color=color4, extra="quality",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
# Search
|
||||
Item(channel=__channel__, title="Cerca Film...", action="search",
|
||||
text_color=color4, extra="",
|
||||
thumbnail=get_thumb(title, auto = True)
|
||||
),
|
||||
]
|
||||
# Menu Principale
|
||||
support.menu(itemlist, 'Film Ultimi Arrivi bold', 'peliculas', host)#, args='film')
|
||||
support.menu(itemlist, 'Genere', 'categorie', host, args=['','genres'])
|
||||
support.menu(itemlist, 'Per anno submenu', 'categorie', host, args=['Film per Anno','years'])
|
||||
support.menu(itemlist, 'Per qualità submenu', 'categorie', host, args=['Film per qualità','quality'])
|
||||
support.menu(itemlist, 'Al Cinema bold', 'peliculas', host+'film-del-cinema')
|
||||
support.menu(itemlist, 'Popolari bold', 'categorie', host+'piu-visti.html', args=['popular',''])
|
||||
support.menu(itemlist, 'Mi sento fortunato bold', 'categorie', host, args=['fortunato','lucky'])
|
||||
support.menu(itemlist, 'Sub-ITA bold', 'peliculas', host+'film-sub-ita/')
|
||||
support.menu(itemlist, 'Cerca film submenu', 'search', host)
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
@@ -127,7 +71,6 @@ def peliculas(item):
|
||||
itemlist = []
|
||||
# scarico la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# da qui fare le opportuni modifiche
|
||||
patron = 'class="innerImage">.*?href="([^"]+)".*?src="([^"]+)".*?'\
|
||||
'class="ml-item-title">([^"]+)</.*?class="ml-item-label">'\
|
||||
@@ -141,7 +84,7 @@ def peliculas(item):
|
||||
scrapedlang = 'Sub-Ita'
|
||||
itemlist.append(Item(
|
||||
channel=item.channel,
|
||||
action="findvideos_film",
|
||||
action="findvideos",
|
||||
contentTitle=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
@@ -149,29 +92,16 @@ def peliculas(item):
|
||||
contenType="movie",
|
||||
thumbnail=scrapedimg,
|
||||
title="%s [%s]" % (scrapedtitle, scrapedlang),
|
||||
text_color=color5,
|
||||
language=scrapedlang,
|
||||
context="buscar_trailer"
|
||||
))
|
||||
|
||||
# poiché c'è l'anno negli item prendiamo le info direttamente da tmdb, anche se a volte può non esserci l'informazione
|
||||
# poichè il sito ha l'anno del film con TMDB la ricerca titolo-anno è esatta quindi inutile fare lo scrap delle locandine
|
||||
# e della trama dal sito che a volte toppano
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazione
|
||||
next_page = scrapertools.find_single_match(data, "<link rel='next' href='(.*?)' />")
|
||||
if not next_page:
|
||||
next_page = scrapertools.find_single_match(data, '<span>\d</span> <a href="([^"]+)">')
|
||||
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="peliculas",
|
||||
title=config.get_localized_string(30992),
|
||||
url=next_page,
|
||||
extra=item.extra,
|
||||
text_color=color4,
|
||||
thumbnail= get_thumb('nextpage', auto = True)
|
||||
))
|
||||
support.nextPage(itemlist,item,data,'<span>\d</span> <a href="([^"]+)">')
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -184,24 +114,24 @@ def categorie(item):
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# da qui fare le opportuni modifiche
|
||||
if item.extra == 'genres':
|
||||
if item.args[1] == 'genres':
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="listSubCat" id="Film">(.*?)</ul>')
|
||||
elif item.extra == 'year':
|
||||
elif item.args[1] == 'years':
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="listSubCat" id="Anno">(.*?)</ul>')
|
||||
elif item.extra == 'quality':
|
||||
elif item.args[1] == 'quality':
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="listSubCat" id="Qualita">(.*?)</ul>')
|
||||
elif item.extra == 'lucky': # sono i titoli random nella pagina, alcuni rimandano solo a server a pagamento
|
||||
elif item.args[1] == 'lucky': # sono i titoli random nella pagina, alcuni rimandano solo a server a pagamento
|
||||
bloque = scrapertools.find_single_match(data, 'FILM RANDOM.*?class="listSubCat">(.*?)</ul>')
|
||||
patron = '<li><a href="/(.*?)">(.*?)<'
|
||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||
|
||||
if item.extra == 'lucky':
|
||||
if item.args[1] == 'lucky':
|
||||
bloque = scrapertools.find_single_match(data, 'FILM RANDOM.*?class="listSubCat">(.*?)</ul>')
|
||||
patron = '<li><a href="(.*?)">(.*?)<'
|
||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||
|
||||
for scrapurl, scraptitle in sorted(matches):
|
||||
if item.extra != 'lucky':
|
||||
if item.args[1] != 'lucky':
|
||||
url = host+scrapurl
|
||||
action="peliculas"
|
||||
else:
|
||||
@@ -212,8 +142,6 @@ def categorie(item):
|
||||
action=action,
|
||||
title = scraptitle,
|
||||
url=url,
|
||||
#extra = '',
|
||||
text_color=color4,
|
||||
thumbnail=get_thumb(scraptitle, auto = True),
|
||||
Folder = True,
|
||||
))
|
||||
@@ -224,7 +152,7 @@ def categorie(item):
|
||||
# =========== def pagina del film con i server per verderlo =============
|
||||
# da sistemare che ne da solo 1 come risultato
|
||||
|
||||
def findvideos_film(item):
|
||||
def findvideos(item):
|
||||
logger.info("%s mainlist findvideos_film log: %s" % (__channel__, item))
|
||||
itemlist = []
|
||||
# scarico la pagina
|
||||
@@ -246,7 +174,6 @@ def findvideos_film(item):
|
||||
videoitem.contentTitle = item.contentTitle
|
||||
videoitem.contentType = item.contentType
|
||||
videoitem.channel = item.channel
|
||||
videoitem.text_color = color5
|
||||
videoitem.year = item.infoLabels['year']
|
||||
videoitem.infoLabels['plot'] = item.infoLabels['plot']
|
||||
except AttributeError:
|
||||
@@ -257,19 +184,14 @@ def findvideos_film(item):
|
||||
itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
|
||||
|
||||
# Requerido para FilterTools
|
||||
# itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||
if item.extra != "library":
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Aggiungi alla Videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url,
|
||||
thumbnail= get_thumb('videolibrary', auto = True),
|
||||
contentTitle=item.contentTitle, infoLabels = item.infoLabels
|
||||
))
|
||||
# Aggiunge alla videoteca
|
||||
if item.extra != 'findvideos' and item.extra != "library" and config.get_videolibrary_support() and len(itemlist) != 0 :
|
||||
support.videolibrary(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
+4
-6
@@ -91,11 +91,6 @@ def getchanneltypes(view="thumb_"):
|
||||
channel_type=channel_type, viewmode="thumbnails",
|
||||
thumbnail=get_thumb("channels_%s.png" % channel_type, view)))
|
||||
|
||||
itemlist.append(Item(title='Oggi in TV', channel="filmontv", action="mainlist", view=view,
|
||||
category=title, channel_type="all", thumbnail=get_thumb("on_the_air.png", view),
|
||||
viewmode="thumbnails"))
|
||||
|
||||
|
||||
itemlist.append(Item(title=config.get_localized_string(70685), channel="community", action="mainlist", view=view,
|
||||
category=title, channel_type="all", thumbnail=get_thumb("channels_community.png", view),
|
||||
viewmode="thumbnails"))
|
||||
@@ -337,10 +332,13 @@ def thumb(itemlist=[]):
|
||||
'channels_grotesque':['grottesco'],
|
||||
'channels_war':['guerra'],
|
||||
'horror':['horror'],
|
||||
'lucky': ['fortunato'], # se potete inserire la icona anche per questa voce
|
||||
'channels_musical':['musical'],
|
||||
'channels_mistery':['mistero', 'giallo'],
|
||||
'channels_noir':['noir'],
|
||||
'popular' : ['popolari','popolare', 'più visti'],
|
||||
'channels_thriller':['thriller'],
|
||||
'top_rated' : ['fortunato'], #da tocgliere aggiunte la voce lucky o quello che volete
|
||||
'channels_western':['western'],
|
||||
'channels_vos':['sub','sub-ita'],
|
||||
'channels_romance':['romantico','sentimentale'],
|
||||
@@ -383,4 +381,4 @@ def thumb(itemlist=[]):
|
||||
if item.args: item.title = item.title.replace(' || ' + str(item.args), '')
|
||||
return itemlist
|
||||
else:
|
||||
return get_thumb('next.png')
|
||||
return get_thumb('next.png')
|
||||
|
||||
Reference in New Issue
Block a user