Scan for XMLTV grabbers in $PATH as well.

This commit is contained in:
Andreas Öman 2009-06-07 08:45:48 +00:00
parent 58a4eb0529
commit 87f4c5e280
2 changed files with 12 additions and 0 deletions

3
debian/changelog vendored
View 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

View 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) {