Merge branch 'master' of github.com:kodiondemand/addon
This commit is contained in:
@@ -503,7 +503,7 @@ def download_from_server(item):
|
||||
unsupported_servers = ["torrent"]
|
||||
|
||||
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70178) % item.server)
|
||||
channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel])
|
||||
channel = __import__(item.contentChannel, None, None, [item.contentChannel])
|
||||
if hasattr(channel, "play") and not item.play_menu:
|
||||
|
||||
progreso.update(50, config.get_localized_string(70178) % item.server, config.get_localized_string(60003) % item.contentChannel)
|
||||
@@ -570,7 +570,7 @@ def download_from_best_server(item):
|
||||
result = {"downloadStatus": STATUS_CODES.error}
|
||||
|
||||
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70179))
|
||||
channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel])
|
||||
channel = __import__(item.contentChannel, None, None, [item.contentChannel])
|
||||
|
||||
progreso.update(50, config.get_localized_string(70184), config.get_localized_string(70180) % item.contentChannel)
|
||||
|
||||
@@ -648,7 +648,6 @@ def select_server(item):
|
||||
def start_download(item):
|
||||
logger.info(
|
||||
"contentAction: %s | contentChannel: %s | url: %s" % (item.contentAction, item.contentChannel, item.url))
|
||||
|
||||
# Ya tenemnos server, solo falta descargar
|
||||
if item.contentAction == "play":
|
||||
ret = download_from_server(item)
|
||||
@@ -671,13 +670,13 @@ def start_download(item):
|
||||
def get_episodes(item):
|
||||
logger.info("contentAction: %s | contentChannel: %s | contentType: %s" % (
|
||||
item.contentAction, item.contentChannel, item.contentType))
|
||||
|
||||
# El item que pretendemos descargar YA es un episodio
|
||||
|
||||
# El item que pretendemos descargar YA es un episodio
|
||||
if item.contentType == "episode":
|
||||
episodes = [item.clone()]
|
||||
|
||||
# El item es uma serie o temporada
|
||||
elif item.contentType in ["tvshow", "season"]:
|
||||
if item.contentType in ["tvshow", "season"]:
|
||||
# importamos el canal
|
||||
channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel])
|
||||
# Obtenemos el listado de episodios
|
||||
@@ -721,7 +720,6 @@ def get_episodes(item):
|
||||
|
||||
episode.downloadFilename = filetools.validate_path(os.path.join(item.downloadFilename, "%dx%0.2d - %s" % (
|
||||
episode.contentSeason, episode.contentEpisodeNumber, episode.contentTitle.strip())))
|
||||
|
||||
itemlist.append(episode)
|
||||
# Cualquier otro resultado no nos vale, lo ignoramos
|
||||
else:
|
||||
@@ -758,8 +756,8 @@ def save_download(item):
|
||||
|
||||
# Menu contextual
|
||||
if item.from_action and item.from_channel:
|
||||
item.channel = item.from_channel
|
||||
item.action = item.from_action
|
||||
item.channel = str(item.from_channel)
|
||||
item.action = str(item.from_action)
|
||||
del item.from_action
|
||||
del item.from_channel
|
||||
|
||||
@@ -827,6 +825,7 @@ def save_download_tvshow(item):
|
||||
|
||||
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70188))
|
||||
|
||||
item.show = item.fulltitle
|
||||
scraper.find_and_set_infoLabels(item)
|
||||
|
||||
item.downloadFilename = filetools.validate_path("%s [%s]" % (item.contentSerieName, item.contentChannel))
|
||||
|
||||
+13
-8
@@ -6,10 +6,10 @@
|
||||
|
||||
import re
|
||||
import urllib
|
||||
|
||||
from channelselector import get_thumb
|
||||
from core import httptools, scrapertools, tmdb, support
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from platformcode import logger, config
|
||||
|
||||
host = "https://www.comingsoon.it"
|
||||
|
||||
@@ -18,28 +18,33 @@ TIMEOUT_TOTAL = 60
|
||||
|
||||
def mainlist(item):
|
||||
logger.info(" mainlist")
|
||||
itemlist = [Item(channel=item.channel,
|
||||
title=support.typo("IN ONDA ADESSO bold"),
|
||||
itemlist = [Item(channel="search", action='discover_list', title=config.get_localized_string(70309),
|
||||
search_type='list', list_type='movie/now_playing',
|
||||
thumbnail=get_thumb("now_playing.png")),
|
||||
Item(channel="search", action='discover_list', title=config.get_localized_string(70312),
|
||||
search_type='list', list_type='tv/on_the_air', thumbnail=get_thumb("on_the_air.png")),
|
||||
Item(channel=item.channel,
|
||||
title="[Oggi in TV] [B]Adesso in onda[/B]",
|
||||
action="tvoggi",
|
||||
url="%s/filmtv/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="Mattina",
|
||||
title="[Oggi in TV] Mattina",
|
||||
action="tvoggi",
|
||||
url="%s/filmtv/oggi/mattina/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="Pomeriggio",
|
||||
title="[Oggi in TV] Pomeriggio",
|
||||
action="tvoggi",
|
||||
url="%s/filmtv/oggi/pomeriggio/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="Sera",
|
||||
title="[Oggi in TV] Sera",
|
||||
action="tvoggi",
|
||||
url="%s/filmtv/oggi/sera/" % host,
|
||||
thumbnail=item.thumbnail),
|
||||
Item(channel=item.channel,
|
||||
title="Notte",
|
||||
title="[Oggi in TV] Notte",
|
||||
action="tvoggi",
|
||||
url="%s/filmtv/oggi/notte/" % host,
|
||||
thumbnail=item.thumbnail)]
|
||||
|
||||
+8
-21
@@ -29,43 +29,30 @@ def mainlist(item):
|
||||
|
||||
itemlist = []
|
||||
context = [{"title": config.get_localized_string(60412), "action": "setting_channel", "channel": item.channel}]
|
||||
itemlist.append(Item(channel=item.channel, action="sub_menu", title=config.get_localized_string(70305), context=context,
|
||||
itemlist.append(Item(channel=item.channel, action="sub_menu", title="[B]" + config.get_localized_string(70305)+ "[/B]", context=context,
|
||||
thumbnail=get_thumb("search.png")))
|
||||
|
||||
itemlist.append(Item(channel="filmontv", action="mainlist", title=config.get_localized_string(50001),
|
||||
thumbnail=get_thumb("on_the_air.png"), viewmode="thumbnails"))
|
||||
itemlist.append(Item(channel=item.channel, action='genres_menu', title=config.get_localized_string(70306), type='movie',
|
||||
thumbnail=get_thumb("genres.png")))
|
||||
|
||||
itemlist.append (Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70307),
|
||||
context=context, search_type='list', list_type='movie/popular',
|
||||
thumbnail=get_thumb("popular.png")))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70308),
|
||||
context=context, search_type='list', list_type='movie/top_rated',
|
||||
thumbnail=get_thumb("top_rated.png")))
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70309), context=context,
|
||||
search_type='list', list_type='movie/now_playing',
|
||||
thumbnail=get_thumb("now_playing.png")))
|
||||
|
||||
#itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70309), context=context,
|
||||
# search_type='list', list_type='movie/now_playing',
|
||||
# thumbnail=get_thumb("now_playing.png")))
|
||||
itemlist.append(Item(channel=item.channel, action='genres_menu', title=config.get_localized_string(70310), type='tv',
|
||||
thumbnail=get_thumb("genres.png")))
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70311), context=context,
|
||||
search_type='list',list_type='tv/popular', thumbnail=get_thumb("popular.png")))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70312), context=context,
|
||||
search_type='list', list_type='tv/on_the_air', thumbnail=get_thumb("on_the_air.png")))
|
||||
|
||||
|
||||
#itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70312), context=context,
|
||||
# search_type='list', list_type='tv/on_the_air', thumbnail=get_thumb("on_the_air.png")))
|
||||
itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70313), context=context,
|
||||
search_type='list', list_type='tv/top_rated', thumbnail=get_thumb("top_rated.png")))
|
||||
|
||||
itemlist.append(Item(channel="filmontv", action="mainlist", title=config.get_localized_string(50001),
|
||||
thumbnail=get_thumb("on_the_air.png"), viewmode="thumbnails"))
|
||||
|
||||
|
||||
|
||||
|
||||
return itemlist
|
||||
|
||||
Reference in New Issue
Block a user