mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Shifting 'Subtitle' info into 'ExtendedDescription' if necessary
This commit is contained in:
parent
6439a8e169
commit
1a5ca67f57
2
HISTORY
2
HISTORY
@ -301,3 +301,5 @@ Video Disk Recorder Revision History
|
|||||||
and will switch back to the channel it originally displayed at the first sign of
|
and will switch back to the channel it originally displayed at the first sign of
|
||||||
user activity. Any scanning will only occur if that particular card is not
|
user activity. Any scanning will only occur if that particular card is not
|
||||||
currently recording or replaying.
|
currently recording or replaying.
|
||||||
|
- Now shifting the 'Subtitle' info into the 'ExtendedDescription' on stations
|
||||||
|
that don't send the EIT information correctly (like, e.g., 'VOX').
|
||||||
|
29
menu.c
29
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menu.c 1.49 2000/11/18 13:42:52 kls Exp $
|
* $Id: menu.c 1.50 2000/11/18 14:10:10 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -1103,22 +1103,35 @@ cMenuEvent::cMenuEvent(const cEventInfo *EventInfo, bool CanSwitch)
|
|||||||
if (eventInfo) {
|
if (eventInfo) {
|
||||||
cChannel *channel = Channels.GetByServiceID(eventInfo->GetServiceID());
|
cChannel *channel = Channels.GetByServiceID(eventInfo->GetServiceID());
|
||||||
if (channel) {
|
if (channel) {
|
||||||
const char *p;
|
|
||||||
char *buffer;
|
char *buffer;
|
||||||
asprintf(&buffer, "%-17.*s\t%.*s %s - %s", 17, channel->name, 5, eventInfo->GetDate(), eventInfo->GetTimeString(), eventInfo->GetEndTimeString());
|
asprintf(&buffer, "%-17.*s\t%.*s %s - %s", 17, channel->name, 5, eventInfo->GetDate(), eventInfo->GetTimeString(), eventInfo->GetEndTimeString());
|
||||||
SetTitle(buffer, false);
|
SetTitle(buffer, false);
|
||||||
int Line = 2;
|
int Line = 2;
|
||||||
cMenuTextItem *item;
|
cMenuTextItem *item;
|
||||||
if (!isempty(p = eventInfo->GetTitle())) {
|
const char *Title = eventInfo->GetTitle();
|
||||||
Add(item = new cMenuTextItem(p, 1, Line, MenuColumns - 2, -1, clrCyan));
|
const char *Subtitle = eventInfo->GetSubtitle();
|
||||||
|
const char *ExtendedDescription = eventInfo->GetExtendedDescription();
|
||||||
|
// Some channels send a 'Subtitle' that should actually be the 'ExtendedDescription'
|
||||||
|
// (their 'ExtendedDescription' is then empty). In order to handle this correctly
|
||||||
|
// we silently shift that text to where it belongs.
|
||||||
|
// The German TV station 'VOX' is notorious for this - why can't they do it correctly
|
||||||
|
// like all the others? Well, at least like those who actually send the full range
|
||||||
|
// of information (like, e.g., 'Sat.1'). Some stations (like 'RTL') don't even
|
||||||
|
// bother sending anything but the 'Title'...
|
||||||
|
if (isempty(ExtendedDescription) && !isempty(Subtitle) && strlen(Subtitle) > 2 * MenuColumns) {
|
||||||
|
ExtendedDescription = Subtitle;
|
||||||
|
Subtitle = NULL;
|
||||||
|
}
|
||||||
|
if (!isempty(Title)) {
|
||||||
|
Add(item = new cMenuTextItem(Title, 1, Line, MenuColumns - 2, -1, clrCyan));
|
||||||
Line += item->Height() + 1;
|
Line += item->Height() + 1;
|
||||||
}
|
}
|
||||||
if (!isempty(p = eventInfo->GetSubtitle())) {
|
if (!isempty(Subtitle)) {
|
||||||
Add(item = new cMenuTextItem(p, 1, Line, MenuColumns - 2, -1, clrYellow));
|
Add(item = new cMenuTextItem(Subtitle, 1, Line, MenuColumns - 2, -1, clrYellow));
|
||||||
Line += item->Height() + 1;
|
Line += item->Height() + 1;
|
||||||
}
|
}
|
||||||
if (!isempty(p = eventInfo->GetExtendedDescription()))
|
if (!isempty(ExtendedDescription))
|
||||||
Add(new cMenuTextItem(p, 1, Line, MenuColumns - 2, Height() - Line - 2, clrCyan), true);
|
Add(new cMenuTextItem(ExtendedDescription, 1, Line, MenuColumns - 2, Height() - Line - 2, clrCyan), true);
|
||||||
SetHelp(tr("Record"), NULL, NULL, CanSwitch ? tr("Switch") : NULL);
|
SetHelp(tr("Record"), NULL, NULL, CanSwitch ? tr("Switch") : NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user