Ticket #9197 (accepted Bug Report - General)
Opened 3 years ago
Last modified 8 months ago
Danish EIT fixups are putting the description in the subtitle
| Reported by: | mk@… | Owned by: | stuartm |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.26.1 |
| Component: | MythTV - EIT | Version: | 0.23.1 |
| Severity: | low | Keywords: | |
| Cc: | Ticket locked: | no |
Description
Sometimes my recorded programs contain a newline character in the subtitle.
Example:
INSERT INTO recordedprogram VALUES (1101,'2010-10-02 23:10:00','2010-10-03 01:10:00','Ingen er fuldkommen','Amerikansk komedie fra 1959.\rSugar er sangerinde i et dame-orkester i forbudstidens USA.','Hun ved ikke, at hendes to bedste veninder i orkestret i virkeligheden er mænd i forklædning, på flugt fra nogle gangstere, og Joe og Jerry har meget svært ved at bevare kvindeligheden i samværet med hende. Sugar: Marilyn Monroe. Joe: Tony Curtis. Jerry: Jack Lemmon. Manuskript: Billy Wilder og I.A.L. Diamond. Instruktion: Billy Wilder.',,'tvshow',0000,0,0,,1,0,0,0,0,0,,NULL,,,,,0,0,1,1,1,'STEREO',,'WIDESCREEN');
The \r character is not escaped by addslashes in modules/tv/tmpl/default/recorded.php resulting in a newline in the javascript text string.
If I change line 70 from:
file.subtitle = '<?php echo addslashes($show->subtitle) ?>';
Into:
file.subtitle = '<?php echo addslashes(str_replace(array("\n","\r"), ' ', $show->subtitle)) ?>';
the page work correctly again.
Attachments
Change History
comment:1 Changed 3 years ago by anonymous
comment:2 Changed 3 years ago by anonymous
The data comes from DVB-T EIT
comment:3 Changed 3 years ago by stuartm
- Owner changed from kormoc to janneg
- Priority changed from minor to major
- Status changed from new to assigned
- Component changed from Plugin - MythWeb to MythTV - EIT
- Milestone changed from unknown to 0.24
comment:4 Changed 3 years ago by stuartm
- Summary changed from subtitles contain newlines breaks recorded.php to Danish EIT fixups are putting the description in the subtitle
comment:8 Changed 16 months ago by danielk
- Owner changed from janne to stuarta
- Priority changed from major to minor
- Severity changed from medium to low
- Milestone changed from 0.24.2 to 0.25
comment:9 Changed 15 months ago by stuartm
- Owner changed from stuarta to stuartm
- Status changed from assigned to accepted
- Type changed from defect to Bug Report - General
Some help on this would be appreciated from Danish users. I can remove the fixup that puts the description in the subtitle, but I don't know whether that would break some other channels.
comment:10 Changed 14 months ago by stuartm
- Milestone changed from 0.25 to 0.26
I'm not going to get this fixed for 0.25, but I will backport to 0.25.1 when I do. Right now it looks like the Danish providers are sticking longer than subtitle length descriptions in the 'short' event descriptors.
Our EIT parser is at fault for treating these short descriptions as subtitles when they are anything but. There are other problems with treating the short even descriptor (max 255 char) as subtitle (max 128 char). The EIT spec makes no stipulation that the short event descriptor should contain an episode name, just a short description of the programme.
Fixing this means possibly breaking it for some networks which just happen to put the episode name in the subtitle field. We'd need to write proper fixups for those locations at the same time.
comment:11 Changed 14 months ago by stuartm
What I meant to say was:
Fixing this means possibly breaking it for some networks which just happen to put the episode name in the short event descriptor.

How is your guide data sourced? XMLTV, schedules direct or EIT? It appears the description is being inserted into the wrong field and that should be fixed.