From 9b6bb89fccadf4c527fdfe49de7e3af87d3394c1 Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Mon, 3 Jun 2019 19:02:18 +0200 Subject: [PATCH 1/4] def videolibrary fix --- core/support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/support.py b/core/support.py index b0ce3810..4e54c898 100644 --- a/core/support.py +++ b/core/support.py @@ -489,7 +489,7 @@ def videolibrary(itemlist, item, typography='', function_level=1): # Function_level is useful if the function is called by another function. # If the call is direct, leave it blank - if item.contentType != 'episode': + if item.contentType == 'movie': action = 'add_pelicula_to_library' extra = 'findvideos' contentType = 'movie' From 9b0dc67001e9be318528584d876d6fed12063ee1 Mon Sep 17 00:00:00 2001 From: Alhaziel <46535975+lozioangie@users.noreply.github.com> Date: Mon, 3 Jun 2019 23:34:13 +0200 Subject: [PATCH 2/4] Fix Animeworld EPisode > 50 --- channels/animeworld.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/channels/animeworld.py b/channels/animeworld.py index 94b10340..8272fbe3 100644 --- a/channels/animeworld.py +++ b/channels/animeworld.py @@ -258,7 +258,7 @@ def episodios(item): log() itemlist = [] - data = httptools.downloadpage(item.url).data.replace('\n', '') + data = httptools.downloadpage(item.url, headers=headers).data.replace('\n', '') block1 = scrapertoolsV2.find_single_match(data, r'
(.*?)
') @@ -301,18 +301,17 @@ def findvideos(item): data = item.extra['data'] episode = item.extra['episode'] else: - data = httptools.downloadpage(item.url,headers=headers).data - + data = httptools.downloadpage(item.url, headers=headers).data block = scrapertoolsV2.find_single_match(data,r'data-target="\.widget\.servers.*?>(.*?)
') servers = scrapertoolsV2.find_multiple_matches(block,r'class="tab.*?data-name="([0-9]+)">([^<]+)(.*?)') - id = scrapertoolsV2.find_single_match(block,r'(.*?)')) + id = scrapertoolsV2.find_single_match(data,r' Date: Tue, 4 Jun 2019 12:45:20 +0200 Subject: [PATCH 3/4] Now on TV -> Now on Air --- resources/language/English/strings.po | 2 +- resources/language/Italian/strings.po | 8 ++++---- specials/filmontv.py | 21 +++++++++++-------- specials/search.py | 29 ++++++++------------------- 4 files changed, 26 insertions(+), 34 deletions(-) diff --git a/resources/language/English/strings.po b/resources/language/English/strings.po index 87e50af6..7886c8c6 100644 --- a/resources/language/English/strings.po +++ b/resources/language/English/strings.po @@ -378,7 +378,7 @@ msgid "Sagas" msgstr "" msgctxt "#50001" -msgid "Today on TV" +msgid "On Air" msgstr "" msgctxt "#50002" diff --git a/resources/language/Italian/strings.po b/resources/language/Italian/strings.po index 57bc269b..08f4c07c 100644 --- a/resources/language/Italian/strings.po +++ b/resources/language/Italian/strings.po @@ -378,8 +378,8 @@ msgid "Sagas" msgstr "Saghe" msgctxt "#50001" -msgid "Today on TV" -msgstr "Oggi in TV" +msgid "On Air" +msgstr "Adesso in onda" msgctxt "#50002" msgid "Latest News" @@ -3935,7 +3935,7 @@ msgstr "Film più valutati" msgctxt "#70309" msgid "Movies Now in Theatres " -msgstr "Film ora in sala" +msgstr "[Film] Ora in sala" msgctxt "#70310" msgid "Series by Genre" @@ -3947,7 +3947,7 @@ msgstr "Serie più popolari" msgctxt "#70312" msgid "Series in progress" -msgstr "Serie in uscita" +msgstr "[Serie TV] In corso" msgctxt "#70313" msgid "Top rated Series" diff --git a/specials/filmontv.py b/specials/filmontv.py index 2674d946..ccb3981a 100644 --- a/specials/filmontv.py +++ b/specials/filmontv.py @@ -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)] diff --git a/specials/search.py b/specials/search.py index 024642b0..796bf551 100644 --- a/specials/search.py +++ b/specials/search.py @@ -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 From eca5fa4480e7cd78eabbedc73826329ba8e2175a Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Tue, 4 Jun 2019 21:16:05 +0200 Subject: [PATCH 4/4] Fix for series download (some problem with scrape) --- channels/cineblog01.py | 21 ++++++++-------- channels/filmpertutti.py | 14 +++++------ channels/ilgeniodellostreaming.py | 18 +++++++------- channels/seriehd.py | 4 ++-- core/support.py | 10 +++----- platformcode/platformtools.py | 40 ++++++++++++++++--------------- specials/downloads.py | 17 +++++++------ 7 files changed, 60 insertions(+), 64 deletions(-) diff --git a/channels/cineblog01.py b/channels/cineblog01.py index 4a1c9871..208c2c87 100644 --- a/channels/cineblog01.py +++ b/channels/cineblog01.py @@ -51,12 +51,12 @@ def mainlist(item): support.menu(itemlist, 'Per anno submenu', 'menu', host, args="Film per Anno") support.menu(itemlist, 'Cerca film... submenu', 'search', host, args='film') - support.menu(itemlist, 'Serie TV bold', 'peliculas', host + '/serietv/', contentType='episode') - support.menu(itemlist, 'Aggiornamenti serie tv', 'last', host + '/serietv/aggiornamento-quotidiano-serie-tv/', contentType='episode') - support.menu(itemlist, 'Per Lettera submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Lettera") - support.menu(itemlist, 'Per Genere submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Genere") - support.menu(itemlist, 'Per anno submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Anno") - support.menu(itemlist, 'Cerca serie... submenu', 'search', host + '/serietv/', contentType='episode', args='serie') + support.menu(itemlist, 'Serie TV bold', 'peliculas', host + '/serietv/', contentType='tvshow') + support.menu(itemlist, 'Aggiornamenti serie tv', 'last', host + '/serietv/aggiornamento-quotidiano-serie-tv/', contentType='tvshow') + support.menu(itemlist, 'Per Lettera submenu', 'menu', host + '/serietv/', contentType='tvshow', args="Serie-Tv per Lettera") + support.menu(itemlist, 'Per Genere submenu', 'menu', host + '/serietv/', contentType='tvshow', args="Serie-Tv per Genere") + support.menu(itemlist, 'Per anno submenu', 'menu', host + '/serietv/', contentType='tvshow', args="Serie-Tv per Anno") + support.menu(itemlist, 'Cerca serie... submenu', 'search', host + '/serietv/', contentType='tvshow', args='serie') autoplay.show_option(item.channel, itemlist) @@ -119,7 +119,7 @@ def last(item): infoLabels = {} quality = '' - if item.contentType == 'episode': + if item.contentType == 'tvshow': matches = support.match(item, r']+)".*?>([^(:(|[)]+)([^<]+)<\/a>', '
Film per Genere[/B]', 'genre', host, 'episode') + support.menu(itemlist, '[B] > Film per Genere[/B]', 'genre', host, 'tvshow') support.menu(itemlist, '[COLOR blue]Cerca Film...[/COLOR]', 'search', '') - support.menu(itemlist, '[B]Serie TV[/B]', 'peliculas', host + '/category/serie-tv/', 'episode') - support.menu(itemlist, '[B] > Serie TV in ordine alfabetico[/B]', 'az', host + '/category/serie-tv/', 'episode') - support.menu(itemlist, '[COLOR blue]Cerca Serie TV...[/COLOR]', 'search', '', 'episode') + support.menu(itemlist, '[B]Serie TV[/B]', 'peliculas', host + '/category/serie-tv/', 'tvshow') + support.menu(itemlist, '[B] > Serie TV in ordine alfabetico[/B]', 'az', host + '/category/serie-tv/', 'tvshow') + support.menu(itemlist, '[COLOR blue]Cerca Serie TV...[/COLOR]', 'search', '', 'tvshow') autoplay.init(item.channel, list_servers, list_quality) @@ -129,7 +129,7 @@ def peliculas(item): longtitle = title + ' [COLOR blue][' + quality + '][/COLOR]' - if item.contentType == 'episode': + if item.contentType == 'tvshow': action = 'episodios' else: action ='findvideos' @@ -181,7 +181,7 @@ def episodios(item): itemlist.append( Item(channel=item.channel, action='findvideos', - contentType=item.contentType, + contentType='episode', title=title, fulltitle=title, show=title, @@ -206,7 +206,7 @@ def episodios(item): fulltitle=title, show=title, url=url, - contentType=item.contentType, + contentType='episodie', action='findvideos' )) diff --git a/channels/ilgeniodellostreaming.py b/channels/ilgeniodellostreaming.py index 223cb043..41befd74 100644 --- a/channels/ilgeniodellostreaming.py +++ b/channels/ilgeniodellostreaming.py @@ -27,10 +27,10 @@ def mainlist(item): menu(itemlist, 'Film', 'peliculas', host + '/film/') menu(itemlist, 'Film Per Categoria', 'category', host, args='genres') menu(itemlist, 'Film Per Anno', 'category', host, args='year') - menu(itemlist, 'Serie TV', 'peliculas', host + '/serie/', 'episode') - menu(itemlist, 'Nuovi Episodi Serie TV submenu', 'newep', host + '/aggiornamenti-serie/', 'episode') - menu(itemlist, 'Anime', 'peliculas', host + '/anime/', 'episode') - menu(itemlist, 'TV Show', 'peliculas', host + '/tv-show/', 'episode') + menu(itemlist, 'Serie TV', 'peliculas', host + '/serie/', 'tvshow') + menu(itemlist, 'Nuovi Episodi Serie TV submenu', 'newep', host + '/aggiornamenti-serie/', 'tvshow') + menu(itemlist, 'Anime', 'peliculas', host + '/anime/', 'tvshow') + menu(itemlist, 'TV Show', 'peliculas', host + '/tv-show/', 'tvshow') menu(itemlist, 'Cerca...', 'search', contentType='search') aplay(item, itemlist, list_servers, list_quality) return itemlist @@ -46,10 +46,10 @@ def newest(categoria): item.contentType = 'movie' item.url = host + '/film/' elif categoria == "series": - item.contentType = 'episode' + item.contentType = 'tvshow' item.url = host + '/serie/' elif categoria == "anime": - item.contentType = 'episode' + item.contentType = 'tvshow' item.url = host + '/anime/' item.action = "peliculas" @@ -88,19 +88,19 @@ def search(item, texto): def peliculas_src(item): patron = r'
[^[^>]+>([^<]+)<\/span>.*?([^<]+)<\/a>[^>]+>[^>]+>(?:IMDb\s*([0-9.]+)<\/span>)?.*?(?:([0-9]+)<\/span>)?[^>]+>[^>]+>

(.*?)<\/p>' - return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'episode':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']}) + return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'tvshow':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']}) def peliculas(item): if item.contentType == 'movie': patron = r'

