Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
IPTV: move the service create logic to the proper location
  • Loading branch information
perexg committed Oct 16, 2015
1 parent 9539fd7 commit 151683e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/input/mpegts/iptv/iptv_auto.c
Expand Up @@ -101,7 +101,6 @@ iptv_auto_network_process_m3u_item(iptv_network_t *in,
htsmsg_t *conf;
mpegts_mux_t *mm;
iptv_mux_t *im;
iptv_service_t *ms;
url_t u;
int change;
http_arg_list_t args;
Expand Down Expand Up @@ -231,16 +230,6 @@ iptv_auto_network_process_m3u_item(iptv_network_t *in,
(*count)++;
}

if (in->in_service_id) {
conf = htsmsg_create_map();
htsmsg_add_u32(conf, "sid", in->in_service_id);
htsmsg_add_u32(conf, "dvb_servicetype", 1); /* SDTV */
ms = iptv_service_create0(im, 0, 0, NULL, conf);
htsmsg_destroy(conf);
if (ms)
iptv_bouquet_trigger(in, 0);
}

end:
free(x);
urlreset(&u);
Expand Down
9 changes: 9 additions & 0 deletions src/input/mpegts/iptv/iptv_mux.c
Expand Up @@ -283,6 +283,7 @@ iptv_mux_create0 ( iptv_network_t *in, const char *uuid, htsmsg_t *conf )
{
htsmsg_t *c, *e;
htsmsg_field_t *f;
iptv_service_t *ms;
char ubuf[UUID_HEX_SIZE];

/* Create Mux */
Expand Down Expand Up @@ -314,6 +315,14 @@ iptv_mux_create0 ( iptv_network_t *in, const char *uuid, htsmsg_t *conf )
if (!(e = htsmsg_field_get_map(f))) continue;
(void)iptv_service_create0(im, 0, 0, f->hmf_name, e);
}
} else if (in->in_service_id) {
conf = htsmsg_create_map();
htsmsg_add_u32(conf, "sid", in->in_service_id);
htsmsg_add_u32(conf, "dvb_servicetype", 1); /* SDTV */
ms = iptv_service_create0(im, 0, 0, NULL, conf);
htsmsg_destroy(conf);
if (ms)
iptv_bouquet_trigger(in, 0);
}
htsmsg_destroy(c);

Expand Down

0 comments on commit 151683e

Please sign in to comment.