mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 15:58:31 +00:00
Fixed an error in displayreplay if no recording information are available
This commit is contained in:
parent
6aeaf41467
commit
1c393e23a5
@ -191,6 +191,8 @@ void cViewReplay::GetTimers(void) {
|
||||
|
||||
void cViewReplay::SetTimeShiftValues(const cRecording *recording) {
|
||||
//check for instant recording
|
||||
if (!recording)
|
||||
return;
|
||||
const char *recName = recording->Name();
|
||||
if (recName && *recName == '@')
|
||||
return;
|
||||
@ -224,6 +226,12 @@ void cViewReplay::SetTitle(const char *title) {
|
||||
if (veRecTitle) {
|
||||
veRecTitle->Set(title);
|
||||
}
|
||||
if (veRecInfo) {
|
||||
veRecInfo->Set(NULL);
|
||||
}
|
||||
if (veScraperContent) {
|
||||
veScraperContent->Set(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void cViewReplay::SetCurrent(const char *current) {
|
||||
@ -239,7 +247,7 @@ void cViewReplay::SetTotal(const char *total) {
|
||||
}
|
||||
|
||||
void cViewReplay::SetEndTime(int current, int total) {
|
||||
if (!veEndTime)
|
||||
if (!veEndTime || reclength == 0)
|
||||
return;
|
||||
int totalLength = total;
|
||||
int recordingLength = reclength;
|
||||
|
@ -25,10 +25,24 @@ void cVeDrRecTitle::SetTokenContainer(void) {
|
||||
}
|
||||
|
||||
void cVeDrRecTitle::Set(const cRecording *recording) {
|
||||
if (this->title) {
|
||||
free(this->title);
|
||||
this->title = NULL;
|
||||
}
|
||||
if (this->recording)
|
||||
this->recording = NULL;
|
||||
if (!recording)
|
||||
return;
|
||||
this->recording = recording;
|
||||
}
|
||||
|
||||
void cVeDrRecTitle::Set(const char *title) {
|
||||
if (this->title) {
|
||||
free(this->title);
|
||||
this->title = NULL;
|
||||
}
|
||||
if (this->recording)
|
||||
this->recording = NULL;
|
||||
if (!title)
|
||||
return;
|
||||
free(this->title);
|
||||
|
@ -25,7 +25,14 @@ void cSDDisplayReplay::SetRecording(const cRecording *Recording) {
|
||||
}
|
||||
|
||||
void cSDDisplayReplay::SetTitle(const char *Title) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->SetTitle(Title);
|
||||
if (init) {
|
||||
view->SetRecordingLength(0);
|
||||
view->SetTimeShiftValues(NULL);
|
||||
init = false;
|
||||
}
|
||||
}
|
||||
|
||||
void cSDDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user