Thread Rating:
  • 0 Vote(s) - 0 Average
Formatting of Ratings column - drop decimal
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?
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.
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.
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?
OS: Windows 7 64-bit
XBMC: Frodo 12
Skin: Confluence

Formatting of Ratings column - drop decimal00