summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-02-08 15:22:40 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-02-08 15:31:59 +0100
commitc3f7a2cfdf876ff0980e2838c5dbc65ad998404a (patch)
tree58c967c4a0eee6efe5819f7ca6b5fc193e7325d4
parent6972a59e1b86989167fb3f3b2b1dc02612d72b4a (diff)
downloadvdr-plugin-skindesigner-c3f7a2cfdf876ff0980e2838c5dbc65ad998404a.tar.gz
vdr-plugin-skindesigner-c3f7a2cfdf876ff0980e2838c5dbc65ad998404a.tar.bz2
Fixed a bug in timeshift mode that prevented the progress bar from updating in pause mode
-rw-r--r--coreengine/viewdisplayreplay.c7
-rw-r--r--coreengine/viewdisplayreplay.h3
-rw-r--r--coreengine/viewelementsdisplayreplay.c4
-rw-r--r--displayreplay.c2
4 files changed, 10 insertions, 6 deletions
diff --git a/coreengine/viewdisplayreplay.c b/coreengine/viewdisplayreplay.c
index f871afb..db767dc 100644
--- a/coreengine/viewdisplayreplay.c
+++ b/coreengine/viewdisplayreplay.c
@@ -142,6 +142,7 @@ void cViewReplay::PreCache(void) {
void cViewReplay::ClearVariables(void) {
cView::ClearVariables();
+ recording = NULL;
modeOnly = false;
lastFlush = 0;
lastFlushModeOnly = 0;
@@ -171,6 +172,7 @@ void cViewReplay::SetTimeShift(int framesTotal, int timeShiftLength) {
}
void cViewReplay::SetRecording(const cRecording *recording) {
+ this->recording = recording;
if (veRecTitle) {
veRecTitle->Set(recording);
}
@@ -180,6 +182,7 @@ void cViewReplay::SetRecording(const cRecording *recording) {
if (veScraperContent) {
veScraperContent->Set(recording);
}
+ SetTimeShiftValues();
}
void cViewReplay::GetGlobalTimers(void) {
@@ -189,7 +192,7 @@ void cViewReplay::GetGlobalTimers(void) {
}
}
-void cViewReplay::SetTimeShiftValues(const cRecording *recording) {
+void cViewReplay::SetTimeShiftValues(void) {
if (!recording)
return;
bool isTimeShift = false;
@@ -220,6 +223,7 @@ void cViewReplay::SetTimeShiftValues(const cRecording *recording) {
}
void cViewReplay::SetTitle(const char *title) {
+ recording = NULL;
if (veRecTitle) {
veRecTitle->Set(title);
}
@@ -259,6 +263,7 @@ void cViewReplay::SetEndTime(int current, int total) {
}
void cViewReplay::SetProgressbar(int current, int total) {
+ SetTimeShiftValues();
if (veProgressbar)
veProgressbar->Set(current, total, timeShiftActive, timeShiftFramesTotal);
Render((int)eVeDisplayReplay::progressbar);
diff --git a/coreengine/viewdisplayreplay.h b/coreengine/viewdisplayreplay.h
index 0dc682a..b9ed9eb 100644
--- a/coreengine/viewdisplayreplay.h
+++ b/coreengine/viewdisplayreplay.h
@@ -21,6 +21,7 @@ private:
cVeDrJump *veJump;
cVeDrOnPause *veOnPause;
cVeDrOnPause *veOnPauseModeOnly;
+ const cRecording *recording;
bool modeOnly;
time_t lastFlush;
time_t lastFlushModeOnly;
@@ -33,6 +34,7 @@ private:
bool timersLoaded;
cGlobalTimers globalTimers;
void GetGlobalTimers(void);
+ void SetTimeShiftValues(void);
void SetViewElements(void);
void ClearVariables(void);
void SetViewElementObjects(void);
@@ -46,7 +48,6 @@ public:
void SetTimeShift(int framesTotal, int timeShiftLength);
void SetRecording(const cRecording *recording);
void SetTitle(const char *title);
- void SetTimeShiftValues(const cRecording *recording);
void SetCurrent(const char *current);
void SetTotal(const char *total);
void SetEndTime(int current, int total);
diff --git a/coreengine/viewelementsdisplayreplay.c b/coreengine/viewelementsdisplayreplay.c
index 6cd4b25..9249d37 100644
--- a/coreengine/viewelementsdisplayreplay.c
+++ b/coreengine/viewelementsdisplayreplay.c
@@ -273,7 +273,7 @@ void cVeDrProgressBar::SetTokenContainer(void) {
}
void cVeDrProgressBar::Set(int current, int total, bool timeshiftActive, int timeshiftTotal) {
- if (this->current == current)
+ if (!(this->current != current || this->total != total))
return;
this->current = current;
this->total = total;
@@ -595,7 +595,7 @@ void cVeDrProgressModeonly::SetTokenContainer(void) {
}
void cVeDrProgressModeonly::Set(double fps, int current, int total) {
- if (this->current == current)
+ if (!(this->current != current || this->total != total))
return;
this->fps = fps;
this->current = current;
diff --git a/displayreplay.c b/displayreplay.c
index 9921a9d..2a8b646 100644
--- a/displayreplay.c
+++ b/displayreplay.c
@@ -18,7 +18,6 @@ void cSDDisplayReplay::SetRecording(const cRecording *Recording) {
view->SetRecording(Recording);
if (init) {
view->SetRecordingLength(Recording->LengthInSeconds());
- view->SetTimeShiftValues(Recording);
init = false;
}
}
@@ -30,7 +29,6 @@ void cSDDisplayReplay::SetTitle(const char *Title) {
view->SetTitle(Title);
if (init) {
view->SetRecordingLength(0);
- view->SetTimeShiftValues(NULL);
init = false;
}
}