Kodi Community Forum

Full Version: setResolvedUrl and ListItem Inheritance
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I'm working on my first video addon. I added a strm file to the library and the video gets successfully scraped, so all information like series name, episode number, etc. is available when browsing the library.
When I select the video, my plugin gets called. It creates a ListItem(path=url) and calls setResolvedUrl. The video starts to play.

However, in the 'Now Playing' screen, no metadata gets displayed (no thumbnail, no plot, no season/episode number, no title).

An old post says
Quote:A ListItem instance passed via setResolvedUrl() inherits all metadata from the directory item it has been called from. So usually you don't need to set any properties for setResolvedUrl() call, except for an actual playable path.
This seems not to be true. Is this a bug? Am I doing something wrong?
Look at xbmc.listitem

Set thumbnail with mylistitem.setart.
Set plot with mylistitem.setinfo

Now play URL with the created mylistitem and you should have metadata.
I know that I can set all the infos manually with setInfo() and setArt().
However, this is cumbersome, because the information is not available to my plugin out of the box and kodi could just use the information it already has on the list item and propagate it to the player, as described in the original post.

If someone would guide me where to look in the kodi source code, I'll gladly prepare a PR.
Wrote something not correct, never mind...