2016-03-23, 09:12
For my kodi audio box (raspberry pi), I am writing a simple python HTTP server that listens for commands coming from other devices (e.g. android) that contain a link to audio podcasts, and then uses JSON to have Kodi play back the URL / stream.
I could get this to work using "Player.Open" the issue is that the "Song title" that Kodi assumes is the filename of the audio file being played (podcasts many times do not contain metadata), and Player.Open doesn't seem to accept other parameters such as title.
I have been looking for a JSON call to allow me to override the "song title" for the currently played song (URL / stream) but couldn't find one, does that exist?
(details/example below)
Similarly, my script also supports queueing podcasts and the same issue with the podcast 'title' arises, I would like to override the title of a queued stream/podcast.
__________________________________________________
Sample trace from my python script:
Media link found: http://open.live.bbc.co.uk/mediaselector...3nqg8q.mp3
JSON call API command: {'jsonrpc': '2.0', 'method': 'JSONRPC.Ping', 'id': 1}
JSON call API: url: http://localhost:8080/jsonrpc
JSON call API: returned status: 200
JSON call API: returned text: {"id":1,"jsonrpc":"2.0","result":"pong"}
JSON command processed successfully
Kodi Ping: alive!
JSON call API command: {'jsonrpc': '2.0', 'method': 'Player.GetActivePlayers', 'id': 1}
JSON call API: url: http://localhost:8080/jsonrpc
JSON call API: returned status: 200
JSON call API: returned text: {"id":1,"jsonrpc":"2.0","result":[]}
JSON command processed successfully
Kodi Players: not active
JSON call API command: {'params': {'item': {'file': 'http://open.live.bbc.co.uk/mediaselector/5/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p03nqg8q.mp3'}}, 'jsonrpc': '2.0', 'method': 'Player.Open', 'id': 1}
JSON call API: url: http://localhost:8080/jsonrpc
JSON call API: returned status: 200
This causes Kodi to start playing the BBC podcast, and Kodi displays the "song tilte" in Now Playing as: "p03nqg8q.mp3"; I would like to override this and have Kodi display "BBC News Hour" instead.
I could get this to work using "Player.Open" the issue is that the "Song title" that Kodi assumes is the filename of the audio file being played (podcasts many times do not contain metadata), and Player.Open doesn't seem to accept other parameters such as title.
I have been looking for a JSON call to allow me to override the "song title" for the currently played song (URL / stream) but couldn't find one, does that exist?
(details/example below)
Similarly, my script also supports queueing podcasts and the same issue with the podcast 'title' arises, I would like to override the title of a queued stream/podcast.
__________________________________________________
Sample trace from my python script:
Media link found: http://open.live.bbc.co.uk/mediaselector...3nqg8q.mp3
JSON call API command: {'jsonrpc': '2.0', 'method': 'JSONRPC.Ping', 'id': 1}
JSON call API: url: http://localhost:8080/jsonrpc
JSON call API: returned status: 200
JSON call API: returned text: {"id":1,"jsonrpc":"2.0","result":"pong"}
JSON command processed successfully
Kodi Ping: alive!
JSON call API command: {'jsonrpc': '2.0', 'method': 'Player.GetActivePlayers', 'id': 1}
JSON call API: url: http://localhost:8080/jsonrpc
JSON call API: returned status: 200
JSON call API: returned text: {"id":1,"jsonrpc":"2.0","result":[]}
JSON command processed successfully
Kodi Players: not active
JSON call API command: {'params': {'item': {'file': 'http://open.live.bbc.co.uk/mediaselector/5/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p03nqg8q.mp3'}}, 'jsonrpc': '2.0', 'method': 'Player.Open', 'id': 1}
JSON call API: url: http://localhost:8080/jsonrpc
JSON call API: returned status: 200
This causes Kodi to start playing the BBC podcast, and Kodi displays the "song tilte" in Now Playing as: "p03nqg8q.mp3"; I would like to override this and have Kodi display "BBC News Hour" instead.