Help with json script
#1
Not sure where to post this.

I am looking for a sample of json command that would retrieve what sound track is currently being played from a movie file. I.E. 2 channel or 5.1 channel.

I found a command that retrieves the stream details, but that just gives me a list of all the audio tracks. I would like one that gives me which one is playing.

Thanks
Mike
Reply
#2
It would be better in add-on development - I'll move it there.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
i think you can use the Player.GetProperties method to retrieve the currentaudiostream (Player.Audio.Stream.Extended) value.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Sorry should have stated that the program I am using to retrieve data can only send simple one line request like the sample below,

jsonrpc?request={"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["streamdetails"], "playerid": 1 }, "id": "VideoGetItem"}

I looked at the Player.Audio.Stream.Extended section but what would the command struct look like?
Reply
#5
i assume it would be something like:
jsonrpc?request={"jsonrpc": "2.0", "method": "Player.GetProperties", "params": { "properties": ["currentaudiostream"], "playerid": 1 }, "id": "VideoGetItem"}
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
thanks, that worked
Reply

Logout Mark Read Team Forum Stats Members Help
Help with json script0