Home Screen Container Property Query
#1
Hi Guys

I have been playing with code for the last few weeks, trying to wrap my head around coding with the intention to helping out in the not too distant future. For now, lets just say, coding is hard as hell. Never had a clue.

Anyhow, trying to figure out how to display album details on the home screen. I am indeed trying to figure out "Latest/Recently Added" widget stuff, but album/artist related details are baffling me a bit. I use the following to call info to the home screen: Container(id).ListItem.Property()

I have used this method successfully with my video library, quoting various details like "Plot Summary" and "Year" successfully on the home screen. In terms of Albums/Artist details, I can't for the life of me get any details to display on the Home Screen. I can use Container(id).ListItem.Label and this displays "Artist" and "Album" successfully. Unfortunately, I cannot get Container(id).ListItem.Property() to work with anything.

I have tried "ListItem.Property(Summary)" for the album review and "ListItem.Property(Year)" for the album release year, but have had no luck. Do these tags even exist for Album related information? If so, where can I find a list of these properties I can use. I have checked the WIKI, but yeah, I'm a girl, so I may have missed a specific page. My structure is as follows for displaying info.

<label>$INFO[Container(7455).ListItem.Property(Summary)</label>

Furthermore, have had a problem with the album rating not displaying properly on the Home Screen as well. "Container(id).ListItem.Property(rating), rating, .png" works for Movies, but not Albums. Any help super code masters?
Reply
#2
The following info labes are available on the home screen for recently added albums & songs

PHP Code:
LatestAlbum.[1-10].TitleLatestAlbum.[1-10].ArtistLatestAlbum.[1-10].YearLatestAlbum.[1-10].RatingLatestAlbum.[1-10].ThumbLatestAlbum.[1-10].FanartLatestAlbum.[1-10].Path

LatestSong
.[1-10].TitleLatestSong.[1-10].ArtistLatestSong.[1-10].AlbumLatestSong.[1-10].YearLatestSong.[1-10].RatingLatestSong.[1-10].ThumbLatestSong.[1-10].FanartLatestSong.[1-10].Path 

So if you want to display i.e. the album year of the most recent album on the home screen, you do this by Window(Home).Property(LatestAlbum.1.Year). If you have a container for recently added albums, you would probably add something like

PHP Code:
<item id="1">
    [...]
    <
property name="year">Window(Home).Property(LatestAlbum.1.Year)</property>
</
item>
<
item id="2">
    [...]
    <
property name="year">Window(Home).Property(LatestAlbum.2.Year)</property>
</
item>
[....] 

to your container items and then access it via Container(id).ListItem.Property(year) in the item- and focusedlayout.
Image
Reply
#3
Much appreciated! I thinking I spotted my mistake from your description... My bad. Thanks for taking the time to reply!
Reply
#4
Redoing everything for my mod, so I would like to something more in relation to the Recent Items section. I'm having some issues with this Property container:

LatestAlbum.[1-10].Rating

I have used a similar Property container with Latest Movies and Latest TV Shows and they work perfectly. In terms of Music, the number of stars displayed is either 4 or 5 out of 5 or nothing at all. It is very erratic and does not display stars for most of the items in my list. It works perfectly for Movies and TV Shows though. For me, this happens in Aeon Nox 2 and 3 as well, and they use the same "Items" and "Property" lists as me.

Any idea what I may be doing wrongHuh
Reply
#5
How many stars do they have in the actual music library?
Reply
#6
(2012-05-26, 12:49)Hitcher Wrote: How many stars do they have in the actual music library?

5 stars like in the Movies/TV Shows section.
Reply
#7
I meant their actually star rating - 4/5, 5/5.

In other words, they'll only show the rating that was scraped and a lot of the time there isn't one.
Reply
#8
All ratings were scraped already and are perfect in the Music DB. It's just that, it never shows the correct rating on the home screen Recently Added Albums section. In other words, the rating displayed is never equivalent to the actual rating of the item, but sometimes it does show a rating, although this is incorrect for the specific item. Other items have no ratings, even though those items have a rating in the Music DB and when in the Music section. I wonder if that makes sense. The same code works for Recently added Movies and TV Shows. I just can't figure out why this isn't working, and why the same thing is happening in Aeon Nox, which has very similar code in terms of Property containers.
Reply
#9
have you tried LatestAlbum.[1-10].Rating in a label control to see what value is actually returned instead of counting stars? :-)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#10
I'll give that a go now! Obvious place to start, duh!
Reply
#11
Figured it out. Silly me. I was referencing the wrong thing. Thats what happens when u copy and paste code and don't scan its occupants correctly. My bad! Sorry!
Reply

Logout Mark Read Team Forum Stats Members Help
Home Screen Container Property Query0