JSON and JazzRadio.com
#1
Hello Community,

I am using the JazzRadio.com and Sky.fm plugins, and I would like to use JSON commands to play a particular stream. I am able to use the Addons.ExecuteAddon method to bring up the menu on the UI. However, as yet, I am unable to actually select a particular stream using JSON commands. Here is what I am trying, based on a similar post concerning the YouTube addon...

Code:
{"jsonrpc":"2.0", "id":789, "method":"Player.Open","params":{"item":{"file":"plugin://plugin.audio.jazzradio.com/?action=play_audio&name='Blues'"}}}

Thanks for any insight you may have.
Reply
#2
How did you get this path and is it valid? What is the response you get from JSON-RPC?

What are you actually trying to do? Do you want to browse the addon in XBMC and then play an item focused on the screen or do you want to browse the addon on your remote and then play an item from your remote (without ever opening the addon in XBMC on the screen)?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
You cannot assume that all plugins use the same urls for their files

You can use the following trick to browse your addon using json-rpc (this however will query the info in the background and not show anything on xbmc)
Code:
curl  -H "Content-Type: application/json"  -d "{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"Files.GetDirectory\",\"params\":{\"directory\":\"plugin://plugin.audio.jazzradio.com\",\"media\":\"music\",\"properties\":[\"title\",\"thumbnail\",\"playcount\",\"artist\",\"album\",\"episode\",\"season\",\"showtitle\"],\"sort\":{\"method\":\"none\",\"order\":\"ascending\"}}}" http://127.0.0.1:8080/jsonrpc

It will return something like this
Code:
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "files": [
            {
                "album": "",
                "artist": [],
                "file": "http://pub7.jazzradio.com:80/jr_holidaysmoothjazz",
                "filetype": "file",
                "label": "[COLOR FF007EFF]Holiday Smooth Jazz[/COLOR]",
                "playcount": 0,
                "thumbnail": "image://%2fhome%2fmichel%2f.xbmc%2fuserdata%2faddon_data%2fplugin.audio.jazzradio.com%2fart_holidaysmoothjazz.png/",
                "title": "",
                "type": "unknown"
            },
            {
                "album": "",
                "artist": [],
                "file": "http://pub6.jazzradio.com:80/jr_holidayjazz",
                "filetype": "file",
                "label": "[COLOR FF007EFF]Holiday Jazz[/COLOR]",
                "playcount": 0,
                "thumbnail": "image://%2fhome%2fmichel%2f.xbmc%2fuserdata%2faddon_data%2fplugin.audio.jazzradio.com%2fart_holidayjazz.png/",
                "title": "",
                "type": "unknown"
            }
...
...
...
        ],
        "limits": {
            "end": 34,
            "start": 0,
            "total": 34
        }
    }
}

Then you can pass the url from "file" to Player.Open to start playback
Reply

Logout Mark Read Team Forum Stats Members Help
JSON and JazzRadio.com0