summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--displaymenu.c39
-rw-r--r--displaymenu.h2
2 files changed, 29 insertions, 12 deletions
diff --git a/displaymenu.c b/displaymenu.c
index 03669bac..d7ec4369 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -43,7 +43,8 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) {
ShowText = false;
ItemEventLastChannelName = "";
- LastItemRecording = NULL;
+ RecFolder = "";
+ LastRecFolder = "";
menuItemLastHeight = 0;
MenuFullOsdIsDrawn = false;
@@ -259,10 +260,22 @@ void cFlatDisplayMenu::SetTitle(const char *Title) {
case mcRecording:
if( Config.MenuRecordingShowCount ) {
int recCount = 0, recNewCount = 0;
- for(cRecording *Rec = Recordings.First(); Rec; Rec = Recordings.Next(Rec)) {
- recCount++;
- if( Rec->IsNew() )
- recNewCount++;
+ LastRecFolder = "";
+ if( RecFolder != "" && LastItemRecordingLevel > 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++;
+ }
+ }
+ } else {
+ for(cRecording *Rec = Recordings.First(); Rec; Rec = Recordings.Next(Rec)) {
+ recCount++;
+ if( Rec->IsNew() )
+ recNewCount++;
+ }
}
cString newTitle = cString::sprintf("%s (%d*/%d)", Title, recNewCount, recCount);
TopBarSetTitle(*newTitle);
@@ -1752,7 +1765,11 @@ bool cFlatDisplayMenu::SetItemRecording(const cRecording *Recording, int Index,
cString buffer;
cString RecName = GetRecordingName(Recording, Level, Total == 0);
- LastItemRecording = Recording;
+ if( Level > 0 ) {
+ RecFolder = GetRecordingName(Recording, Level-1, true);
+ } else {
+ RecFolder = GetRecordingName(Recording, Level, true);
+ }
LastItemRecordingLevel = Level;
if( Current )
@@ -3387,9 +3404,9 @@ void cFlatDisplayMenu::Flush(void) {
TopBarSetTitleWithoutClear(*newTitle);
}
}
- if( Config.MenuRecordingShowCount && menuCategory == mcRecording && LastItemRecording && LastItemRecordingLevel > 0 ) {
- std::string RecFolder = GetRecordingName(LastItemRecording, LastItemRecordingLevel-1, true);
- dsyslog("MenuRecordingShowCount RecFolder: %s Level: %d", RecFolder.c_str(), LastItemRecordingLevel-1 );
+/*
+ if( Config.MenuRecordingShowCount && menuCategory == mcRecording && LastRecFolder != RecFolder && LastItemRecordingLevel > 0 ) {
+ LastRecFolder = RecFolder;
int recCount = 0, recNewCount = 0;
for(cRecording *Rec = Recordings.First(); Rec; Rec = Recordings.Next(Rec)) {
std::string RecFolder2 = GetRecordingName(Rec, LastItemRecordingLevel-1, true);
@@ -3399,10 +3416,10 @@ void cFlatDisplayMenu::Flush(void) {
recNewCount++;
}
}
- cString newTitle = cString::sprintf("%s (%d*/%d)", *LastTitle, recNewCount, recCount);
+ cString newTitle = cString::sprintf("%s (%dSTERN/%d)", *LastTitle, recNewCount, recCount);
TopBarSetTitleWithoutClear(*newTitle);
}
-
+*/
osd->Flush();
}
diff --git a/displaymenu.h b/displaymenu.h
index 28a499f1..2da3caa6 100644
--- a/displaymenu.h
+++ b/displaymenu.h
@@ -49,7 +49,7 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu {
cString ItemEventLastChannelName;
- const cRecording *LastItemRecording;
+ std::string RecFolder, LastRecFolder;
int LastItemRecordingLevel;
// Icons