From: Jaroslav Kysela Date: Fri, 26 Aug 2016 19:01:39 +0000 (+0200) Subject: bouquet: remove wrong last_lcn code X-Git-Tag: v4.2.1~347 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9e483de53145c0ff805d5b3396a385bf2702f07;p=thirdparty%2Ftvheadend.git bouquet: remove wrong last_lcn code --- diff --git a/src/bouquet.c b/src/bouquet.c index 0f278f7d9..ae52361e4 100644 --- a/src/bouquet.c +++ b/src/bouquet.c @@ -34,7 +34,6 @@ typedef struct bouquet_download { bouquet_tree_t bouquets; static void bouquet_remove_service(bouquet_t *bq, service_t *s, int delconf); -static uint64_t bouquet_get_channel_number0(bouquet_t *bq, service_t *t); static void bouquet_download_trigger(bouquet_t *bq); static void bouquet_download_stop(void *aux); static int bouquet_download_process(void *aux, const char *last_url, const char *host_url, char *data, size_t len); @@ -298,8 +297,8 @@ bouquet_map_channel(bouquet_t *bq, service_t *t) if (!bq->bq_mapradio && service_is_radio(t)) return; if (!bq->bq_mapnolcn && - (bq->bq_only_bq_lcn || service_get_channel_number(t) <= 0) && - bouquet_get_channel_number0(bq, t) <= 0) + service_get_channel_number(t) <= 0 && + bouquet_get_channel_number(bq, t) <= 0) return; if (!bq->bq_mapnoname && noname(service_get_channel_name(t))) return; @@ -362,12 +361,6 @@ bouquet_add_service(bouquet_t *bq, service_t *s, uint64_t lcn, const char *tag) } tl->sl_seen = 1; - if (lcn) { - bq->bq_only_bq_lcn = 1; - if (bq->bq_last_lcn < lcn) - bq->bq_last_lcn = lcn; - } - if (bq->bq_enabled && bq->bq_maptoch) bouquet_map_channel(bq, s); @@ -542,8 +535,8 @@ bouquet_notify_channels(bouquet_t *bq) /* * */ -static uint64_t -bouquet_get_channel_number0(bouquet_t *bq, service_t *t) +uint64_t +bouquet_get_channel_number(bouquet_t *bq, service_t *t) { service_lcn_t *tl; @@ -553,20 +546,6 @@ bouquet_get_channel_number0(bouquet_t *bq, service_t *t) return 0; } -/* - * - */ -uint64_t -bouquet_get_channel_number(bouquet_t *bq, service_t *t) -{ - int64_t r = bouquet_get_channel_number0(bq, t); - if (r) - return r; - if (bq->bq_only_bq_lcn) - return bq->bq_last_lcn + 10 * CHANNEL_SPLIT; - return 0; -} - /* * */ @@ -899,7 +878,7 @@ bouquet_class_services_get ( void *obj ) for (z = 0; z < bq->bq_services->is_count; z++) { t = (service_t *)bq->bq_services->is_array[z]; e = htsmsg_create_map(); - if ((lcn = bouquet_get_channel_number0(bq, t)) != 0) + if ((lcn = bouquet_get_channel_number(bq, t)) != 0) htsmsg_add_s64(e, "lcn", lcn); if ((tag = bouquet_get_tag_name(bq, t)) != NULL) htsmsg_add_str(e, "tag", tag); diff --git a/src/bouquet.h b/src/bouquet.h index 900637e0b..cd269da03 100644 --- a/src/bouquet.h +++ b/src/bouquet.h @@ -30,7 +30,6 @@ typedef struct bouquet { int bq_saveflag; int bq_in_load; - int bq_only_bq_lcn; int bq_shield; int bq_enabled; @@ -58,7 +57,6 @@ typedef struct bouquet { htsmsg_t *bq_services_waiting; uint32_t bq_services_seen; uint32_t bq_lcn_offset; - uint64_t bq_last_lcn; /* fastscan bouquet helpers */ int bq_fastscan_nit;