Opened 11 years ago

Closed 11 years ago

Last modified 4 years ago

#7810 closed defect (fixed)

Fraction part of star rating

Reported by: savvy_steve@… Owned by: stuartm
Priority: trivial Milestone: 0.24
Component: MythTV - General Version: head
Severity: low Keywords:
Cc: Ticket locked: yes


The MythFrontend no longer shows the fraction part of the star rating for recordings. Having a 2.98/4 star movie show up in the frontend as a 2/4 star movie is quite misleading.

This looks to have been broken in rev 19939 of programinfo.cpp where a cast to (int) was made of the stars value. Can the cast to int be removed from lines 1057/1064 of rev 23012? (change (int)(stars * 4) to (stars * 4)).

Change History (10)

comment:1 Changed 11 years ago by stuartm

The cast to int cannot be removed, QObject::tr() only accepts integer values. We could however round to the nearest integer first.

I'd prefer to switch to a base of 5 or 10, I'm told that 4 star ratings are common in the US but everywhere else this simply doesn't give the granularity required. It's too black/white, there is no median. Before anyone points out that 4 is actually 5 if you include 0, well zero is also the value applied when there is no rating at all, has a great film not been rated or is it just really bad?

comment:2 Changed 11 years ago by Nick Morrott <knowledgejunkie (at) gmail (dot) com>

As the maintainer of the _uk_rt XMLTV grabber, it would be nice if ratings units/range could be specific to the listings source - if this data is provided.

The _uk_rt grabber can provide two ratings, and both provide an absolute rating and the range:

    <star-rating system="Radio Times Film Rating">
    <star-rating system="Radio Times Recommendation">

comment:3 Changed 11 years ago by savvy_steve@…

I am not familiar with the QObject::tr() method. I assume the cast is required with the change QT4 and the mythui library in version 0.22 as it showed fractions in version 0.21.

Would it accept a string value through from say, sprintf, formatting the rating with a couple of decimal points?

Otherwise I guess making the rating base configurable would be another option as the rating is stored as a percentage in the db. I beleive MythWeb already allows this but at the moment the base for the frontend looks to just be a magic number in the code. But I spose that may not be as trivial to fix as I first thought though.

comment:4 Changed 11 years ago by robertm

Milestone: 0.23unknown

Setting milestone to MythTV 1.0 for not reading the ticket howto and setting your own milestone.

Wouldn't that be fun...

comment:5 Changed 11 years ago by robertm

Owner: changed from Isaac Richards to stuartm
Status: newassigned

comment:6 Changed 11 years ago by stuartm

Milestone: unknown0.24
Status: assignedaccepted
Type: enhancementdefect

Nick: We can't represent the rating graphically if we don't work with a fixed range and it wouldn't make sense from a UI perspective for the numerical value not to match up with the graphics.

savvy_steve: We're not going back to float ratings, that ship has sailed. It's neither consistent, logical nor practical. We also won't add settings to change the rating base either, we're trying to reduce settings currently not increase them and my reply to Nick also stands here.

I will fix any code that isn't already rounding to the _nearest_ integer and then close this ticket.

comment:7 Changed 11 years ago by savvy_steve@…

Would you consider rounding to the nearest half?

comment:8 Changed 11 years ago by stuartm

Resolution: fixed
Status: acceptedclosed

(In [25778]) Switch to ratings base of 10. This is the best fit for most ratings systems worldwide which use multiples of 5 for the range usually 5, 10 or 100. It gives some fidelity to the ratings without requiring that we display fractions. Consistency throughout the UI is another good reason for making this change, with mythvideo and mythmusic both using the same range. Closes #7810, the rounding error having already been fixed in trunk.

comment:9 Changed 11 years ago by stuartm

Ticket locked: set

comment:10 Changed 4 years ago by Karl Dietz <dekarl@…>

In 4cfbe87aecd05e399d4e2732c90a4018a361ec70/mythtv:

Round star rating to nearest full star out of 10

Pointed out by Jan Schneider
Refs #7810

Note: See TracTickets for help on using tickets.