Kodi Community Forum
Formatting of Ratings column - drop decimal - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Skins Support (https://forum.kodi.tv/forumdisplay.php?fid=67)
+---- Forum: Confluence (https://forum.kodi.tv/forumdisplay.php?fid=125)
+---- Thread: Formatting of Ratings column - drop decimal (/showthread.php?tid=105308)



Formatting of Ratings column - drop decimal - sub0ptimal - 2011-07-11

I am using Confluence with the imdb scraper. I am hosting the XBMC database in mySQL on my NAS. I am knowledgeable about programming in general but not XBMC skinning.

When the IMDB scraper pulls down the ratings, they are stored in column c05 in mySQL. I would like to use my own ratings in e.g. Media Info view. Initially this will be the Critics rating from Rotten Tomatoes. I've written a script that will pull down the Rotten Tomatoes rating and store it in column c05 in the Movies table. Unfortunately, the default Media Info view in XBMC formats the rating as xx.x, so for example a rating of 71% on RT is displayed as "71.0".

Basically, I just need to change Confluence to format the rating as a whole integer and not try to format using a decimal point.

Any suggestions?


RE: Formatting of Ratings column - drop decimal - wellspokenman - 2012-09-10

why don't you reformat the integer in your script? seems that all you need to do is divide each integer by 10 and loop it.


RE: Formatting of Ratings column - drop decimal - sub0ptimal - 2013-02-01

I just now saw your response.

XBMC formats with a decimal point, even if none exists in the database. So if I pull a RT rating of 77, even if I write "77" in the database, it comes out as "77.0" in the UI. Tested with Eden and Frodo.


RE: Formatting of Ratings column - drop decimal - dracula - 2013-02-04

I think his idea is to adjust your script so it outputs values 0-10 instead of 0-100.
So instead of writing 71 in the database, you write 7.1, which will then nicely be displayed as such in Confluence.

After all... a rating of 71 on a scale of 100 (%) is just exactly the same as 7.1 on a scale of 10 isn't it?