Kodi Community Forum

Full Version: DBID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Just wondering...

Why the DBID on home is available for tvshows but not for movies?
What DBID on home?
Well... It seems that i can do for example, this for tvshows, but not for movies.
Code:
<onload>RunScript(script.artwork.downloader,mode=custom,dbid=$INFO[ListItem.DBID],mediatype=tvshow,clearlogo)</onload>
From what i understood from Martijn is that that is because $INFO[ListItem.DBID] is empty on Home.
But then it seems, that is only the case for movies.

So i wondered if this had a reason.
Because you have no listitem ?
I have both recent movie and tvshow on home in 2 separate panels.
Then why would tvshow have a listitem and movies not?
Recently added on home (as in built-in stuff) doesn't set this for either type.
I'm using widgets. With their own content. So it should have a listitem.

Code:
<content>
    <item>
    <label>$INFO[Window(Home).Property(RecentMovie.1.Title)]</label>
    <property name="Logo">$INFO[Window(Home).Property(RecentMovie.1.Art(clearlogo))]</property>
    </item>
    <item>
    <label>$INFO[Window(Home).Property(RecentMovie.2.Title)]</label>
    <property name="Logo">$INFO[Window(Home).Property(RecentMovie.2.Art(clearlogo))]</property>
    </item>
</content>

And i can pull the logo for tv shows in an image control.
Code:
$INFO[Container(8001).ListItem.Property(Logo)]

I would think it would be up to the script supplying said widget I would think?
Alright. Well thnx, as always Smile
I'll go see if i can find my answer there.
you should at least pass the container id to the script as well...

but before going any further...what is it exactly you're trying to do?
(2012-11-17, 16:14)ronie Wrote: [ -> ]you should at least pass the container id to the script as well...

but before going any further...what is it exactly you're trying to do?

He wants to call artwork downloader from home screen so you need DBID
What i want to do is the following:

I am including the following 2 panels on home (recent tv and recent movies). With widgets, so they have content and listitem. And this works fine for both.
http://pastebin.com/g2Hy5dGF

Next to the panels i want (instead of the tvshow / movie title) to show the clearlogo. And i can only get this to work for tvshows.
I use the following, to run AD and DL the logos for tv shows:
Code:
<onload>RunScript(script.artwork.downloader,mode=custom,dbid=$INFO[ListItem.DBID],mediatype=tvshow,clearlogo)</onload>
This works fine. And yes if i want to do this for 2 containers i have to add the container ids.
For testing i was only including the movie widget, but even then (with or without container id) i can't get it to download the logos.

Using the same <onload> except with "tvshow" replaced by "movie".
It gives an error because , "movieid": } does not have a number specified.
Apparently because DBID is only available for tvshows on home. And not for movies.

So i thought this was something to do with the core and i asked what the reason was for it being only available for tvshows. But if i understand correctly now this has nothing to do with the core, and is because it is not available in the widget.

So again, if i understand correctly, i have to ask Martijn if he can also make this available for movies.
And / or why this is only available for tvshows? As i thought it might have had a reason i was not aware of.
Have you tried using Container(id).ListItem.dbid ?

It has nothing at all to do with it being at home. If anything, it has to do with there being 2 lists OR with whatever is filling those containers not providing the db id in the first place.
I didn't set any id in the script so why one would work and the other doesn't is beyond me

are you sure this currently works for tv shows MassIV?

i can think of at least three reason why this can never work at all:
- as Martijn said, skin widgets doesn't even provide a dbid
- on window load, the lists are still empty, so you can't pass a listitem to the script as there are none
- you've probably got multiple containers on home, this can be widget panels, but also your main menu and/or submenus,
so you'll always need to pass a container id to the script.
Pages: 1 2