summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--mymenurecordings.c38
2 files changed, 23 insertions, 16 deletions
diff --git a/HISTORY b/HISTORY
index abe7c87..24d298b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2,6 +2,7 @@ VDR Plugin 'extrecmenu' Revision History
----------------------------------------
2011-xx-xx: Version 1.2.1
+- [amair] Fixed counting of hidden recordings if PIN plugin is used (Bug #421).
- [amair] Ignore comments in dircmds.conf (Submitted by TomG @vdr-portal.de).
- [sibbi] Added ability to configure items that should be shown in recording list.
- [amair] Merged following changes from v1.3-devel head (Submitted by Joe_D @vdr-portal.de).
diff --git a/mymenurecordings.c b/mymenurecordings.c
index 9abd4fb..890c992 100644
--- a/mymenurecordings.c
+++ b/mymenurecordings.c
@@ -733,30 +733,36 @@ void myMenuRecordings::Set(bool Refresh,char *_current)
path+=base;
list->Sort(mySortList->Find(path));
+#ifdef USE_PINPLUGIN
+ bool hidepinprotectedrecs=false;
+ cPlugin *pinplugin=cPluginManager::GetPlugin("pin");
+ if(pinplugin)
+ hidepinprotectedrecs=pinplugin->SetupParse("hideProtectedRecordings","1");
+#endif
+
char *lastitemtext=NULL;
myMenuRecordingsItem *lastitem=NULL;
for(myRecListItem *listitem=list->First();listitem;listitem=list->Next(listitem))
{
cRecording *recording=listitem->recording;
- if(!base||(strstr(listitem->recording->Name(),base)==listitem->recording->Name()&&listitem->recording->Name()[strlen(base)]=='~'))
+ if(!base||(strstr(recording->Name(),base)==recording->Name()&&recording->Name()[strlen(base)]=='~'))
{
- myMenuRecordingsItem *recitem=new myMenuRecordingsItem(listitem->recording,level);
+ myMenuRecordingsItem *recitem=new myMenuRecordingsItem(recording,level);
+ if(*recitem->UniqID() && (!lastitem || strcmp(recitem->UniqID(),lastitemtext)))
+ {
#ifdef USE_PINPLUGIN
- bool hidepinprotectedrecs=false;
- cPlugin *pinplugin=cPluginManager::GetPlugin("pin");
- if(pinplugin)
- hidepinprotectedrecs=pinplugin->SetupParse("hideProtectedRecordings","1");
-
- if((*recitem->UniqID() && ((!lastitem || strcmp(recitem->UniqID(),lastitemtext)))) &&
- !((cStatus::MsgReplayProtected(GetRecording(recitem),recitem->Name(),base,recitem->IsDirectory(),true)) && hidepinprotectedrecs))
-#else
- if(*recitem->UniqID() && ((!lastitem || strcmp(recitem->UniqID(),lastitemtext))))
+ if(!(hidepinprotectedrecs && cStatus::MsgReplayProtected(recording,recitem->Name(),base,recitem->IsDirectory(),true)))
+ {
+#endif
+ Add(recitem);
+ lastitem=recitem;
+ free(lastitemtext);
+ lastitemtext=strdup(lastitem->UniqID());
+#ifdef USE_PINPLUGIN
+ }
+ else
+ lastitem=NULL;
#endif
- {
- Add(recitem);
- lastitem=recitem;
- free(lastitemtext);
- lastitemtext=strdup(lastitem->UniqID());
}
else
delete recitem;