From e8794525aca13d9eb61bd0a10166b48259b1a8fc Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Tue, 19 Jun 2012 00:17:45 +0100 Subject: [PATCH] Minor hack to make series linking work properly with sky epg info. --- src/epggrab/opentv.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/epggrab/opentv.c b/src/epggrab/opentv.c index ccf5189b..f65a7052 100644 --- a/src/epggrab/opentv.c +++ b/src/epggrab/opentv.c @@ -320,10 +320,6 @@ static int _opentv_parse_event_section } if (ebc) { - if (ebc->dvb_eid != ev.eid) { - ebc->dvb_eid = ev.eid; - save = 1; - } /* Create/Find episode */ if (*ev.description || *ev.summary) { @@ -334,6 +330,14 @@ static int _opentv_parse_event_section ee = ebc->episode; } + /* DVB Event Id */ + // TODO: this causes serious problems for channels backed by multiple + // services where the ids don't match + if (ebc->dvb_eid != ev.eid) { + ebc->dvb_eid = ev.eid; + save = 1; + } + /* Set episode data */ if (ee) { if (*ev.description) @@ -345,8 +349,11 @@ static int _opentv_parse_event_section if (ev.cat) save |= epg_episode_set_genre(ee, &ev.cat, 1); - // TODO: series link - if (ev.serieslink) { + // Note: we don't overwrite an existing season, the reason for + // this is that seasons in opentv are channel specific but episodes + // are not (to allow episode matching) so this is a bit of bodge + // to make things play nice + if (ev.serieslink && !ee->season) { es = _opentv_find_season(mod, cid, ev.serieslink); if (es) save |= epg_episode_set_season(ee, es); }