2013-11-23, 18:01
I was thinking of displaying a movie's rating with different colors based upon the number of votes. Does anyone know of an example of this, or what the most efficient way to do it would be?
So that a movie like "The General (1926)" with a rating of a 8.3 with 35,000 votes might be displayed as a green 8.3, whereas a Uwe Boll movie such as "Legend of the Red Reaper (2013)" with its 71 vote's 7.7 shows up as a red 7.7. Diffusing the color over stars would work too.
I guess I'm looking for a way to know at a glance with minimal screen real estate how true the ratings are.
Something like:
less than 600 is red.
601 to 1500 is orange.
1501 to 3000 is yelllow.
3001 to 6000 is green.
6001 to 10,000 is blue.
So far I got:
where $VAR[value_ratingcolor] would be set like:
(I know those colors are nowhere near correct, I'll fix that problem if I can get it to work first)
but I'm not sure how to pull just the votes out of "RatingAndVotes" to pass it to the "IntegerGreaterThan" parser.
Example:
7.7 (81,897 votes)
needs to have some coding equivalent of
(6th from the left) through (7th from the right)
something like
IntegerGreaterThan(Right(Left(ListItem.Property(RatingAndVotes),6),7),6000)
to pull the 81,897 out of the string to be able compare it with. (and probably something to strip the comma out too)
I've rummaged through about 5 skins and the wiki and can find no examples, any ideas?
I noticed that there is a future InfoLabel named ListItem.Votes planned for Gotham, but what can be done currently under Frodo to accomplish this?
So that a movie like "The General (1926)" with a rating of a 8.3 with 35,000 votes might be displayed as a green 8.3, whereas a Uwe Boll movie such as "Legend of the Red Reaper (2013)" with its 71 vote's 7.7 shows up as a red 7.7. Diffusing the color over stars would work too.
I guess I'm looking for a way to know at a glance with minimal screen real estate how true the ratings are.
Something like:
less than 600 is red.
601 to 1500 is orange.
1501 to 3000 is yelllow.
3001 to 6000 is green.
6001 to 10,000 is blue.
So far I got:
Code:
<control type="label">
<posx>13</posx>
<posy>1.5</posy>
<width>89</width>
<height>50</height>
<align>center</align>
<aligny>center</aligny>
<font>Font_20B</font>
<textcolor>$VAR[value_ratingcolor]</textcolor>
<fadetime>FanartCrossFadeTime</fadetime>
<label>$INFO[ListItem.Rating]</label>
</control>
Code:
<variable name="value_ratingcolor">
<value condition="!IntegerGreaterThan(ListItem.Property(RatingAndVotes),600)">FFFFFFFF</value>
<value condition="IntegerGreaterThan(ListItem.Property(RatingAndVotes),600) + !IntegerGreaterThan(ListItem.Property(RatingAndVotes),1500)">EEFFFFFF</value>
<value condition="IntegerGreaterThan(ListItem.Property(RatingAndVotes),1500) + !IntegerGreaterThan(ListItem.Property(RatingAndVotes),3000)">DDFFFFFF</value>
<value condition="IntegerGreaterThan(ListItem.Property(RatingAndVotes),3000) + !IntegerGreaterThan(ListItem.Property(RatingAndVotes),6000)">CCFFFFFF</value>
<value condition="IntegerGreaterThan(ListItem.Property(RatingAndVotes),6000)">BBFFFFFF</value>
</variable>
but I'm not sure how to pull just the votes out of "RatingAndVotes" to pass it to the "IntegerGreaterThan" parser.
Example:
7.7 (81,897 votes)
needs to have some coding equivalent of
(6th from the left) through (7th from the right)
something like
IntegerGreaterThan(Right(Left(ListItem.Property(RatingAndVotes),6),7),6000)
to pull the 81,897 out of the string to be able compare it with. (and probably something to strip the comma out too)
I've rummaged through about 5 skins and the wiki and can find no examples, any ideas?
I noticed that there is a future InfoLabel named ListItem.Votes planned for Gotham, but what can be done currently under Frodo to accomplish this?