summaryrefslogtreecommitdiff
path: root/displaymenu.c
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-10-18 15:34:58 +0200
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-10-18 15:34:58 +0200
commit1f876fcb96c520c488c8802d1675893678bd4645 (patch)
treeb0e9c35540fe2848e95d111c7e83e3cdaf054849 /displaymenu.c
parent9b5b367dd5f9c76648b615c5747a411c9c98a1f1 (diff)
downloadskin-flatplus-1f876fcb96c520c488c8802d1675893678bd4645.tar.gz
skin-flatplus-1f876fcb96c520c488c8802d1675893678bd4645.tar.bz2
update recording count in recording menu
Diffstat (limited to 'displaymenu.c')
-rw-r--r--displaymenu.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/displaymenu.c b/displaymenu.c
index 206f8d09..fbc1afa4 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -43,6 +43,7 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) {
ShowText = false;
ItemEventLastChannelName = "";
+ LastItemRecording = NULL;
menuItemLastHeight = 0;
MenuFullOsdIsDrawn = false;
@@ -1751,6 +1752,9 @@ bool cFlatDisplayMenu::SetItemRecording(const cRecording *Recording, int Index,
cString buffer;
cString RecName = GetRecordingName(Recording, Level, Total == 0);
+ LastItemRecording = Recording;
+ LastItemRecordingLevel = Level;
+
if( Current )
menuItemScroller.Clear();
@@ -3381,9 +3385,23 @@ void cFlatDisplayMenu::Flush(void) {
LastTimerActiveCount = timerActiveCount;
cString newTitle = cString::sprintf("%s (%d/%d)", *LastTitle, timerActiveCount, timerCount);
TopBarSetTitleWithoutClear(*newTitle);
- dsyslog("UPDATE UPDATE UPDATE");
}
}
+ if( Config.MenuRecordingShowCount && menuCategory == mcRecording && LastItemRecording && LastItemRecordingLevel > 0 ) {
+ std::string RecFolder = GetRecordingName(LastItemRecording, LastItemRecordingLevel-1, true);
+ int recCount = 0, recNewCount = 0;
+ for(cRecording *Rec = Recordings.First(); Rec; Rec = Recordings.Next(Rec)) {
+ std::string RecFolder2 = GetRecordingName(Rec, LastItemRecordingLevel-1, true);
+ if( RecFolder == RecFolder2 ) {
+ recCount++;
+ if( Rec->IsNew() )
+ recNewCount++;
+ }
+ }
+ cString newTitle = cString::sprintf("%s (%d*/%d)", *LastTitle, recNewCount, recCount);
+ TopBarSetTitleWithoutClear(*newTitle);
+ }
+
osd->Flush();
}