download da menu contestuale in videoteca, niente pulsante scarica se il contenuto è locale

This commit is contained in:
marco
2020-04-15 13:28:19 +02:00
parent 0d8a7c924d
commit 20d66e020a
2 changed files with 8 additions and 4 deletions

View File

@@ -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)" %

View File

@@ -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"),