download da menu contestuale in videoteca, niente pulsante scarica se il contenuto è locale
This commit is contained in:
@@ -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)" %
|
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)))
|
(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
|
# Descargar pelicula
|
||||||
if item.contentType == "movie":
|
if item.contentType == "movie":
|
||||||
context_commands.append((config.get_localized_string(60354), "XBMC.RunPlugin(%s?%s&%s)" %
|
context_commands.append((config.get_localized_string(60354), "XBMC.RunPlugin(%s?%s&%s)" %
|
||||||
|
|||||||
@@ -52,10 +52,9 @@ def list_movies(item, silent=False):
|
|||||||
for raiz, subcarpetas, ficheros in filetools.walk(videolibrarytools.MOVIES_PATH):
|
for raiz, subcarpetas, ficheros in filetools.walk(videolibrarytools.MOVIES_PATH):
|
||||||
local_movie = False
|
local_movie = False
|
||||||
for f in ficheros:
|
for f in ficheros:
|
||||||
# from core.support import dbg;dbg()
|
|
||||||
if f.split('.')[-1] not in ['nfo','json','strm']:
|
if f.split('.')[-1] not in ['nfo','json','strm']:
|
||||||
local_movie = True
|
local_movie = True
|
||||||
|
for f in ficheros:
|
||||||
if f.endswith(".nfo"):
|
if f.endswith(".nfo"):
|
||||||
nfo_path = filetools.join(raiz, f)
|
nfo_path = filetools.join(raiz, f)
|
||||||
|
|
||||||
@@ -1130,7 +1129,12 @@ def check_tvshow_playcount(item, season):
|
|||||||
|
|
||||||
|
|
||||||
def add_download_items(item, itemlist):
|
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',
|
downloadItem = Item(channel='downloads',
|
||||||
from_channel=item.channel,
|
from_channel=item.channel,
|
||||||
title=typo(config.get_localized_string(60355), "color kod bold"),
|
title=typo(config.get_localized_string(60355), "color kod bold"),
|
||||||
|
|||||||
Reference in New Issue
Block a user