Se Autoplay è attivo non mostra la lista server
This commit is contained in:
+12
-3
@@ -991,15 +991,24 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
|||||||
checklinks_number = get_setting('checklinks_number')
|
checklinks_number = get_setting('checklinks_number')
|
||||||
itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
||||||
|
|
||||||
if AutoPlay == True and inspect.stack()[4][3] != 'start_download':
|
if AutoPlay == True and inspect.stack()[3][3] not in ['download_from_best_server', 'select_server']:
|
||||||
autoplay.start(itemlist, item)
|
autoplay.start(itemlist, item)
|
||||||
|
|
||||||
if item.contentChannel != 'videolibrary': videolibrary(itemlist, item, function_level=3)
|
if item.contentChannel != 'videolibrary': videolibrary(itemlist, item, function_level=3)
|
||||||
if get_setting('downloadenabled') and down_load == True: download(itemlist, item, function_level=3)
|
if get_setting('downloadenabled') and down_load == True: download(itemlist, item, function_level=3)
|
||||||
return itemlist
|
VL = False
|
||||||
|
try:
|
||||||
|
if inspect.stack()[3][3] in ['download_from_best_server', 'select_server'] or \
|
||||||
|
inspect.stack()[4][3] == 'play_from_library' or \
|
||||||
|
inspect.stack()[5][3] == 'play_from_library':
|
||||||
|
VL = True
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
if not AP or VL:
|
||||||
|
return itemlist
|
||||||
|
|
||||||
def filterLang(item, itemlist):
|
def filterLang(item, itemlist):
|
||||||
import channeltools
|
# import channeltools
|
||||||
list_language = channeltools.get_lang(item.channel)
|
list_language = channeltools.get_lang(item.channel)
|
||||||
if len(list_language) > 1:
|
if len(list_language) > 1:
|
||||||
from specials import filtertools
|
from specials import filtertools
|
||||||
|
|||||||
@@ -446,6 +446,8 @@ def play_from_library(item):
|
|||||||
import xbmcplugin
|
import xbmcplugin
|
||||||
import xbmc
|
import xbmc
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
from specials import autoplay
|
||||||
|
from specials import videolibrary
|
||||||
|
|
||||||
# Intentamos reproducir una imagen (esto no hace nada y ademas no da error)
|
# Intentamos reproducir una imagen (esto no hace nada y ademas no da error)
|
||||||
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True,
|
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True,
|
||||||
@@ -461,14 +463,16 @@ def play_from_library(item):
|
|||||||
|
|
||||||
window_type = config.get_setting("window_type", "videolibrary")
|
window_type = config.get_setting("window_type", "videolibrary")
|
||||||
|
|
||||||
|
if autoplay.is_active(item.contentChannel):
|
||||||
|
itemlist = videolibrary.findvideos(item)
|
||||||
|
|
||||||
# y volvemos a lanzar kodi
|
# y volvemos a lanzar kodi
|
||||||
if xbmc.getCondVisibility('Window.IsMedia') and not window_type == 1:
|
elif xbmc.getCondVisibility('Window.IsMedia') and not window_type == 1:
|
||||||
# Ventana convencional
|
# Ventana convencional
|
||||||
xbmc.executebuiltin("Container.Update(" + sys.argv[0] + "?" + item.tourl() + ")")
|
xbmc.executebuiltin("Container.Update(" + sys.argv[0] + "?" + item.tourl() + ")")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Ventana emergente
|
# Ventana emergente
|
||||||
from specials import videolibrary
|
|
||||||
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(70004))
|
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(70004))
|
||||||
p_dialog.update(0, '')
|
p_dialog.update(0, '')
|
||||||
|
|
||||||
@@ -527,6 +531,5 @@ def play_from_library(item):
|
|||||||
item.play_from = 'window'
|
item.play_from = 'window'
|
||||||
platformtools.play_video(item)
|
platformtools.play_video(item)
|
||||||
|
|
||||||
from specials import autoplay
|
|
||||||
if (platformtools.is_playing() and item.action) or item.server == 'torrent' or autoplay.is_active(item.contentChannel):
|
if (platformtools.is_playing() and item.action) or item.server == 'torrent' or autoplay.is_active(item.contentChannel):
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user