GetItem with MP3 Streams on Eden
#1
I start playing an mp3 steam on xbmc. When I try to get what's currently playing using:

Code:
{"jsonrpc":"2.0","method":"Player.GetItem","id":"1","params":{"playerid":0,"properties":["album","albumartist","duration","file","thumbnail","tagline","artist"]}}

I get back:

Code:
{"id":"1","jsonrpc":"2.0","result":{"item":{"file":"","label":"","thumbnail":"","type":"unknown"}}}

Contrast this with the results from /xbmcCmds/xbmcHttp?command=GetCurrentlyPlaying:

Code:
Filename:http://live-mp3-128.kexp.org:8000/
PlayStatus:Playing
SongNo:0
Type:Audio
Title:KEXP 90.3 FM - Time: 9:03 AM Artist: Night Moves Song: 'Headlights' Album: LIVE on KEXP
Genre:Misc
URL:
Lyrics:
Samplerate:44
Thumb:DefaultAlbumCover.png
Time:23:32
Duration:
Percentage:-2147483648
File size:-1
Changed:True
Is there a way to get this data through the JSONRPC interface on Eden?
Reply
#2
JSON-RPC should directly access the metadata used by XBMC to display title etc in the GUI. But the fact that "type" is "unknown" indicates that it doesn't even know what kind of media you are playing. Can I play that stream in my installation and if so how? Otherwise it gets difficult to reproduce.
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 can indeed. Sorry for not including that. I have a selection of radio mp3 streams that I've downloaded and put into a folder labeled radio. I just use the file browser and click on them to play.

You can download this file using wget and replicate what I'm seeing.
Code:
http://live-mp3-128.kexp.org:8000/listen.pls

I renamed the file to kexp.pls in the folder, but the output is from that exact stream.

What you're describing is what I'm seeing in the JSON API source code, but I couldn't quite figure out what the HTTP API was doing to read this.
Reply
#4
I just tried your exact JSON-RPC request with that .pls file and this is what I get as a response:
Code:
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "item": {
      "album": "",
      "albumartist": [

      ],
      "artist": [

      ],
      "duration": 0,
      "file": "http://live-mp3-128.kexp.org:8000/",
      "label": "KEXP 90.3 FM - Time: 10:01 AM Artist: Blackalicious Song: 'The Craft' Album: The Craft",
      "thumbnail": "",
      "type": "song"
    }
  }
}

So I get a valid "file", "label" and "type" value (which is all that the HTTP-API provides as well). Can you reproduce this? What operating system and which version of XBMC are you using?
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
#5
I'm having a "similar" problem:

I call:
Code:
{"jsonrpc":"2.0","method":"Player.GetItem","id":"1","params":{"playerid":0,"properties":["title"]}}
while playing "http://streaming.hotmixradio.fm/hotmixradio-80-128.mp3"
And get
Code:
{"id":"1","jsonrpc":"2.0","result":{"item":{"label":"H o t M i x R a d i o - Hotmixradio 80 - http://www.hotmixradio.fr","title":"","type":"song"}}}

Using the HTTP-API, like the thread-creater did, I get
Code:
Filename:http://streaming.hotmixradio.fm/hotmixradio-80-128.mp3
PlayStatus:Playing
SongNo:0
Type:Audio
Title:VANESSA PARADIS - Marilyn Et John... Telechargez ce titre gratuitement sur www.hotmixradio.fr/80
URL:
Lyrics:
Samplerate:44
Thumb:DefaultAlbumCover.png
Time:06:35
Duration:
Percentage:-2147483648
File size:-1
Changed:False

I would like to get the title in the HTTP-API way, but from JSONRPC. Is there any way to get that information out of the JSONRPC-API? I tried like every function - but nothing did the job.


(I'm running Eden on Win7)

Thanks in advance!
Reply
#6
IIRC Eden doesn't have the logic yet to grab the extra details that are available. Please try a Frodo nightly/monthly build (don't forget to backup your userdata) and report back in case it doesn't work there either.
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

Logout Mark Read Team Forum Stats Members Help
GetItem with MP3 Streams on Eden0