From 20d66e020a523d1d90b053186db2675dc9d2b3d2 Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 15 Apr 2020 13:28:19 +0200 Subject: [PATCH] =?UTF-8?q?download=20da=20menu=20contestuale=20in=20video?= =?UTF-8?q?teca,=20niente=20pulsante=20scarica=20se=20il=20contenuto=20?= =?UTF-8?q?=C3=A8=20locale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformcode/platformtools.py | 2 +- specials/videolibrary.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 0b757bac..7aa39ed7 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -778,7 +778,7 @@ def set_context_commands(item, item_url, parent_item, **kwargs): context_commands.append((config.get_localized_string(60353), "XBMC.RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'action=add_pelicula_to_library&from_action=' + item.action))) - if item.channel not in ["downloads", "videolibrary"] and item.server != 'torrent' and parent_item.action != 'mainlist' and config.get_setting('downloadenabled'): + if item.channel not in ["downloads"] and item.server != 'torrent' and parent_item.action != 'mainlist' and config.get_setting('downloadenabled'): # Descargar pelicula if item.contentType == "movie": context_commands.append((config.get_localized_string(60354), "XBMC.RunPlugin(%s?%s&%s)" % diff --git a/specials/videolibrary.py b/specials/videolibrary.py index cea0dc84..a36f079a 100644 --- a/specials/videolibrary.py +++ b/specials/videolibrary.py @@ -52,10 +52,9 @@ def list_movies(item, silent=False): for raiz, subcarpetas, ficheros in filetools.walk(videolibrarytools.MOVIES_PATH): local_movie = False for f in ficheros: - # from core.support import dbg;dbg() if f.split('.')[-1] not in ['nfo','json','strm']: local_movie = True - + for f in ficheros: if f.endswith(".nfo"): nfo_path = filetools.join(raiz, f) @@ -1130,7 +1129,12 @@ def check_tvshow_playcount(item, season): def add_download_items(item, itemlist): - if not item.fromLibrary: + localOnly = True + for i in itemlist: + if i.contentChannel != 'local': + localOnly = False + break + if not item.fromLibrary and not localOnly: downloadItem = Item(channel='downloads', from_channel=item.channel, title=typo(config.get_localized_string(60355), "color kod bold"),