summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Mair <andreas@vdr-developer.org>2011-04-12 12:34:29 +0200
committerAndreas Mair <andreas@vdr-developer.org>2011-04-12 12:34:29 +0200
commit11e5ff7a792203dc30e7a0e2b1f47b9525dca08c (patch)
tree8412325e866260bea12f0eda49df5f04b58543ca
parente4b4903d2401bcdfc6fd27836c0ff93fd895cbc8 (diff)
downloadvdr-plugin-extrecmenu-11e5ff7a792203dc30e7a0e2b1f47b9525dca08c.tar.gz
vdr-plugin-extrecmenu-11e5ff7a792203dc30e7a0e2b1f47b9525dca08c.tar.bz2
- Fixed counting of hidden recordings if PIN plugin is used (Closes #421).
- Optimized building list of recordings if PIN plugin is used.
-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;