Getting custom property from JSONRPC
#1
I'm trying to develop player history and save in my own server. I'm passing custom property before playing the file. but I couldn't get it with service

python:

url = 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'
title = 'Bigbuck bunny'
listitem = xbmcgui.ListItem(path=url)
listitem.setProperty('IsPlayable', 'true')
listitem.setProperty('play_id', '45673')
listitem.setInfo('video', {'Title': title, 'Genre': 'Cartoon'})
listitem.setProperties({'play_id':'45673'})
xbmc.Player().play(url, listitem)

and accessing player file like this
python:

request = {"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": [ "play_id", "title"], "playerid": 1 }, "id": "VideoGetItem"}
request_string = json.dumps(request)
response = xbmc.executeJSONRPC(request_string)

I'm not getting play_id. I always get an error like this
python:

{"error":{"code":-32602,"data":{"method":"Player.GetItem","stack":{"message":"array element at index 0 does not match","name":"Item.Fields.Base","property":{"message":"Received value does not match any of the defined enum values","type":"string"},"type":"array"}},"message":"Invalid params."},"id":"VideoGetItem","jsonrpc":"2.0"}

any one knows how I can get play_id while movie is playing?
Reply

Logout Mark Read Team Forum Stats Members Help
Getting custom property from JSONRPC0