2015-07-08, 15:54
(2015-07-08, 10:25)Steveb Wrote:(2015-07-08, 07:38)mtoddster Wrote: Hey.
I'm trying to figure out to show the correct IMDB rating. They all are rounding to the closest whole number instead of displaying the correct number.
For example if a episode has a rating of 8.2 it round to 8 and if it has a rating of 8.8 it will round to 9.
With my limited knowledge of python I tried to change the rating from a round to floating number but this will display the rating as "8.2310000001" instead of 8.2.
Anyone with a better knowledge of python know how to pull the correct rating?
You will need to set the decimal places in the float function.
rating = str(round(float(self.item['rating']),1)) should work.
Please submit a pull request and I'll include it in a future update