Closed dave-p closed 3 years ago
Yeah, I see.. so what would be the logical thing to do? Choose one, unless it is .length == 0 then use the other?
TVHadmin has a configuration item so the user can choose. Deciding automatically would be better, however the 'wrong' item isn't just length zero it's non-existent:
{
"eventId": 729321,
"episodeUri": "crid://www.itv.com/1001802101",
"serieslinkUri": "crid://www.itv.com/ebs50965",
"channelName": "ITV2",
"channelUuid": "fad0d38c8e890d8949d369687d27dafa",
"channelNumber": "6",
"start": 1600596600,
"stop": 1600623900,
"title": "British Touring Car...",
"summary": "...Championship Live. The championship heads to Thruxton for Rounds 13, 14 and 15 of the season. Presented by Steve Rider and Louise Goodman. [S]",
"widescreen": 1,
"subtitled": 1,
"genre": [
64
],
"nextEventId": 727496
}
Well, non-existence is just as easy to check for. Do you have a channel to check this, if I implement it? All my channels use 'description'... They way you did it above, both text would be pasted in to the same field... which is fine if only one exists, but what if both exist? Probably better to have the controller check what's there, wouldn't you say?
Implemented as
### // hotfix for no description
if (!angular.isDefined(epgUnit['data']['summary']))
epgUnit['data']['description'] = epgUnit['data']['summary'];
else:
epgUnit['data']['description'] = '<no description available>';
Raised PR #7 to correct inverted logic - works now.
Awesome, thanks
The EIT standard provides two locations for storing information about a programme in the EPG; "Summary" and "Description". Unfortunately some broadcasters use one field and some the other, so it is necessary to have some way of selecting the correct one.
As an example, this patch changes from the "description" field to "summary" for use with UK DVB-T and DVB-S.