Formatting of Ratings column - drop decimal

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
sub0ptimal Offline
Junior Member
Posts: 26
Joined: Apr 2011
Reputation: 0
Post: #1
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?
find quote
wellspokenman Offline
Senior Member
Posts: 117
Joined: Jul 2012
Reputation: 1
Post: #2
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.
find quote
sub0ptimal Offline
Junior Member
Posts: 26
Joined: Apr 2011
Reputation: 0
Post: #3
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.
find quote
dracula Offline
Junior Member
Posts: 38
Joined: Jul 2012
Reputation: 0
Location: NL
Post: #4
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
find quote