diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-12-25 12:13:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-12-25 12:13:00 +0100 |
commit | f6283b8e91f5b5bc20bc0ab4ea4c22e4810c17e5 (patch) | |
tree | 0c5eff13c074cc8885102cd7af98abccc74c908e /menu.c | |
parent | b936cb366f3bbd7c62327999343e2986af38d2d4 (diff) | |
download | vdr-f6283b8e91f5b5bc20bc0ab4ea4c22e4810c17e5.tar.gz vdr-f6283b8e91f5b5bc20bc0ab4ea4c22e4810c17e5.tar.bz2 |
The Recordings menu can now be called with a cRecordingFilter
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 3.13 2013/11/03 14:08:35 kls Exp $ + * $Id: menu.c 3.14 2013/12/25 12:03:32 kls Exp $ */ #include "menu.h" @@ -2571,12 +2571,13 @@ void cMenuRecordingItem::SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, b cString cMenuRecordings::path; cString cMenuRecordings::fileName; -cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus) +cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus, const cRecordingFilter *Filter) :cOsdMenu(Base ? Base : tr("Recordings"), 9, 6, 6) { SetMenuCategory(mcRecording); base = Base ? strdup(Base) : NULL; level = Setup.RecordingDirs ? Level : -1; + filter = Filter; Recordings.StateChanged(recordingsState); // just to get the current state helpKeys = -1; Display(); // this keeps the higher level menus from showing up briefly when pressing 'Back' during replay @@ -2633,7 +2634,7 @@ void cMenuRecordings::Set(bool Refresh) GetRecordingsSortMode(DirectoryName()); Recordings.Sort(); for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) { - if (!base || (strstr(recording->Name(), base) == recording->Name() && recording->Name()[strlen(base)] == FOLDERDELIMCHAR)) { + if ((!filter || filter->Filter(recording)) && (!base || (strstr(recording->Name(), base) == recording->Name() && recording->Name()[strlen(base)] == FOLDERDELIMCHAR))) { cMenuRecordingItem *Item = new cMenuRecordingItem(recording, level); cMenuRecordingItem *LastDir = NULL; if (Item->IsDirectory()) { |