mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
In menu "Search Recordins" get ChannelName from 'RecInfo'
Alternatively fallback via 'ChannelID' from the active channel list.
This commit is contained in:
parent
2d46769a3e
commit
6af3193b02
@ -2278,15 +2278,24 @@ void cRecMenuItemRecording::Draw(void) {
|
|||||||
if (!recording)
|
if (!recording)
|
||||||
return;
|
return;
|
||||||
const cRecordingInfo *recInfo = recording->Info();
|
const cRecordingInfo *recInfo = recording->Info();
|
||||||
#if VDRVERSNUM >= 20301
|
const cChannel *channel = NULL;
|
||||||
LOCK_CHANNELS_READ;
|
|
||||||
const cChannel *channel = Channels->GetByChannelID(recInfo->ChannelID());
|
|
||||||
#else
|
|
||||||
const cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID());
|
|
||||||
#endif
|
|
||||||
cString channelName = tr("unknown channel");
|
cString channelName = tr("unknown channel");
|
||||||
if (channel)
|
if (recInfo) {
|
||||||
channelName = channel->Name();
|
if (recInfo->ChannelName() && (strlen(recInfo->ChannelName()) > 0)) {
|
||||||
|
channelName = recInfo->ChannelName();
|
||||||
|
} else {
|
||||||
|
#if VDRVERSNUM >= 20301
|
||||||
|
{
|
||||||
|
LOCK_CHANNELS_READ;
|
||||||
|
channel = Channels->GetByChannelID(recInfo->ChannelID());
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
channel = Channels.GetByChannelID(recInfo->ChannelID());
|
||||||
|
#endif
|
||||||
|
if (channel)
|
||||||
|
channelName = channel->Name();
|
||||||
|
}
|
||||||
|
}
|
||||||
cString name = recording->Name();
|
cString name = recording->Name();
|
||||||
cString dateTime = cString::sprintf("%s, %s", *DateString(recording->Start()), *TimeString(recording->Start()));
|
cString dateTime = cString::sprintf("%s, %s", *DateString(recording->Start()), *TimeString(recording->Start()));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user