]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
opentv: fix missing summary data on rescrape, #5995
authorJames Hutchinson <jahutchinson99@googlemail.com>
Tue, 19 Oct 2021 14:35:27 +0000 (15:35 +0100)
committerFlole998 <Flole998@users.noreply.github.com>
Thu, 21 Oct 2021 00:14:56 +0000 (02:14 +0200)
Chunks of events within the OpenTV data can contain blank summaries
following a re-scrape.

The issue of blank summary data occurs when the event in question
already exists in the guide, and upon rescrape the summary record for
the event in question is procesed before the title record.

In this scenario we should merge the data to avoid blanking out the
summary data.

src/epggrab/module/opentv.c

index 308e49d8cd250a592374314482960a697139b6b0..c76507d3a2110f246ff81bbaa1c7475a4356703a 100644 (file)
@@ -496,12 +496,12 @@ opentv_parse_event_section_one
       ebc = epg_broadcast_find_by_time(ch, src, ev.start, ev.stop,
                                        1, &save, &changes);
       tvhdebug(LS_OPENTV, "find by time start %"PRItime_t " stop "
-               "%"PRItime_t " eid %d = %p",
-               ev.start, ev.stop, ev.eid, ebc);
+               "%"PRItime_t " ch %"PRId64" eid %d = %p",
+               ev.start, ev.stop, ch->ch_number, ev.eid, ebc);
       save |= epg_broadcast_set_dvb_eid(ebc, ev.eid, &changes);
     } else {
       ebc = epg_broadcast_find_by_eid(ch, ev.eid);
-      tvhdebug(LS_OPENTV, "find by eid %d = %p", ev.eid, ebc);
+      tvhdebug(LS_OPENTV, "find by ch %"PRId64" eid %d = %p", ch->ch_number, ev.eid, ebc);
       if (ebc) {
         if (ebc->grabber != src)
           goto done;
@@ -517,6 +517,8 @@ opentv_parse_event_section_one
         if (entry) {
           save |= opentv_do_event(mod, ebc, &entry->event, ch, lang, &changes);
           opentv_remove_entry(mod->sta, entry);
+        } else {
+          merge = 1;
         }
       }
       save |= epg_broadcast_change_finish(ebc, changes, merge);