]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
opentv: fix bug introduced with recent changes - missing EPG for some channels
authorJaroslav Kysela <perex@perex.cz>
Sat, 31 Jan 2015 15:22:23 +0000 (16:22 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 31 Jan 2015 15:22:23 +0000 (16:22 +0100)
src/epggrab/module/opentv.c

index b05fc8f426363084a1b0251857dd926ce4599875..c0fd28a8290c0566c4d3c146d38dd85e2e2f43cb 100644 (file)
@@ -453,18 +453,6 @@ opentv_desc_channels
   int save = 0;
   int i = 2;
 
-  if (mod->bouquetid != nbid) {
-    if (mod->bouquet_auto) {
-      if (nbid < mod->bouquetid) {
-        tvhwarn(mt->mt_name, "bouquet id set to %d, report this!", nbid);
-        mod->bouquetid = nbid;
-      } else
-        return 0;
-    } else {
-      return 0;
-    }
-  }
-
   while (i < len) {
     sid  = ((int)buf[i] << 8) | buf[i+1];
 #if ENABLE_TRACE
@@ -481,11 +469,22 @@ opentv_desc_channels
     tvhtrace(mt->mt_name, "     svc %p [%s]", svc, svc ? svc->s_nicename : NULL);
     if (svc && svc->s_dvb_opentv_chnum != cnum &&
         (!svc->s_dvb_opentv_id || svc->s_dvb_opentv_id == unk)) {
+      if (mod->bouquetid != nbid) {
+        if (mod->bouquet_auto) {
+          if (nbid < mod->bouquetid) {
+            tvhwarn(mt->mt_name, "bouquet id set to %d, report this!", nbid);
+            mod->bouquetid = nbid;
+          } else
+            goto skip_chnum;
+        } else
+          goto skip_chnum;
+      }
       tvhtrace(mt->mt_name, "      cnum changed (%i != %i)", cnum, (int)svc->s_dvb_opentv_chnum);
       svc->s_dvb_opentv_chnum = cnum;
       svc->s_dvb_opentv_id = unk;
       service_request_save((service_t *)svc, 0);
     }
+skip_chnum:
     if (svc && LIST_FIRST(&svc->s_channels)) {
       ec  =_opentv_find_epggrab_channel(mod, cid, 1, &save);
       ecl = LIST_FIRST(&ec->channels);