Opened 18 years ago
Closed 17 years ago
#2567 closed defect (fixed)
mythfilldatabase incorrectly parses "rating" in XMLTV
Reported by: | Max Barry | Owned by: | danielk |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | mythtv | Version: | 0.20 |
Severity: | low | Keywords: | mythfilldatabase xmltv |
Cc: | Ticket locked: | no |
Description
XMLTV can include multiple <rating> tags for a single program, for example:
<programme ... <rating system="ABA"> <value>M</value> </rating> <rating system="advisory"> <value>Adult Themes</value> </rating> <rating system="advisory"> <value>Violence</value> </rating> <rating system="advisory"> <value>Drug Use</value> </rating>
mythfilldatabase tries to concatenate these together, but the database schema allows only 8 characters. The result is that the rating for this program in MythTV looks like this: "Adult th".
From {mythtv}/programs/mythfilldatabase/filldata.cpp:
// again, the structure of ratings seems poorly represented // in the XML. no idea what we'd do with multiple values. ProgRating rating; rating.system = info.attribute("system", ""); rating.rating = getFirstText(item); if ("" != rating.system) pginfo->ratings.append(rating);
... and from the mythconverg.programrating table:
rating CHAR(8) NOT NULL
Ideally, MythTV should be able to display the rating as: "(M) Adult Themes, Violence, Drug Use". Failing that, mythfilldatabase should probably drop ratings using the "advisory" system when there's an alternative present, since "M" is more informative than "Adult Th".
Change History (4)
comment:1 Changed 18 years ago by
Owner: | changed from Isaac Richards to danielk |
---|
comment:2 Changed 18 years ago by
Milestone: | unknown → 0.21 |
---|
If you change the rating string to 16 characters then the DB info is correct, right?
At that point it should just a problem with what gets show in the UI, we could add a preference for showing a non-advisory rating first.. In what part of the UI are you seeing the rating? (I can see the program details text in ProgramInfo::showDetails(void) is only showing one rating, but if there are other broken screens..)
comment:3 Changed 18 years ago by
(In [11620]) Refs #2567. Fixes the ProgramInfo::showDetails() ratings string.
showDetails was only showing the first ratings string that showed up in the ratings query, but often this is just one of the advisory ratings, rather than something more important like the VChip or MPAA rating. This changeset adds a static function which creates concatinates the ratings strings with the advisory ratings always appearing after the VChip, MPAA, ABA, and similar ratings systems.
I'm planning to look at this code soon for EIT fixes...