]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Scan for XMLTV grabbers in $PATH as well.
authorAndreas Öman <andreas@lonelycoder.com>
Sun, 7 Jun 2009 08:45:48 +0000 (08:45 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Sun, 7 Jun 2009 08:45:48 +0000 (08:45 +0000)
debian/changelog
src/xmltv.c

index 4ada55b15a94ca2fca959e0e7f7192d2dba010ff..516926d849d1a8666b756a2c1cfb860faa55e321 100644 (file)
@@ -18,6 +18,9 @@ hts-tvheadend (2.2) hts; urgency=low
   * When deleting a channel any channel-bound autorecording would stay in
     memory and, sooner or later, cause a crash. This has now been fixed.
 
+  * Add extra scan for XMLTV grabbers in $PATH. Apart from $PATH we also
+    scan in /bin, /usr/bin, /usr/local/bin
+
 -- Andreas Öman <andreas@lonelycoder.com>  Wed, 03 Jun 2009 23:11:30 +0200
 
 hts-tvheadend (2.1) hts; urgency=low
index 76dd815b781c1eb6ac43c2eb3e0e4c9553d16d97..864105dd6eb1478079f0cd04a1bb43605d0cf776 100644 (file)
@@ -706,6 +706,7 @@ xmltv_grabbers_index(void)
 {
   xmltv_grabber_t *xg, *next;
   int change;
+  char *path, *p, *s;
 
   LIST_FOREACH(xg, &xmltv_grabbers, xg_link)
     xg->xg_dirty = 1;
@@ -714,6 +715,14 @@ xmltv_grabbers_index(void)
   change |= xmltv_scan_grabbers("/usr/bin");
   change |= xmltv_scan_grabbers("/usr/local/bin");
 
+  if((path = getenv("PATH")) != NULL) {
+    p = path = strdup(path);
+    while((s = strsep(&p, ":")) != NULL)
+      change |= xmltv_scan_grabbers(s);
+    free(path);
+  }
+
   for(xg = LIST_FIRST(&xmltv_grabbers); xg != NULL; xg = next) {
     next = LIST_NEXT(xg, xg_link);
     if(xg->xg_dirty) {