From e1fa7894b7f8a996b98e4777c418e97c56060066 Mon Sep 17 00:00:00 2001 From: mac12m99 Date: Sat, 4 May 2019 11:50:14 +0200 Subject: [PATCH] hide download serie/movie/episode if download not enabled --- platformcode/platformtools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 6befc842..3ed3ac7f 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -22,6 +22,9 @@ from core import channeltools from core import trakt_tools, scrapertoolsV2 from core.item import Item from platformcode import logger +import xbmcaddon +addon = xbmcaddon.Addon('plugin.video.kod') +downloadenabled = addon.getSetting('downloadenabled') class XBMCPlayer(xbmc.Player): @@ -591,7 +594,7 @@ def set_context_commands(item, parent_item): (sys.argv[0], item.clone(action="add_pelicula_to_library", from_action=item.action).tourl()))) - if item.channel != "downloads": + if item.channel != "downloads" and downloadenabled != "false": # Descargar pelicula if item.contentType == "movie" and item.contentTitle: context_commands.append((config.get_localized_string(60354), "XBMC.RunPlugin(%s?%s)" %