Home Screen Container Property Query

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
BlackRose Offline
Senior Member
Posts: 117
Joined: Sep 2008
Reputation: 0
Post: #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?
(This post was last modified: 2012-05-09 12:02 by BlackRose.)
find quote
`Black Offline
Team-Kodi Member
Posts: 2,436
Joined: Apr 2009
Reputation: 72
Location: Germany
Post: #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: xp1080-21.png]
find quote
BlackRose Offline
Senior Member
Posts: 117
Joined: Sep 2008
Reputation: 0
Post: #3
Much appreciated! I thinking I spotted my mistake from your description... My bad. Thanks for taking the time to reply!
find quote
BlackRose Offline
Senior Member
Posts: 117
Joined: Sep 2008
Reputation: 0
Post: #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 wrongConfused
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,864
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #5
How many stars do they have in the actual music library?
find quote
BlackRose Offline
Senior Member
Posts: 117
Joined: Sep 2008
Reputation: 0
Post: #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.
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,864
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #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.
(This post was last modified: 2012-05-26 17:03 by Hitcher.)
find quote
BlackRose Offline
Senior Member
Posts: 117
Joined: Sep 2008
Reputation: 0
Post: #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.
find quote
ronie Offline
Team-Kodi Member
Posts: 9,314
Joined: Jan 2009
Reputation: 161
Post: #9
have you tried LatestAlbum.[1-10].Rating in a label control to see what value is actually returned instead of counting stars? :-)

Always read the Kodi online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
BlackRose Offline
Senior Member
Posts: 117
Joined: Sep 2008
Reputation: 0
Post: #10
I'll give that a go now! Obvious place to start, duh!
find quote
BlackRose Offline
Senior Member
Posts: 117
Joined: Sep 2008
Reputation: 0
Post: #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!
find quote