Posts: 995
Joined: Apr 2009
Reputation:
60
nessus
Skilled Skinner
Posts: 995
The missing slash closing the visible tag is a typo ?
Posts: 17,390
Joined: Aug 2007
Reputation:
583
Hitcher
Team-Kodi Member
Posts: 17,390
Yes, corrected my post. Thanks.
Posts: 995
Joined: Apr 2009
Reputation:
60
nessus
Skilled Skinner
Posts: 995
AFAIK that was not working. I use IsEmpty(ListItem.Rating) if i want to hide empty ratings (star or numbers).
Cheers
Nessus
Posts: 3,919
Joined: Jul 2010
Reputation:
154
BigNoid
Team-Kodi Member
Posts: 3,919
2014-04-24, 15:21
(This post was last modified: 2014-04-24, 15:31 by BigNoid.)
!IsEmpty(ListItem.StarRating) does work on the parent folder item.
EDIT: nvm that last part
EDIT2: okay on album level it doesnt return rating0.png if there's no rating and on song level it does. I knew there was a reason why i use fallback="rating0.png"
Posts: 17,390
Joined: Aug 2007
Reputation:
583
Hitcher
Team-Kodi Member
Posts: 17,390
Confluence > ViewMusicLibrary.xml
Add <visible>!IsEmpty(ListItem.StarRating)</visible> to the fadelabel control at line 443.
View your albums using the 'Fanart' viewmode - albums with no ratings will show no stars but the label 'Rating:' is still visible.
Thanks.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
As far as I can tell, ListItem.StarRating will return an empty string if there is no videoinfotag and no musicinfotag in the item. Otherwise it will return "rating0.png" through "rating5.png" based on the assigned rating.
i.e. it returns empty for the "All Albums" item and the parent directory item. But it won't return empty (rather "rating0.png") for anything that is rated 0.
I'm not sure if this is something that should be changed or not. It's easy enough to add a check for rating > 0 in there.
Opinions?
(In the meantime, if you hide it if it's empty or "rating0.png" you should get what you want)
Cheers,
Jonathan
Posts: 3,919
Joined: Jul 2010
Reputation:
154
BigNoid
Team-Kodi Member
Posts: 3,919
adding fallback="rating0.png" (for albums) is good enough for me, eg no change is needed.
Posts: 17,390
Joined: Aug 2007
Reputation:
583
Hitcher
Team-Kodi Member
Posts: 17,390
I've just had a look at my music database and I think the problem is some of my albums have a negative value for the rating field. There are also loads with nothing in this field (as opposed to zero) so does this mean there isn't a rating (which is why I'd like to hide that line altogether) or they are 0?
Thanks.