summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-04-04 16:14:10 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-04-04 18:13:47 +0200
commit8f894930513b154db19fa1548f28b60d7e5c46e2 (patch)
tree1da2da93045518c884e39bf6a667cc8f04c11cbd
parent78412dd9c4420e60fdb0c5e848d87660d2d1b95e (diff)
downloadskin-lcarsng-8f894930513b154db19fa1548f28b60d7e5c46e2.tar.gz
skin-lcarsng-8f894930513b154db19fa1548f28b60d7e5c46e2.tar.bz2
Use NUMRECORDINGSINPATH
-rw-r--r--displaymenu.c6
-rw-r--r--patches/numrecordingsinpath.patch52
2 files changed, 56 insertions, 2 deletions
diff --git a/displaymenu.c b/displaymenu.c
index 3490ebb..2aeb134 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -483,12 +483,14 @@ void cLCARSNGDisplayMenu::DrawNumRecordingsInPath(void)
{
const cFont *font = cFont::GetFont(fontOsd);
int NumRecordingsInPath = 0;
+#if APIVERSNUM > 20301
+#ifdef NUMRECORDINGSINPATH
{
-#if APIVERSNUM > 20300
LOCK_RECORDINGS_READ;
-#endif
NumRecordingsInPath = Recordings->GetNumRecordingsInPath(cMenuRecordings::GetActualPath());
}
+#endif
+#endif
if (NumRecordingsInPath > 0)
osd->DrawText(xm04, ys00, cString::sprintf("%i", NumRecordingsInPath), Theme.Color(clrMenuFrameFg), frameColor, font, xm08 - xm04 - 1, lineHeight, taBottom | taRight | taBorder);
}
diff --git a/patches/numrecordingsinpath.patch b/patches/numrecordingsinpath.patch
new file mode 100644
index 0000000..f938856
--- /dev/null
+++ b/patches/numrecordingsinpath.patch
@@ -0,0 +1,52 @@
+--- menu.c 2019-04-04 16:36:17.975084544 +0200
++++ vdr/menu.c 2019-04-04 16:39:45.292151445 +0200
+@@ -2965,6 +2965,7 @@
+
+ cString cMenuRecordings::path;
+ cString cMenuRecordings::fileName;
++cString cMenuRecordings::actualpath;
+
+ cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus, const cRecordingFilter *Filter, bool DelRecMenu)
+ :cOsdMenu(Base ? Base : DelRecMenu ? tr("Deleted Recordings") : tr("Recordings"), 9, 6, 6)
+@@ -3092,6 +3093,11 @@
+ }
+ }
+
++void cMenuRecordings::SetActualPath(const char *Path)
++{
++ actualpath = Path;
++}
++
+ void cMenuRecordings::SetPath(const char *Path)
+ {
+ path = Path;
+--- menu.h 2019-04-04 16:36:17.976084530 +0200
++++ vdr/menu.h 2019-04-04 16:43:36.970873692 +0200
+@@ -19,6 +19,10 @@
+ #include "recorder.h"
+ #include "skins.h"
+
++#ifndef NUMRECORDINGSINPATH
++#define NUMRECORDINGSINPATH
++#endif
++
+ class cMenuText : public cOsdMenu {
+ private:
+ char *text;
+@@ -216,6 +220,7 @@
+ const cRecordingFilter *filter;
+ static cString path;
+ static cString fileName;
++ static cString actualpath; //Used in SkinLCARSNG
+ void SetHelpKeys(void);
+ void Set(bool Refresh = false);
+ bool Open(bool OpenSubMenus = false);
+@@ -235,6 +240,8 @@
+ virtual eOSState ProcessKey(eKeys Key);
+ static void SetPath(const char *Path);
+ static void SetRecording(const char *FileName);
++ static void SetActualPath(const char *Path);
++ static cString GetActualPath(void) { return actualpath; }
+ };
+
+ class cRecordControl {