Kodi Community Forum
JSON RPC Player.Open artwork and name ? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174)
+---- Thread: JSON RPC Player.Open artwork and name ? (/showthread.php?tid=368120)



JSON RPC Player.Open artwork and name ? - jbinkley60 - 2022-05-03

I have a Python addon where I am using the following JSON RPC call to play a URL. 

xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"Player.Open",  "params":{"item":{"file":%s }},"id":1}' % (itemurl))  

It works fine but I'd like to add a poster / icon to the player and maybe substitute a different name other than the URL, like playing a ListItem.  Can the poster and name be set via an RPC call ?  I haven't been able to find an example or anything in the documentation.  If so, is it set before or after calling the player ?


Thanks,

Jeff


RE: JSON RPC Player.Open artwork and name ? - jbinkley60 - 2022-05-04

(2022-05-03, 16:19)jbinkley60 Wrote: I have a Python addon where I am using the following JSON RPC call to play a URL. 

xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"Player.Open",  "params":{"item":{"file":%s }},"id":1}' % (itemurl))  

It works fine but I'd like to add a poster / icon to the player and maybe substitute a different name other than the URL, like playing a ListItem.  Can the poster and name be set via an RPC call ?  I haven't been able to find an example or anything in the documentation.  If so, is it set before or after calling the player ?


Thanks,

Jeff

Looking back through this topic I see that this question has been asked multiple times here without an answer.  I decided to abandon the JSON RPC approach for now and just use the traditional listitem approach with xbmc.Player().play(itemurl, listitem) and listitem.setArt  .  It works perfectly.


Jeff