Kodi Community Forum

Full Version: Display Chromecast Metadata
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear all,
as there seems to be no convenient way to use the original Tidal app (or other music streaming apps) to stream bitperfect to Kodi from Android and IOS I'm using Google Chromecast Audio in parallel to Kodi.

On my Kodi mediaplayer there is a display with lcdd and script.xbmc.lcdproc running. The script checks if "navigation", "music" or "video" and so on is active and displays formatted data. See https://kodi.wiki/view/LCDs#LCD.xml_for_customizing.
So I would like to display Chromecast metadata and ellapsed time as well. For this purpose I couldn't find anything in the net.

There is a great library called pychromecast for Python 3 which communicates with Chromecast easily and grabs all the information I want to display. So this part is done. For the Kodi part I want to write an add-on.

But for the Kodi framework I would kindly like to ask for some support where to start from the experts here in the forum.
I already read a lot in the wiki about Kodi add-ons, but there are open issues.
My thoughts so far:
1) Run a Python script in the background to check if Chromecast is running. Maybe as a Kodi service add-on?
2)
a) While music in playing on Chromecast, play an empty dummy audio file on Kodi.
or b) Use the External Player functionality and "emulate" a player.
or c) Switch to player "music" and set Player.isPlaying (or the like) somehow.
3) Overwrite the metadata and ellapsed time with information from Chromecast.

Other points
- plugin vs script is not 100% clear to me.
- Python API vs JSON-RPC. Which one to prefer?

Best
isto

Used system:
Regularly updated LibreELEC master with Kodi 18 on RPi2