\s*[^<\/a>[^>]+>[^>]+>[^>]+>\s*([0-9.]+)<\/div>([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<\/a>[^>]+>[^>]+>([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)\s*[^<\/a>[^>]+>[^>]+>[^>]+> ([0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>[^>]+>[^>]+>([^<]+)<.*?
([^<]+)' return support.scrape(item, patron, ['url', 'thumb', 'rating', 'title', 'year', 'plot'], headers, action='episodios', patronNext='[^<]+<[^>]+>[^[^>]+>([^<]+)<\/span>.*?([^<]+)<\/a>[^>]+>[^>]+>(?:IMDb\s*([0-9.]+)<\/span>)?.*?(?:([0-9]+)<\/span>)?[^>]+>[^>]+>

(.*?)<\/p>' - return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'episode':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']}) + return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'tvshow':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']}) def newep(item): log() diff --git a/channels/seriehd.py b/channels/seriehd.py index b072ca68..7f8bdc97 100644 --- a/channels/seriehd.py +++ b/channels/seriehd.py @@ -33,7 +33,7 @@ def mainlist(item): menu(itemlist, 'Serie TV', 'peliculas', host + '/serie-tv-streaming', 'tvshow') menu(itemlist, 'Per Genere submenu', 'genre', host, 'tvshow', 'TV') menu(itemlist, 'Per Nazione submenu', 'nation', host + '/serie-tv-streaming/', 'tvshow', 'TV') - menu(itemlist, 'Cerca...', 'search', contentType='episode', args='TV') + menu(itemlist, 'Cerca...', 'search', contentType='tvshow', args='TV') autoplay.init(item.channel, list_servers, list_quality) autoplay.show_option(item.channel, itemlist) @@ -96,7 +96,7 @@ def nation(item): def peliculas(item): - item.contentType = 'episode' + item.contentType = 'tvshow' return support.scrape(item,r'

(.*?)

\s*[^\s*
.*?([0-9]{4}).*?([A-Z]+)',['title', 'thumb', 'url', 'year', 'quality'], headers, patronNext=r"\d+\d+", action='episodios') diff --git a/core/support.py b/core/support.py index 4e54c898..05a77ada 100644 --- a/core/support.py +++ b/core/support.py @@ -206,6 +206,8 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data="" if scraped['type'] in variants: action = name + if inspect.stack()[1][3] == 'episodios': item.contentType = 'episode' + if scraped["title"] not in blacklist: it = Item( channel=item.channel, @@ -489,7 +491,7 @@ def videolibrary(itemlist, item, typography='', function_level=1): # Function_level is useful if the function is called by another function. # If the call is direct, leave it blank - if item.contentType == 'movie': + if item.contentType != 'episode': action = 'add_pelicula_to_library' extra = 'findvideos' contentType = 'movie' @@ -575,12 +577,6 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True): CL = get_setting('checklinks') or get_setting('checklinks', item.channel) autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY') channel_node = autoplay_node.get(item.channel, {}) - if not channel_node: # non ha mai aperto il menu del canale quindi in autoplay_data.json non c'e la key - channelFile = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel]) - autoplay.init(item.channel, channelFile.list_servers, channelFile.list_quality) - - autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY') - channel_node = autoplay_node.get(item.channel, {}) settings_node = channel_node.get('settings', {}) AP = get_setting('autoplay') or settings_node['active'] diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 48d8c5df..cb927cbe 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -604,27 +604,29 @@ def set_context_commands(item, parent_item): from_channel=item.channel, from_action=item.action) .tourl()))) - elif item.contentSerieName: - # Descargar serie - if item.contentType == "tvshow" or 'episode' and item.action in ["episodios"]: - context_commands.append((config.get_localized_string(60355), "XBMC.RunPlugin(%s?%s)" % - (sys.argv[0], item.clone(channel="downloads", action="save_download", - from_channel=item.channel, - from_action=item.action).tourl()))) + # elif item.contentSerieName: + # Descargar serie + elif item.contentType == "tvshow" and item.action in ["episodios"]: + item.contentType == "tvshow" + context_commands.append((config.get_localized_string(60355), "XBMC.RunPlugin(%s?%s)" % + (sys.argv[0], item.clone(channel="downloads", action="save_download", + from_channel=item.channel, + from_action=item.action).tourl()))) - # Descargar episodio - elif item.contentType == "tvshow" or 'episode' and item.action in ["findvideos"]: - context_commands.append((config.get_localized_string(60356), "XBMC.RunPlugin(%s?%s)" % - (sys.argv[0], item.clone(channel="downloads", action="save_download", - from_channel=item.channel, - from_action=item.action).tourl()))) + # Descargar episodio + elif item.contentType == 'episode' and item.action in ["findvideos"]: + item.contentType == "episode" + context_commands.append((config.get_localized_string(60356), "XBMC.RunPlugin(%s?%s)" % + (sys.argv[0], item.clone(channel="downloads", action="save_download", + from_channel=item.channel, + from_action=item.action).tourl()))) - # Descargar temporada - elif item.contentType == "season": - context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" % - (sys.argv[0], item.clone(channel="downloads", action="save_download", - from_channel=item.channel, - from_action=item.action).tourl()))) + # Descargar temporada + elif item.contentType == "season": + context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" % + (sys.argv[0], item.clone(channel="downloads", action="save_download", + from_channel=item.channel, + from_action=item.action).tourl()))) # Abrir configuración if parent_item.channel not in ["setting", "news", "search"]: diff --git a/specials/downloads.py b/specials/downloads.py index 2646f199..d92bf955 100644 --- a/specials/downloads.py +++ b/specials/downloads.py @@ -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))