Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

PR52: IPTV Radio support

  • Loading branch information...
commit e55ecdc050b612f12a12461d6c59ba9781ae712c 1 parent 53ff940
@opdenkamp authored
View
6 src/iptv_input.c
@@ -428,6 +428,7 @@ iptv_service_save(service_t *t)
inet_ntop(AF_INET6, &t->s_iptv_group6, abuf6, sizeof(abuf6));
htsmsg_add_str(m, "group", abuf6);
}
+ htsmsg_add_u32(m, "radio", t->s_servicetype == ST_RADIO);
if(t->s_ch != NULL) {
htsmsg_add_str(m, "channelname", t->s_ch->ch_name);
htsmsg_add_u32(m, "mapped", 1);
@@ -591,6 +592,11 @@ iptv_service_load(void)
if(!htsmsg_get_u32(c, "port", &u32))
t->s_iptv_port = u32;
+ if(!htsmsg_get_u32(c, "radio", &u32) && u32)
+ t->s_servicetype = ST_RADIO;
+ else
+ t->s_servicetype = ST_IPTV;
+
pthread_mutex_lock(&t->s_stream_mutex);
service_make_nicename(t);
psi_load_service_settings(c, t);
View
4 src/service.c
@@ -732,6 +732,7 @@ static struct strtab stypetab[] = {
{ "HDTV", ST_HDTV },
{ "SDTV-AC", ST_AC_SDTV },
{ "HDTV-AC", ST_AC_HDTV },
+ { "IPTV", ST_IPTV },
};
const char *
@@ -750,7 +751,8 @@ service_is_tv(service_t *t)
t->s_servicetype == ST_SDTV ||
t->s_servicetype == ST_HDTV ||
t->s_servicetype == ST_AC_SDTV ||
- t->s_servicetype == ST_AC_HDTV;
+ t->s_servicetype == ST_AC_HDTV ||
+ t->s_servicetype == ST_IPTV;
}
/**
View
1  src/service.h
@@ -318,6 +318,7 @@ typedef struct service {
ST_HDTV = 0x11, /* HDTV (MPEG2) */
ST_AC_SDTV = 0x16, /* Advanced codec SDTV */
ST_AC_HDTV = 0x19, /* Advanced codec HDTV */
+ ST_IPTV = 0x30, /* IPTV */
} s_servicetype;
View
10 src/webui/extjs.c
@@ -1313,7 +1313,14 @@ service_update_iptv(htsmsg_t *in)
}
save = 1;
}
-
+ if(!htsmsg_get_u32(c, "radio", &u32)) {
+ if(u32)
+ t->s_servicetype = ST_RADIO;
+ else
+ t->s_servicetype = ST_IPTV;
+ save = 1;
+ }
+
save |= tvh_str_update(&t->s_iptv_iface, htsmsg_get_str(c, "interface"));
if(save)
@@ -1347,6 +1354,7 @@ build_record_iptv(service_t *t)
}
htsmsg_add_u32(r, "port", t->s_iptv_port);
+ htsmsg_add_u32(r, "radio", t->s_servicetype == ST_RADIO);
htsmsg_add_u32(r, "enabled", t->s_enabled);
return r;
}
View
11 src/webui/static/app/iptv.js
@@ -11,6 +11,12 @@ tvheadend.iptv = function(adapterId) {
width: 45
});
+ var radioColumn = new Ext.grid.CheckColumn({
+ header: "Radio",
+ dataIndex: 'radio',
+ width: 45
+ });
+
var actions = new Ext.ux.grid.RowActions({
header:'',
dataIndex: 'actions',
@@ -82,6 +88,7 @@ tvheadend.iptv = function(adapterId) {
maxValue: 65535
})
},
+ radioColumn,
{
header: "Service ID",
dataIndex: 'sid',
@@ -105,7 +112,7 @@ tvheadend.iptv = function(adapterId) {
cm.defaultSortable = true;
var rec = Ext.data.Record.create([
- 'id', 'enabled', 'channelname', 'interface', 'group', 'port',
+ 'id', 'enabled', 'channelname', 'interface', 'group', 'port', 'radio',
'sid', 'pmt', 'pcr'
]);
@@ -246,7 +253,7 @@ tvheadend.iptv = function(adapterId) {
stripeRows: true,
title: 'IPTV',
iconCls: 'iptv',
- plugins: [enabledColumn, actions],
+ plugins: [enabledColumn, radioColumn, actions],
store: store,
clicksToEdit: 2,
cm: cm,
Please sign in to comment.
Something went wrong with that request. Please try again.