Getting "now playing" URL via JSON
#1
Hello,
This is my very first post, I want to start by saying thank you to the Kodi team, and all the users arround.

I am trying to get the "now playing URL" via JSON.
I want to try to get the currently playing iptv stream for example and send it to my dumb phone.

Any ideas ?

Thank you in advance.
Slimo
Reply
#2
Hey,

have a look at milhouses post here:
http://forum.kodi.tv/showthread.php?tid=...pid2143107
He points out everything you need to do
Reply
#3
Thank you for the reply, but I need the URL of the playing stream, I will try this method and if anybody has other ideas(or tips) dont hesitate.

Thank you
Reply
#4
Bump on this thread.

The property that "should" hold this information is the "file" attribute.
json:
{"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["file"], "playerid": 1 }, "id": "VideoGetItem"}
Problem is it's not giving you a clean link.
Isn't there another property where you can get the url/path only?
Having to regex this information seems so unnecessary.

There are lots of views on this thread, so i assume it's something many people would like.
Reply
#5
Even if i add the attributes "mediapath" and "dynpath" to the json call all i get returned is
the "plugin://plugin" path when a video is played for the second time.

Example json to a Retrospect video:
json:
{"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["file","mediapath","dynpath"], "playerid": 1 }, "id": "VideoGetItem"}

First time playing response:
Code:
{"id":"VideoGetItem","jsonrpc":"2.0","result":{"item":{"dynpath":"https://lbs-usp-dash-vod.cmore.se/vod/d5cbd/vctcbpssbdr(13315106_ISMUSP).ism/vctcbpssbdr(13315106_ISMUSP).mpd","file":"https://lbs-usp-dash-vod.cmore.se/vod/d5cbd/vctcbpssbdr(13315106_ISMUSP).ism/vctcbpssbdr(13315106_ISMUSP).mpd","label":"Nyheterna 22.00 15 januari 2021 [COLOR aqua]º[/COLOR]","mediapath":"plugin://plugin.video.retrospect/?action=playvideo&pickle=DD6519DF5C3BB8618977DF7B441DDFDDA5626AFDB89257C498AEB3015BCE370A--FB06DBDE5D934D8B77629074D74086D2806050D2F19DF7ECE90BA5BFC15204E5&channel=channel.se.tv4se-tv4segroup","type":"unknown"}}}
Second time playing response:
Code:
{"id":"VideoGetItem","jsonrpc":"2.0","result":{"item":{"dynpath":"plugin://plugin.video.retrospect/?action=playvideo&pickle=DD6519DF5C3BB8618977DF7B441DDFDDA5626AFDB89257C498AEB3015BCE370A--FB06DBDE5D934D8B77629074D74086D2806050D2F19DF7ECE90BA5BFC15204E5&channel=channel.se.tv4se-tv4segroup","file":"plugin://plugin.video.retrospect/?action=playvideo&pickle=DD6519DF5C3BB8618977DF7B441DDFDDA5626AFDB89257C498AEB3015BCE370A--FB06DBDE5D934D8B77629074D74086D2806050D2F19DF7ECE90BA5BFC15204E5&channel=channel.se.tv4se-tv4segroup","label":"Nyheterna 22.00 15 januari 2021 [COLOR aqua]º[/COLOR]","mediapath":"plugin://plugin.video.retrospect/?action=playvideo&pickle=DD6519DF5C3BB8618977DF7B441DDFDDA5626AFDB89257C498AEB3015BCE370A--FB06DBDE5D934D8B77629074D74086D2806050D2F19DF7ECE90BA5BFC15204E5&channel=channel.se.tv4se-tv4segroup","type":"unknown"}}}

This is not so good, I want an attribute that gives the playing url every time.
youtube addon is the same.
You can pull literally hundreds of different data attributes with the json system, but the most fundamental data point for a mediaplayer, the playing url you can't..... No
Reply

Logout Mark Read Team Forum Stats Members Help
Getting "now playing" URL via JSON0