From: Jaroslav Kysela Date: Mon, 18 Dec 2017 08:23:12 +0000 (+0100) Subject: epggrab: ota_create - pass the idclass to make things more configurable X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73c5f37b56a9765f3862ba30cbe74763695b9f7e;p=thirdparty%2Ftvheadend.git epggrab: ota_create - pass the idclass to make things more configurable --- diff --git a/src/epggrab/module.c b/src/epggrab/module.c index 8a84c758c..5808b0d56 100644 --- a/src/epggrab/module.c +++ b/src/epggrab/module.c @@ -687,15 +687,14 @@ epggrab_module_ext_t *epggrab_module_ext_create epggrab_module_ota_t *epggrab_module_ota_create ( epggrab_module_ota_t *skel, const char *id, int subsys, const char *saveid, - const char *name, int priority, int with_scraper, - epggrab_ota_module_ops_t *ops ) + const char *name, int priority, const idclass_t *idclass, + const epggrab_ota_module_ops_t *ops ) { if (!skel) skel = calloc(1, sizeof(epggrab_module_ota_t)); /* Pass through */ epggrab_module_create((epggrab_module_t*)skel, - with_scraper ? - &epggrab_mod_ota_scraper_class : &epggrab_mod_ota_class, + idclass ?: &epggrab_mod_ota_class, id, subsys, saveid, name, priority); /* Setup */ diff --git a/src/epggrab/module/eit.c b/src/epggrab/module/eit.c index 5e1714051..09dd233ce 100644 --- a/src/epggrab/module/eit.c +++ b/src/epggrab/module/eit.c @@ -1246,8 +1246,8 @@ static eit_module_t *eit_module_ota_create { eit_module_t * mod = (eit_module_t *) epggrab_module_ota_create(calloc(1, sizeof(eit_module_t)), - id, subsys, saveid, - name, priority, 1, ops); + id, subsys, saveid, name, priority, + &epggrab_mod_ota_scraper_class, ops); return mod; } diff --git a/src/epggrab/module/opentv.c b/src/epggrab/module/opentv.c index 01ca2846c..8609f2752 100644 --- a/src/epggrab/module/opentv.c +++ b/src/epggrab/module/opentv.c @@ -941,7 +941,7 @@ static int _opentv_prov_load_one ( const char *id, htsmsg_t *m ) sprintf(nbuf, "OpenTV: %s", name); mod = (opentv_module_t *) epggrab_module_ota_create(calloc(1, sizeof(opentv_module_t)), - ibuf, LS_OPENTV, NULL, nbuf, 2, 0, &ops); + ibuf, LS_OPENTV, NULL, nbuf, 2, NULL, &ops); /* Add provider details */ mod->dict = dict; diff --git a/src/epggrab/module/psip.c b/src/epggrab/module/psip.c index 45cf2d6ef..34c3f6cd5 100644 --- a/src/epggrab/module/psip.c +++ b/src/epggrab/module/psip.c @@ -775,7 +775,8 @@ void psip_init ( void ) .tune = _psip_tune, }; - epggrab_module_ota_create(NULL, "psip", LS_PSIP, NULL, "PSIP: ATSC Grabber", 1, 0, &ops); + epggrab_module_ota_create(NULL, "psip", LS_PSIP, NULL, "PSIP: ATSC Grabber", + 1, NULL, &ops); } void psip_done ( void ) diff --git a/src/epggrab/private.h b/src/epggrab/private.h index 346dca05f..7066394b8 100644 --- a/src/epggrab/private.h +++ b/src/epggrab/private.h @@ -111,8 +111,9 @@ typedef struct epggrab_ota_module_ops { epggrab_module_ota_t *epggrab_module_ota_create ( epggrab_module_ota_t *skel, const char *id, int subsys, const char *saveid, - const char *name, int priority, int with_scraper, - epggrab_ota_module_ops_t *ops ); + const char *name, int priority, + const idclass_t *idclass, + const epggrab_ota_module_ops_t *ops ); /* ************************************************************************** * OTA mux link routines @@ -196,6 +197,7 @@ extern const idclass_t epggrab_mod_ext_class; extern const idclass_t epggrab_mod_ext_pyepg_class; extern const idclass_t epggrab_mod_ext_xmltv_class; extern const idclass_t epggrab_mod_ota_class; +extern const idclass_t epggrab_mod_ota_scraper_class; /* ************************************************************************** * Module setup(s)