[vdr-plugin-noepg] 01/03: Imported Upstream version 0.0.5

Tobias Grimm tiber-guest at moszumanska.debian.org
Sun Jan 17 09:32:58 UTC 2016


This is an automated email from the git hooks/post-receive script.

tiber-guest pushed a commit to branch master
in repository vdr-plugin-noepg.

commit 601c448b166cf5c5ccb59bf36df36ef5e4109b2a
Author: Tobias Grimm <git at e-tobi.net>
Date:   Sun Jan 17 10:19:38 2016 +0100

    Imported Upstream version 0.0.5
---
 Makefile |  2 +-
 config.c |  8 +++++++-
 menu.c   | 56 +++++++++++++++++++++++++++++++-------------------------
 noepg.c  |  2 +-
 4 files changed, 40 insertions(+), 28 deletions(-)

diff --git a/Makefile b/Makefile
index 9d97662..031e592 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
 ### The directory environment:
 
 # Use package data if installed...otherwise assume we're under the VDR source directory:
-PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
+PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:../../.." pkg-config --variable=$(1) vdr))
 LIBDIR = $(call PKGCFG,libdir)
 LOCDIR = $(call PKGCFG,locdir)
 PLGCFG = $(call PKGCFG,plgcfg)
diff --git a/config.c b/config.c
index d6ecd6b..a2584f8 100644
--- a/config.c
+++ b/config.c
@@ -67,7 +67,13 @@ bool cNoepgChannelID::Save(FILE *f)
 {
   if (id.Valid()) {
      if (comment == NULL) {
-        cChannel *c = Channels.GetByChannelID(id);
+#if VDRVERSNUM > 20300
+        LOCK_CHANNELS_READ;
+        const cChannels *channels = Channels;
+#else
+        cChannels *channels = &Channels;
+#endif
+        const cChannel *c = channels->GetByChannelID(id);
         if (c != NULL)
            return fprintf(f, "%s //= %s\n", *id.ToString(), c->Name()) > 0;
         return fprintf(f, "%s\n", *id.ToString()) > 0;
diff --git a/menu.c b/menu.c
index 20c05bf..b7744bf 100644
--- a/menu.c
+++ b/menu.c
@@ -17,32 +17,38 @@ cNoepgMainMenu::cNoepgMainMenu(void)
      Add(new cMenuEditBoolItem(tr("mode"), &_mode, tr("blacklist"), tr("whitelist")));
      }
 
-  for (cChannel *chan = Channels.First(); chan; chan = Channels.Next(chan)) {
-       if (chan->GroupSep())
-          continue;
-       cid = chan->GetChannelID();
-       inList = 0;
-       comment = NULL;
-       for (cNoepgChannelID* c = _filelist.First(); c; c = _filelist.Next(c)) {
-           if (!c->id.Valid()) {
-              if (!modeSet) {
-                 modeSet = true;
-                 if (c->mode == enemBlacklist)
-                    _mode = 0;
-                 else if (c->mode == enemWhitelist)
-                    _mode = 1;
-                 Add(new cMenuEditBoolItem(tr("mode"), &_mode, tr("blacklist"), tr("whitelist")));
-                 }
-              continue;
-              }
+#if VDRVERSNUM > 20300
+  LOCK_CHANNELS_READ;
+  const cChannels *channels = Channels;
+#else
+  const cChannels *channels = &Channels;
+#endif
+  for (const cChannel *chan = channels->First(); chan; chan = channels->Next(chan)) {
+      if (chan->GroupSep())
+         continue;
+      cid = chan->GetChannelID();
+      inList = 0;
+      comment = NULL;
+      for (cNoepgChannelID* c = _filelist.First(); c; c = _filelist.Next(c)) {
+          if (!c->id.Valid()) {
+             if (!modeSet) {
+                modeSet = true;
+                if (c->mode == enemBlacklist)
+                   _mode = 0;
+                else if (c->mode == enemWhitelist)
+                   _mode = 1;
+                Add(new cMenuEditBoolItem(tr("mode"), &_mode, tr("blacklist"), tr("whitelist")));
+                }
+             continue;
+             }
 
-           if (c->id == cid) {
-              inList = 1;
-              if (c->comment != NULL)
-                 comment = new cString(*c->comment);
-              break;
-              }
-           }
+          if (c->id == cid) {
+             inList = 1;
+             if (c->comment != NULL)
+                comment = new cString(*c->comment);
+             break;
+             }
+          }
 
       item = new cNoepgChannelID();
       item->mode = (eNoEpgMode)inList;
diff --git a/noepg.c b/noepg.c
index a4b2754..3b54f38 100644
--- a/noepg.c
+++ b/noepg.c
@@ -71,7 +71,7 @@ public:
   }
   };
 
-static const char *VERSION        = "0.0.4";
+static const char *VERSION        = "0.0.5";
 static const char *DESCRIPTION    = trNOOP("block/allow EPG for selected channels");
 static const char *MAINMENUENTRY  = NULL;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-noepg.git



More information about the pkg-vdr-dvb-changes mailing list