2019-07-19, 16:17
(2019-07-19, 03:06)edjalmo Wrote:@edjalmo thank you for going the extra mile and providing code! I knew how to do it this way, I just did not want to add that many variable conditions. Since you have gone to the trouble of finding a solution and writing the code, I will add to the skin in the next update.(2019-07-18, 19:00)edjalmo Wrote: Hi @bsoriano!I think I found the answer!
I found the answer for how to show Rotten Tomatoes scores in %.
First I found this thread that sended me to this other post.
But even this way I don't know how to proceed. So, I sended a message to @K0D1User1138 (the guy that asked for this in thread) asking if he could help me, and Voila, he can!
What you need to do is create a variable for each rating to show the decimal scraped rating as a percent
Like this:
And put this in Includes_Variables.xmlxml:<variable name="RottenFreshLabelVar">
<value condition="Integer.IsEqual(ListItem.Rating(tomatometerallcritics),0.0)">0</value>
<value condition="Integer.IsEqual(ListItem.Rating(tomatometerallcritics),0.1)">1</value>
<value condition="Integer.IsEqual(ListItem.Rating(tomatometerallcritics),0.2)">2</value>
<value condition="Integer.IsEqual(ListItem.Rating(tomatometerallcritics),0.3)">3</value>
<value condition="Integer.IsEqual(ListItem.Rating(tomatometerallcritics),0.4)">4</value>
<value condition="Integer.IsEqual(ListItem.Rating(tomatometerallcritics),0.5)">5</value>
...
</variable>
In DialogVideoInfo you just put % in this linesYou have to creat a variable for TheMovieDB (I created in the files in the end. I don't know if is correctly).xml:<label>$VAR[RottenFreshLabelVar]%</label>
But (there comes the but), when I did this some ratings don't shows correctly. Like, if some movie had 85% they will show 80%, I don't know why. Maybe I had put things in wrong place, I don't know.
I could not solve this. I hope you or @K0D1User1138 can!
Here the DialogVideoInfo with modifications: https://paste.kodi.tv/buweqaxale.kodi
And here the Includes_Variables: https://paste.kodi.tv/wabamaxone.kodi
The problem was that I was using a Integer value in condition, but ratings are a String value.
So, I just replaced all to fix!
See the new Includes_Variables: https://paste.kodi.tv/ukufupiqom.kodi
And the DialogVideoInfo: https://paste.kodi.tv/buweqaxale.kodi
I hope I don't have mess up anything in code!
Regards,
Bart