v15 display TV channel logo's remotely
#1
I have installed channel logo's for my TV channels, and I want to show them when a channels is currently displaying.
Via jsonrpc I'm obtaining the thumbnail location which is pointing to the location on the server running Kodi (RPi3, OpenElec, 6.0.3).

Is there a way to obtain the channel logo's from the Kodi server, preferably via http?

I'm using the following jsonrpc request:
Code:
http://<host>:<port>/jsonrpc?request={"jsonrpc": "2.0", "method": "Player.GetItem", "params": {"properties": ["title", "album", "artist", "season", "episode", "duration", "showtitle", "tvshowid", "thumbnail", "fanart"], "playerid":1}, "id": 1}

The response:
Code:
{"id":1,"jsonrpc":"2.0","result":{"item":{"fanart":"","id":100,"label":"RTL 5","thumbnail":"image://%2fstorage%2f.kodi%2fsystem%2frtl%205.png/","title":"De grote improvisatieshow","type":"channel"}}}

So the thumnail location:
image:///storage/.kodi/system/rtl 5.png/

Edit (2016-12-17): Created a sdcard with Kodi 16.1, and found that the channel logo's should probably not be installed in .kodi. Moved the icons to /storage/tv/logos/
The behavior is the same as far as I tested.
Reply
#2
Found I can use 'Files.PrepareDownload' for this.

With the following jsonrpc request I can obtain the location:
Code:
http://<host>:<port>/jsonrpc?request={"jsonrpc": "2.0", "method": "Files.preparedownload", "params": { "path": "/storage/.kodi/system/rtl 5.png" }, "id": 1}

The response:
Code:
{"id":1,"jsonrpc":"2.0","result":{"details":{"path":"vfs/%2fstorage%2f.kodi%2fsystem%2frtl%205.png"},"mode":"redirect","protocol":"http"}}

According the forum [1] I should take the whole path and add it to 'http://<host>/image/', but to make it work I need to also remove 'vfs/' (virtual filesystem):
Code:
http://<host>:<port>/image/%2fstorage%2f.kodi%2fsystem%2frtl%205.png
works in a browser.

[1a] http://forum.kodi.tv/showthread.php?tid=98551 (and search for PrepareDownload gives 2 hits, both interesting to read)
[1b] http://forum.kodi.tv/showthread.php?tid=249696
[1c] http://forum.kodi.tv/showthread.php?tid=205539
Reply

Logout Mark Read Team Forum Stats Members Help
display TV channel logo's remotely0