From 2e0eb94b97d45f11d658eae46c56fc74ea372124 Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Mon, 27 May 2019 09:47:22 +0200 Subject: [PATCH 1/6] Fix Download series and episode --- platformcode/platformtools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 7c17e473..48d8c5df 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -606,14 +606,14 @@ def set_context_commands(item, parent_item): elif item.contentSerieName: # Descargar serie - if item.contentType == "tvshow": + 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()))) # Descargar episodio - elif item.contentType == "episode": + 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 45ad567a74fd7ce70e94db880f83b3e7eaa37774 Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Mon, 27 May 2019 10:09:07 +0200 Subject: [PATCH 2/6] support fix for videolibrary --- core/support.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/core/support.py b/core/support.py index 49a6ecaf..33e10a77 100644 --- a/core/support.py +++ b/core/support.py @@ -449,7 +449,11 @@ def match(item, patron='', patron_block='', headers='', url=''): return matches, data -def videolibrary(itemlist, item, typography=''): +def videolibrary(itemlist, item, typography='', function_level=1): + # Simply add this function to add video library support + # Function_level is useful if the function is called by another function. + # If the call is direct, leave it blank + if item.contentType != 'episode': action = 'add_pelicula_to_library' extra = 'findvideos' @@ -458,9 +462,12 @@ def videolibrary(itemlist, item, typography=''): action = 'add_serie_to_library' extra = 'episodios' contentType = 'tvshow' + if not typography: typography = 'color kod bold' + title = typo(config.get_localized_string(30161) + ' ' + typography) - if inspect.stack()[1][3] == 'findvideos' and contentType == 'movie' or inspect.stack()[1][3] != 'findvideos' and contentType != 'movie': + + if inspect.stack()[function_level][3] == 'findvideos' and contentType == 'movie' or inspect.stack()[function_level][3] != 'findvideos' and contentType != 'movie': if config.get_videolibrary_support() and len(itemlist) > 0: itemlist.append( Item(channel=item.channel, @@ -472,6 +479,7 @@ def videolibrary(itemlist, item, typography=''): extra=extra, contentTitle=item.fulltitle)) + return itemlist def nextPage(itemlist, item, data, patron, function_level=1): # Function_level is useful if the function is called by another function. @@ -528,11 +536,13 @@ def server(item, data='', itemlist='', headers='', AutoPlay=True, CheckLinks=Tru def controls(itemlist, item, AutoPlay=True, CheckLinks=True): from core import jsontools from platformcode.config import get_setting + 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, {}) settings_node = channel_node.get('settings', {}) AP = get_setting('autoplay') or settings_node['active'] + if CL and not AP: if get_setting('checklinks', item.channel): checklinks = get_setting('checklinks', item.channel) @@ -546,7 +556,8 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True): if AutoPlay == True: autoplay.start(itemlist, item) - videolibrary(itemlist, item) + + videolibrary(itemlist, item, function_level=3) return itemlist From c733a6d0f66329fc65e00681b53346dc2f7afbff Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Mon, 27 May 2019 11:55:51 +0200 Subject: [PATCH 3/6] Fix fon support and ilgeniodellostreaming --- channels/ilgeniodellostreaming.py | 19 ++++++++++++++----- core/support.py | 14 +++++++++++++- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/channels/ilgeniodellostreaming.py b/channels/ilgeniodellostreaming.py index a10e37bb..223cb043 100644 --- a/channels/ilgeniodellostreaming.py +++ b/channels/ilgeniodellostreaming.py @@ -40,10 +40,18 @@ def newest(categoria): log(categoria) itemlist = [] item = Item() + try: - if categoria == "movie": item.url = host + '/film/' - elif categoria == "tvshow": item.url = host + '/serie/' - elif categoria == "anime": item.url = host + '/anime/' + if categoria == 'peliculas': + item.contentType = 'movie' + item.url = host + '/film/' + elif categoria == "series": + item.contentType = 'episode' + item.url = host + '/serie/' + elif categoria == "anime": + item.contentType = 'episode' + item.url = host + '/anime/' + item.action = "peliculas" itemlist = peliculas(item) @@ -126,10 +134,11 @@ def episodios(item): def findvideos(item): log() + itemlist =[] matches, data = support.match(item, '