Fix Riproduzione e Download Torrent
This commit is contained in:
+8
-3
@@ -27,7 +27,7 @@ def start(itemlist, item):
|
||||
:return: try to auto-reproduce, in case of failure it returns the itemlist that it received in the beginning
|
||||
'''
|
||||
|
||||
if item.global_search or item.from_action: # from_action means that's a special function calling this (ex: add to videolibrary)
|
||||
if item.global_search or item.from_action or item.contentAction: # from_action means that's a special function calling this (ex: add to videolibrary)
|
||||
return itemlist
|
||||
logger.debug()
|
||||
|
||||
@@ -39,6 +39,11 @@ def start(itemlist, item):
|
||||
if not config.is_xbmc():
|
||||
return itemlist
|
||||
|
||||
import xbmc
|
||||
control_item = Item().fromurl(xbmc.getInfoLabel('Container.FolderPath'))
|
||||
if control_item.action == item.action:
|
||||
return itemlist
|
||||
|
||||
if config.get_setting('autoplay') or item.autoplay:
|
||||
# Save the current value of "Action and Player Mode" in preferences
|
||||
user_config_setting_action = config.get_setting("default_action")
|
||||
@@ -103,7 +108,7 @@ def start(itemlist, item):
|
||||
pass
|
||||
# sleep(3)
|
||||
try:
|
||||
if platformtools.is_playing() or autoplay_elem.server == 'torrent':
|
||||
if platformtools.is_playing():
|
||||
PLAYED = True
|
||||
break
|
||||
except:
|
||||
@@ -119,7 +124,7 @@ def start(itemlist, item):
|
||||
max_intents_servers[videoitem.server.lower()] = max_intents
|
||||
|
||||
# If there are no items in the list, it is reported
|
||||
if autoplay_elem == autoplay_list[-1]:
|
||||
if autoplay_elem == autoplay_list[-1] and autoplay_elem.server != 'torrent':
|
||||
platformtools.dialog_notification('AutoPlay', config.get_localized_string(60072) % name)
|
||||
|
||||
else:
|
||||
|
||||
@@ -283,6 +283,9 @@ class Item(object):
|
||||
def __str__(self):
|
||||
return '\r\t' + self.tostring('\r\t')
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def set_parent_content(self, parentContent):
|
||||
"""
|
||||
Fill the contentDetails fields with the information of the item "parent"
|
||||
|
||||
+2
-2
@@ -1276,10 +1276,10 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
||||
videoitem.server = videoitem.server.lower()
|
||||
|
||||
if videoitem.video_urls or srv_param.get('active', False):
|
||||
item.title = typo(item.contentTitle.strip(), 'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title
|
||||
title = typo(item.contentTitle.strip(), 'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title
|
||||
|
||||
quality = videoitem.quality if videoitem.quality else item.quality if item.quality else ''
|
||||
videoitem.title = (item.title if item.channel not in ['url'] else '')\
|
||||
videoitem.title = (title if item.channel not in ['url'] else '')\
|
||||
+ (typo(videoitem.title, '_ color kod [] bold') if videoitem.title else "")\
|
||||
+ (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")\
|
||||
+ (typo(videoitem.contentLanguage, '_ color kod []') if videoitem.contentLanguage else "")\
|
||||
|
||||
Reference in New Issue
Block a user