Confused - listitems, set_info, & InfoTagVideo, and offscreen list items not working - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: Confused - listitems, set_info, & InfoTagVideo, and offscreen list items not working (/showthread.php?tid=379301) |
Confused - listitems, set_info, & InfoTagVideo, and offscreen list items not working - bossanova808 - 2024-10-30 Ok, so I have a JSON playlist I am loading in a plugin, which has the correct info I need available:
When my plugin is called in one mode ( <z mod="ctrl">PlayMedia(plugin://script.switchback/?mode=play_previous,resume)</z> ) - it loads that json and builds an (offscreen) listitem, before it sets the resolved URL to trigger playback (xbmcplugin.setResolvedUrl(plugin_instance, True, list_item) ). That works, and playback begins.What I want to happen is all that useful info to be provided to the player...I believe the idea was to use set_info to do this, and is now to instead use InfoTagVideo - is that right?I have tried all manner of both set_info and InfoTagVideo, and am currently using https://github.com/jurialmunkey/script.module.infotagger to do this:
Once the item is actually playing, I have a listener to onAVStarted which waits a couple of seconds then calls the JSON RPC Player.GetItem - but no matter what data I provide in either the tag or info labels, it always comes back with:Code:
... i..e none of that data is actually getting to the player, it seems....but it should, right? Or am I misunderstanding things here? I note that when I playback from a visible playlist (as opposed to the PlayMedia command) - then it does in fact seem like the info is getting through:Code:
So...ultimately the question is why does this not work with my dynamically created list item? (I tried setting the offscreen parameter to false, no change) ... and can I fix this?Help much appreciated - I've done several scripts, some even fairly complex ones, but I am new to plugins and am quite confused at this point... RE: Confused - listitems, set_info, & InfoTagVideo, and offscreen list items not working - MoojMidge - 2024-10-30 Try adding the playlist_type_hint=1 parameter to your PlayMedia call and see if it makes any difference.What do you actually see in the playlist window after starting playback? Are the infolabels updated? If so could try see if https://kodi.wiki/view/JSON-RPC_API/v13#XBMC.GetInfoLabels with these https://kodi.wiki/view/InfoLabels#Video_player works any better. RE: Confused - listitems, set_info, & InfoTagVideo, and offscreen list items not working - bossanova808 - 2024-10-31 Well the thing is, I am not playing back from the playlist window - the playback triggered from elsewhere (say from home, or somewhere in the video library) - by aremote key. I have tried adding playlist_type_hint=1 just now, but no change.If I view the playlist manually, it looks as expected: The issue is the _player_ is not getting this information when doing the playback. I mean - all the labels look right, but when I retrieve things via the JSON-RPC via Player.GetItem , they are all empty.But - it seems your idea of using the VideoPlayer.* etc labels is the way to go - thanks! That appears to be working a lot better!Need to do some more testing to see if it solves all the issues but in a quick test all those things seem to be populated as one would expect - awesome! RE: Confused - listitems, set_info, & InfoTagVideo, and offscreen list items not working - bossanova808 - 2024-11-02 Just following up to say that using the VideoLibrary.* labels was indeed definitely the way to go - many thanks for your help @MoojMidge! |