diff --git a/ajaxui/ajaxui_config_channels.c b/ajaxui/ajaxui_config_channels.c
index 7d8b8534..62d5a5d4 100644
--- a/ajaxui/ajaxui_config_channels.c
+++ b/ajaxui/ajaxui_config_channels.c
@@ -45,8 +45,10 @@ ajax_chgroup_build(tcp_queue_t *tq, th_channel_group_t *tcg)
tcp_qprintf(tq,
"
");
+ tcp_qprintf(tq, "
");
ajax_box_begin(tq, AJAX_BOX_SIDEBOX, "channelgroups",
NULL, "Channel groups");
@@ -200,6 +202,9 @@ ajax_config_channels_tab(http_connection_t *hc, http_reply_t *hr)
/**
* Add new group
*/
+
+ tcp_qprintf(tq, "
");
+
ajax_box_begin(tq, AJAX_BOX_BORDER, NULL, NULL, NULL);
tcp_qprintf(tq,
@@ -221,10 +226,12 @@ ajax_config_channels_tab(http_connection_t *hc, http_reply_t *hr)
tcp_qprintf(tq,
"
");
+ "style=\"overflow: auto; float: left; width: 30%\">
");
+
+ tcp_qprintf(tq,
+ "
");
- tcp_qprintf(tq, "
");
http_output_html(hc, hr);
return 0;
}
@@ -239,34 +246,90 @@ ajax_chgroup_editor(http_connection_t *hc, http_reply_t *hr,
tcp_queue_t *tq = &hr->hr_tq;
th_channel_t *ch;
th_channel_group_t *tcg;
+ int rowcol = 1;
+ int disprows;
if(remain == NULL || (tcg = channel_group_by_tag(atoi(remain))) == NULL)
return HTTP_STATUS_BAD_REQUEST;
+
+
+ tcp_qprintf(tq, "\r\n");
+
+
ajax_box_begin(tq, AJAX_BOX_SIDEBOX, NULL, NULL, tcg->tcg_name);
- tcp_qprintf(tq, "
");
+ tcp_qprintf(tq, ""
+ "Channels
");
+
+ disprows = 30;
+
+ tcp_qprintf(tq, "",
+ disprows * 14);
TAILQ_FOREACH(ch, &tcg->tcg_channels, ch_group_link) {
- tcp_qprintf(tq, "
- ", ch->ch_tag);
-
- ajax_box_begin(tq, AJAX_BOX_BORDER, NULL, NULL, NULL);
-
- tcp_qprintf(tq, "
");
-
tcp_qprintf(tq,
- "
"
- "
"
- "%s"
+ "
",
- ch->ch_name);
-
- tcp_qprintf(tq, "
");
- ajax_box_end(tq, AJAX_BOX_BORDER);
- tcp_qprintf(tq, "");
+ rowcol ? "background: #fff; " : "",
+ ch->ch_tag, ch->ch_name, ch->ch_tag);
+ rowcol = !rowcol;
}
- tcp_qprintf(tq, "");
+ tcp_qprintf(tq, "
");
+
+ tcp_qprintf(tq, "
\r\n");
+
+ tcp_qprintf(tq, "");
+
+ tcp_qprintf(tq, "
Select:
");
+
+ ajax_a_jsfunc(tq, "All", "select_all();", " / ");
+ ajax_a_jsfunc(tq, "None", "select_none();", " / ");
+ ajax_a_jsfunc(tq, "Invert", "select_invert();", "");
+
+ tcp_qprintf(tq, "
\r\n");
+
ajax_box_end(tq, AJAX_BOX_SIDEBOX);
@@ -275,6 +338,81 @@ ajax_chgroup_editor(http_connection_t *hc, http_reply_t *hr,
return 0;
}
+
+/**
+ *
+ */
+static struct strtab sourcetypetab[] = {
+ { "DVB", TRANSPORT_DVB },
+ { "V4L", TRANSPORT_V4L },
+ { "IPTV", TRANSPORT_IPTV },
+ { "AVgen", TRANSPORT_AVGEN },
+ { "File", TRANSPORT_STREAMEDFILE },
+};
+
+
+/**
+ * Display all channels within the group
+ */
+static int
+ajax_cheditor(http_connection_t *hc, http_reply_t *hr,
+ const char *remain, void *opaque)
+{
+ tcp_queue_t *tq = &hr->hr_tq;
+ th_channel_t *ch;
+ th_transport_t *t;
+ const char *s;
+
+ if(remain == NULL || (ch = channel_by_tag(atoi(remain))) == NULL)
+ return HTTP_STATUS_BAD_REQUEST;
+
+ ajax_box_begin(tq, AJAX_BOX_SIDEBOX, NULL, NULL, ch->ch_name);
+
+ tcp_qprintf(tq, "Sources:
");
+
+ LIST_FOREACH(t, &ch->ch_transports, tht_channel_link) {
+ ajax_box_begin(tq, AJAX_BOX_BORDER, NULL, NULL, NULL);
+ tcp_qprintf(tq, "");
+ tcp_qprintf(tq, "
%s
",
+ val2str(t->tht_type, sourcetypetab) ?: "???");
+ tcp_qprintf(tq, "
\"%s\"%s
",
+ t->tht_servicename, t->tht_scrambled ? " - (scrambled)" : "");
+ s = t->tht_sourcename ? t->tht_sourcename(t) : NULL;
+
+ tcp_qprintf(tq, "
");
+
+ tcp_qprintf(tq,
+ "
"
+ ""
+ "
");
+
+ if(s != NULL)
+ tcp_qprintf(tq, "
%s
",
+ s);
+
+ tcp_qprintf(tq, "
");
+
+ ajax_box_end(tq, AJAX_BOX_BORDER);
+ }
+
+ tcp_qprintf(tq, "
\r\n");
+
+ tcp_qprintf(tq,
+ "Commercial detection:
"
+ ""
+ "
");
+ tcp_qprintf(tq, " ");
+
+
+ ajax_box_end(tq, AJAX_BOX_SIDEBOX);
+ http_output_html(hc, hr);
+ return 0;
+}
+
/**
*
*/
@@ -285,4 +423,5 @@ ajax_config_channels_init(void)
http_path_add("/ajax/chgroup_del" , NULL, ajax_chgroup_del);
http_path_add("/ajax/chgroup_updateorder", NULL, ajax_chgroup_updateorder);
http_path_add("/ajax/chgroup_editor", NULL, ajax_chgroup_editor);
+ http_path_add("/ajax/cheditor", NULL, ajax_cheditor);
}