summaryrefslogtreecommitdiff
path: root/coreengine/viewelementsdisplayreplay.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-02-11 16:45:08 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-02-11 17:39:18 +0100
commit64599db339e6aa4b3921fd84836920023714f8c8 (patch)
tree1e139abd5e98aaf905c2f11016a610fa3c8e84cf /coreengine/viewelementsdisplayreplay.c
parent628a28201b797635486aad40fad042c4c4222656 (diff)
downloadvdr-plugin-skindesigner-64599db339e6aa4b3921fd84836920023714f8c8.tar.gz
vdr-plugin-skindesigner-64599db339e6aa4b3921fd84836920023714f8c8.tar.bz2
In timeshift mode, the title of the actual playback position is displayed
If the timeshift mode is activated during playback, the title of the program that was active when the time shift started is displayed by pressing OK. The behavior has now been changed so that the title of the program is displayed in the actual playback position when you press OK.
Diffstat (limited to 'coreengine/viewelementsdisplayreplay.c')
-rw-r--r--coreengine/viewelementsdisplayreplay.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/coreengine/viewelementsdisplayreplay.c b/coreengine/viewelementsdisplayreplay.c
index 9249d37..5efb2d3 100644
--- a/coreengine/viewelementsdisplayreplay.c
+++ b/coreengine/viewelementsdisplayreplay.c
@@ -8,6 +8,7 @@
******************************************************************/
cVeDrRecTitle::cVeDrRecTitle(void) {
recording = NULL;
+ event = NULL;
title = NULL;
}
@@ -24,16 +25,20 @@ void cVeDrRecTitle::SetTokenContainer(void) {
InheritTokenContainer();
}
-void cVeDrRecTitle::Set(const cRecording *recording) {
+void cVeDrRecTitle::Set(const cRecording *recording, const cEvent *event) {
if (this->title) {
free(this->title);
this->title = NULL;
}
if (this->recording)
this->recording = NULL;
+ if (this->event)
+ this->event = NULL;
if (!recording)
return;
this->recording = recording;
+ if (event)
+ this->event = event;
}
void cVeDrRecTitle::Set(const char *title) {
@@ -43,6 +48,8 @@ void cVeDrRecTitle::Set(const char *title) {
}
if (this->recording)
this->recording = NULL;
+ if (this->event)
+ this->event = NULL;
if (!title)
return;
free(this->title);
@@ -58,13 +65,22 @@ bool cVeDrRecTitle::Parse(bool force) {
tokenContainer->Clear();
if (recording) {
const char *recName = NULL;
+ const char *recShortText = NULL;
const cRecordingInfo *recInfo = recording->Info();
- if (recInfo)
+ if (event) {
+ recName = event->Title();
+ recShortText = event->ShortText();
+ } else if (recInfo) {
recName = recInfo->Title();
- if (!recName)
+ recShortText = recInfo->ShortText();
+ }
+ if (!recName) {
recName = recording->Name();
+ recShortText = "";
+ }
+
tokenContainer->AddStringToken((int)eDRRecTitleST::rectitle, recName);
- tokenContainer->AddStringToken((int)eDRRecTitleST::recsubtitle, recInfo ? recInfo->ShortText() : "");
+ tokenContainer->AddStringToken((int)eDRRecTitleST::recsubtitle, recShortText);
tokenContainer->AddStringToken((int)eDRRecTitleST::recdate, *ShortDateString(recording->Start()));
tokenContainer->AddStringToken((int)eDRRecTitleST::rectime, *TimeString(recording->Start()));
} else if (title) {