]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
create channels when reading pvrschedule
authorAndreas Öman <andreas@lonelycoder.com>
Mon, 27 Aug 2007 19:06:33 +0000 (19:06 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Mon, 27 Aug 2007 19:06:33 +0000 (19:06 +0000)
pvr.c

diff --git a/pvr.c b/pvr.c
index 75c97ee08563b829d9ebd30dcf1bf5800d09bf11..7f4952a14d749e2b819b0c61b296fc1e3ea00bbc 100644 (file)
--- a/pvr.c
+++ b/pvr.c
@@ -390,7 +390,6 @@ pvr_database_load(void)
 {
   char line[4000];
   pvr_rec_t *pvrr = NULL;
-  th_channel_t *ch;
   FILE *fp;
   int l;
   char *key, *val;
@@ -418,12 +417,8 @@ pvr_database_load(void)
       continue;
     *val++ = 0;
 
-    if(!strcmp(key, "channel")) {
-      TAILQ_FOREACH(ch, &channels, ch_global_link)
-       if(!strcmp(ch->ch_name, val))
-         break;
-      pvrr->pvrr_channel = ch;
-    }
+    if(!strcmp(key, "channel"))
+      pvrr->pvrr_channel = channel_find(val, 1);
     
     else if(!strcmp(key, "start"))
       pvrr->pvrr_start = atoi(val);