set actual playback path in the directory item
This commit is contained in:
@@ -365,6 +365,7 @@ def delete (item_id):
|
||||
def addGUIItem( url, details, extraData, folder=True ):
|
||||
|
||||
url = url.encode('utf-8')
|
||||
WINDOW = xbmcgui.Window(10000)
|
||||
|
||||
log.debug("Adding GuiItem for [%s]" % details.get('title','Unknown'))
|
||||
log.debug("Passed details: " + str(details))
|
||||
@@ -382,7 +383,9 @@ def addGUIItem( url, details, extraData, folder=True ):
|
||||
if url.startswith('http'):
|
||||
u = sys.argv[0] + "?url=" + urllib.quote(url) + mode
|
||||
else:
|
||||
u = sys.argv[0] + "?url=" + url + '&mode=PLAY' + "×tamp=" + str(datetime.today())
|
||||
#u = sys.argv[0] + extraData.get('id') + "/media/file.mkv?url=" + url + '&mode=PLAY'# + "×tamp=" + str(datetime.today())
|
||||
u = PlayUtils().getPlayUrl(extraData.get("id"), extraData)
|
||||
WINDOW.setProperty("playback_url_" + u, extraData.get("id"))
|
||||
|
||||
#Create the ListItem that will be displayed
|
||||
thumbPath=str(extraData.get('thumb',''))
|
||||
@@ -1113,6 +1116,8 @@ def processDirectory(url, results, progress, pluginhandle):
|
||||
'NumEpisodes' : str(NumEpisodes),
|
||||
'itemtype' : item_type}
|
||||
|
||||
extraData["Path"] = item.get("Path")
|
||||
|
||||
if extraData['thumb'] == '':
|
||||
extraData['thumb'] = extraData['fanart_image']
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ log = SimpleLogging("EmbyCon." + __name__)
|
||||
|
||||
###########################################################################
|
||||
class PlayUtils():
|
||||
def getPlayUrl(self, server, id, result):
|
||||
def getPlayUrl(self, id, result):
|
||||
log.info("getPlayUrl")
|
||||
addonSettings = xbmcaddon.Addon(id='plugin.video.embycon')
|
||||
playback_type = addonSettings.getSetting("playback_type")
|
||||
|
||||
@@ -65,13 +65,14 @@ class Service( xbmc.Player ):
|
||||
stopAll(self.played_information)
|
||||
|
||||
currentFile = xbmc.Player().getPlayingFile()
|
||||
log.info("EmbyCon Service -> onPlayBackStarted" + currentFile)
|
||||
log.info("onPlayBackStarted" + currentFile)
|
||||
|
||||
WINDOW = xbmcgui.Window( 10000 )
|
||||
item_id = WINDOW.getProperty("item_id")
|
||||
|
||||
item_id = WINDOW.getProperty("playback_url_" + currentFile)
|
||||
log.info("item_id: " + item_id)
|
||||
|
||||
# reset all these so they dont get used is xbmc plays a none
|
||||
WINDOW.setProperty("item_id", "")
|
||||
#WINDOW.setProperty("item_id", "")
|
||||
|
||||
if(item_id == None or len(item_id) == 0):
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user