Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -468,12 +468,8 @@ def play_from_library(item):
|
||||
import xbmcgui, xbmcplugin, xbmc
|
||||
from time import sleep
|
||||
|
||||
# logger.debug("item: \n" + item.tostring('\n'))
|
||||
# xbmc.Player().play(os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))
|
||||
if not item.autoplay and not item.next_ep:
|
||||
platformtools.fakeVideo()
|
||||
# from core.support import dbg;dbg()
|
||||
# platformtools.prevent_busy(item)
|
||||
|
||||
|
||||
itemlist=[]
|
||||
|
||||
@@ -1496,26 +1496,33 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
|
||||
if torr_client in ['elementum'] and item.infoLabels['tmdb_id']:
|
||||
if item.contentType == 'episode' and "elementum" not in torr_client:
|
||||
mediaurl += "&episode=%s&library=&season=%s&show=%s&tmdb=%s&type=episode" % (item.infoLabels['episode'], item.infoLabels['season'], item.infoLabels['tmdb_id'], item.infoLabels['tmdb_id'])
|
||||
mediaurl += "&episode=%s&season=%s&show=%s&tmdb=%s&type=episode" % (item.infoLabels['episode'], item.infoLabels['season'], item.infoLabels['tmdb_id'], item.infoLabels['tmdb_id'])
|
||||
elif item.contentType == 'movie':
|
||||
mediaurl += "&library=&tmdb=%s&type=movie" % (item.infoLabels['tmdb_id'])
|
||||
mediaurl += "&tmdb=%s&type=movie" % (item.infoLabels['tmdb_id'])
|
||||
|
||||
if torr_client in ['elementum'] and item.downloadFilename:
|
||||
torrent.elementum_download(item)
|
||||
|
||||
else:
|
||||
import xbmcaddon
|
||||
xbmcaddon.Addon(id='plugin.video.elementum').setSetting('download_storage', '1')
|
||||
if (item.fromLibrary and item.play_from == 'window') or item.window:
|
||||
xlistitem.setPath(torrent_options[selection][1] % mediaurl)
|
||||
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
|
||||
playlist.clear()
|
||||
playlist.add(torrent_options[selection][1] % mediaurl, xlistitem)
|
||||
xbmc_player.play(playlist, xlistitem)
|
||||
else:
|
||||
if not item.autoplay and item.channel != 'videolibrary': fakeVideo()
|
||||
if xbmc.getCondVisibility("system.platform.android"): xbmc.sleep(3000)
|
||||
xbmc.executebuiltin("PlayMedia(" + torrent_options[selection][1] % mediaurl + ")")
|
||||
addon = xbmcaddon.Addon(id='plugin.video.elementum')
|
||||
# from core.support import dbg;dbg()
|
||||
if addon.getSetting('download_storage') == '0':
|
||||
addon.setSetting('download_storage', '1')
|
||||
xbmc.sleep(3000)
|
||||
xbmc.executebuiltin("PlayMedia(" + torrent_options[selection][1] % mediaurl + ")")
|
||||
# import xbmcaddon
|
||||
# xbmcaddon.Addon(id='plugin.video.elementum').setSetting('download_storage', '1')
|
||||
# if (item.fromLibrary and item.play_from == 'window') or item.window:
|
||||
# xlistitem.setPath(torrent_options[selection][1] % mediaurl)
|
||||
# playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
|
||||
# playlist.clear()
|
||||
# playlist.add(torrent_options[selection][1] % mediaurl, xlistitem)
|
||||
# xbmc_player.play(playlist, xlistitem)
|
||||
# else:
|
||||
# if not item.autoplay and item.channel != 'videolibrary': fakeVideo()
|
||||
# if xbmc.getCondVisibility("system.platform.android"): xbmc.sleep(3000)
|
||||
# xbmc.executebuiltin("PlayMedia(" + torrent_options[selection][1] % mediaurl + ")")
|
||||
|
||||
# torrent.mark_auto_as_watched(item)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user