Fix Download Torrent

This commit is contained in:
Alhaziel01
2021-11-03 19:18:11 +01:00
parent df6f3f1177
commit 05102262ca
13 changed files with 879 additions and 12 deletions

View File

@@ -261,7 +261,6 @@ def run(item=None):
# Special action for searching, first asks for the words then call the "search" function
elif item.action == "search":
# from core.support import dbg;dbg()
if filetools.isfile(temp_search_file) and config.get_setting('videolibrary_kodi'):
itemlist = []
f = filetools.read(temp_search_file)
@@ -486,7 +485,7 @@ def play_from_library(item):
# Modify the action (currently the video library needs "findvideos" since this is where the sources are searched
item.action = item.next_action if item.next_action else "findvideos"
# from core.support import dbg;dbg()
if item.contentType == 'movie' or item.contentType != 'movie' and config.get_setting('next_ep') < 3:
window_type = config.get_setting("window_type", "videolibrary")
else: window_type = 1

View File

@@ -400,7 +400,7 @@ def viewmodeMonitor():
currentMode = int(win.getFocusId())
# logger.debug('CM', currentMode, 'CN',currentModeName, 'label',xbmc.getInfoLabel('Container.FolderPath'))
# if not parent_info:
# from core.support import dbg;dbg()
if currentModeName and 'plugin.video.kod' in parent_info and 50 <= currentMode < 1000:# and currentMode >= 50: # inside addon and in itemlist view
# logger.debug('CAMBIO VISUALE')
content, Type = getCurrentView(Item().fromurl(item_info) if item_info else Item(), Item().fromurl(parent_info))
@@ -424,7 +424,7 @@ def getCurrentView(item=None, parent_item=None):
if not parent_item:
logger.debug('ESCO')
return None, None
# if not parent_item:
# info = xbmc.getInfoLabel('Container.FolderPath')
# if not info:
@@ -1001,7 +1001,6 @@ def play_video(item, strm=False, force_direct=False, autoplay=False):
set_infolabels(xlistitem, item, True)
# if it is a video in mpd format, the listitem is configured to play it ith the inpustreamaddon addon implemented in Kodi 17
# from core.support import dbg;dbg()
if mpd or item.manifest =='mpd':
if not install_inputstream():
return
@@ -1505,8 +1504,6 @@ def play_torrent(item, xlistitem, mediaurl):
if torr_client in ['elementum'] and item.downloadFilename:
torrent.elementum_download(item)
else:
# time.sleep(3)
# from core.support import dbg;dbg()
if item.fromLibrary and item.play_from == 'window':
xlistitem.setPath(torrent_options[selection][1] % mediaurl)
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)