Getting ListItem from Estuary Home
#1
Hello.

I've tried to find an answer, but no luck there.

We are using ListItem properties to get item information in plugin:
Code:
xbmc.getInfoLabel("ListItem.Label")

But found that in Estuary if you open item from list of Movies - ListItem is populated, but when opening from Home screen - it is empty.

What is the valid way to get item information in this case?

Thanks
Reply
#2
use "Container.ListItem.Label" or "Container(xx).ListItem.Label"
Reply
#3
(2017-02-16, 14:22)BigNoid Wrote: use "Container.ListItem.Label" or "Container(xx).ListItem.Label"

Sorry, tried with Container and Container(0) and tried different values like 25, 50-55, without luck. It's always empty value...
If I understand correctly, user can play video from last videos, unwatched, and other sections, and all of them have different container id's ?
Reply
#4
Ah yeah, Container.ListItem.Label will only work in nightlies. For Krypton use Container(xx).ListItem.Label where xx is the currently focused container. You can find the control id by enabling skin debugging: "Skin.ToggleDebug" and focus the container you want to fetch the info from.
Reply
#5
(2017-02-16, 19:34)BigNoid Wrote: Ah yeah, Container.ListItem.Label will only work in nightlies. For Krypton use Container(xx).ListItem.Label where xx is the currently focused container. You can find the control id by enabling skin debugging: "Skin.ToggleDebug" and focus the container you want to fetch the info from.
That does not work as well. I've turned on toggledebug, I see window IDs, also found a Home.xml of Estuary skin.
Movies listed in widgets. I've tried with like Container(5200).ListItem(0).Label , and it's always empy.
Have no ideas how to get that items.
Reply
#6
Tried different ways to overcome this. I would query json-rpc to find information about the item, that is played now. But at the moment gets to the plugin - I have only url, inside of a strm file, not even the file name to query for "filenameandpath"..

Any way to fetch item information from library, without writing additional information to strm file?
Reply
#7
(2017-02-21, 09:54)elgatito Wrote: Tried different ways to overcome this. I would query json-rpc to find information about the item, that is played now. But at the moment gets to the plugin - I have only url, inside of a strm file, not even the file name to query for "filenameandpath"..

I think I need to do the same thing as you in my addon and I also tried several things, but just one thing worked "almost":

Don't use a .strm file, use a small dummy .mp4 file. In my case all "*.BIUvideo.mp4" files get special treadment from the addon (the addon looks in an indexfile what video the user wants to play).

Disadvantage is that all library entries have the same streamdetails of the small dummy .mp4 file (= not OK for my use case).


Would love a (video)player.strmpathandfilename or (video)player.strmpath & (video)player.strmfilename infolabel.

At the moment my addon doesn't work when the user clicks on a movie in the estuary homescreen when using .strm files, and shows no correct streamdetails info (but works everywhere) when using the .mp4 trick...

(2017-02-21, 09:54)elgatito Wrote: Any way to fetch item information from library, without writing additional information to strm file?

Not at this moment (I very much wish to be proven wrong Wink). I write extra info in a BIUinfo.xml (index)file.
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#8
(2017-02-21, 14:12)Wimpie Wrote: I write extra info in a BIUinfo.xml (index)file.


What is the info.xml file?
Reply
#9
(2017-02-21, 18:09)elgatito Wrote:
(2017-02-21, 14:12)Wimpie Wrote: I write extra info in a BIUinfo.xml (index)file.

What is the info.xml file?

Check out the source code Big Grin.


It is a file I create for my addon that contains the link between the .BIUvideo.mp4 file and the video the user wants to play.

This is my version of: "writing additional information to strm file".

Here you have a part of such a BIUinfo.xml file:

Code:
<?xml version="1.0" encoding="utf-8"?>
<directorydetails>
  <video filename="s00e02.BIUvideo.mp4">
    <isofile>.BIUfiles/Firefly.s01e01.s01e02.s01e03.s01e04.BluRay.iso</isofile>
    <playlist>00006</playlist>
    <starttime></starttime>
    <stoptime></stoptime>
    <audiochannel></audiochannel>
    <subtitlechannel></subtitlechannel>
  </video>
  <video filename="s00e04.BIUvideo.mp4">
    <isofile>.BIUfiles/Firefly.s01e05.s01e06.s01e07.s01e08.s01e09.BluRay.iso</isofile>
    <playlist>00007</playlist>
    <starttime></starttime>
    <stoptime></stoptime>
    <audiochannel></audiochannel>
    <subtitlechannel></subtitlechannel>
  </video>
  <video filename="s01e01.BIUvideo.mp4">

The addon checks if the played file ends on ".BIUvideo.mp4".

If yes, then the addon looks inside this BIUinfo.xml file for the video - filename attribute (eg <video filename="s00e04.BIUvideo.mp4">).

If the started video has the same filename as that filename attribute, then the user wants to see that video (ie s00e04. of this tv show).

In that case, the addon starts to play mpls 00007 in the correct iso (Firefly.s01e05.s01e06.s01e07.s01e08.s01e09.BluRay.iso). You would play in this location whatever url you want to watch.
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#10
Okay. I'm now populating ListItem with values I get when found a movie with JSON RPC. I'm setting DBID, DBTYPE as well.

So now I see video information, plot, posters and so on, but when xbmc fires up triggers like onUpdate I see ID is empty.
Can't find a way to set it, so it uses it in requests?
Reply
#11
I'm not following here what you are asking.

Please elaborate a bit more...
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#12
Movies added to the library with strm files. When Kodi starts a play plugin reads ListItem values, but when starting from Estuary home screen - it's empty as there is no "ListItem".
I am manually setting ListItem values if needed:

Code:
item = xbmcgui.ListItem(
                path=response.geturl(),
                label=xbmc.getInfoLabel("ListItem.Label"),
                label2=xbmc.getInfoLabel("ListItem.label2"),
                thumbnailImage=xbmc.getInfoLabel("ListItem.Art(thumb)"))


          .....
          item.setInfo(type='Video', infoLabels=infoLabels)

So I see all that information like the Title and the year in a Player. But when Kodi fires notifications like "onplay", "onupdate" and so on it does not give an ID for this movie.

So I'm asking how to set it correctly, if that is possible.
Reply
#13
I've got, that when setting this in the plugin
Code:
xbmcplugin.setProperty(HANDLE, key, value)
where key/value are ListItem labels, which I get from JSON-API. then Kodi makes correct requests to onPlay/onSeek/etc notifications.
Reply

Logout Mark Read Team Forum Stats Members Help
Getting ListItem from Estuary Home0