diff --git a/displayreplay.c b/displayreplay.c index 8cf3f1f..7ae5e69 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -115,10 +115,14 @@ void cSDDisplayReplay::Flush(void) { } void cSDDisplayReplay::SetTimeShiftValues(const cRecording *recording) { + bool isTimeShift = false; +#if APIVERSNUM >= 20101 int usage = recording->IsInUse(); - if (!(usage & ruTimer)) + if (usage & ruTimer) + isTimeShift = true; +#endif + if (!isTimeShift) return; - const cRecordingInfo *recInfo = recording->Info(); if (!recInfo) return; diff --git a/skins/metrixhd/xmlfiles/displayreplay.xml b/skins/metrixhd/xmlfiles/displayreplay.xml index 907ea79..6993f9a 100644 --- a/skins/metrixhd/xmlfiles/displayreplay.xml +++ b/skins/metrixhd/xmlfiles/displayreplay.xml @@ -149,15 +149,17 @@ - + @@ -175,6 +177,24 @@ + + + + + + + + + + + + + + + + + + @@ -83,15 +85,19 @@ diff --git a/views/displayreplayview.c b/views/displayreplayview.c index 3e2fd28..400807f 100644 --- a/views/displayreplayview.c +++ b/views/displayreplayview.c @@ -271,7 +271,6 @@ void cDisplayReplayView::DrawProgressBar(int current, int total) { intTokens.insert(pair("current", current)); intTokens.insert(pair("total", total)); intTokens.insert(pair("timeshift", timeShiftActive)); - if (timeShiftActive) { intTokens.insert(pair("timeshifttotal", timeShiftFramesTotal)); } @@ -288,13 +287,14 @@ void cDisplayReplayView::DrawMarks(const cMarks *marks, int current, int total) map < string, string > stringTokens; map < string, int > intTokens; + intTokens.insert(pair("timeshift", timeShiftActive)); + map < string, vector< map< string, string > > > loopTokens; vector< map< string, string > > markTokens; stringstream tot; - if (!timeShiftActive) - tot << total; - else - tot << timeShiftFramesTotal; + tot << total; + stringstream timeshifttot; + timeshifttot << timeShiftFramesTotal; bool isStartMark = true; for (const cMark *m = marks->First(); m; m = marks->Next(m)) { @@ -303,6 +303,9 @@ void cDisplayReplayView::DrawMarks(const cMarks *marks, int current, int total) pos << m->Position(); markVals.insert(pair< string, string >("marks[position]", pos.str())); markVals.insert(pair< string, string >("marks[total]", tot.str())); + if (timeShiftActive) { + markVals.insert(pair< string, string >("marks[timeshifttotal]", timeshifttot.str())); + } markVals.insert(pair< string, string >("marks[startmark]", isStartMark ? "1" : "0")); markVals.insert(pair< string, string >("marks[active]", (m->Position() == current) ? "1" : "0")); const cMark *m2 = marks->Next(m);