diff --git a/htmlui.c b/htmlui.c
index eb65abbc..77e6bf74 100644
--- a/htmlui.c
+++ b/htmlui.c
@@ -35,9 +35,11 @@
#include "epg.h"
#include "pvr.h"
#include "strtab.h"
+#include "dvb.h"
+#include "iptv_input.h"
static struct strtab recstatustxt[] = {
- { "Scheduled", HTSTV_PVR_STATUS_SCHEDULED },
+ { "Recording scheduled",HTSTV_PVR_STATUS_SCHEDULED },
{ "Recording", HTSTV_PVR_STATUS_RECORDING },
{ "Done", HTSTV_PVR_STATUS_DONE },
@@ -81,8 +83,15 @@ pvrstatus_to_html(tv_pvr_status_t pvrstatus, const char **text,
static void
-html_header(tcp_queue_t *tq, const char *title, int javascript)
+html_header(tcp_queue_t *tq, const char *title, int javascript, int width)
{
+ char w[30];
+
+ if(width > 0)
+ snprintf(w, sizeof(w), "width: %dpx; ", width);
+ else
+ w[0] = 0;
+
tcp_qprintf(tq,
"\r\n"
@@ -105,7 +114,7 @@ html_header(tcp_queue_t *tq, const char *title, int javascript)
""
"body {margin: 4px 4px; "
"font: 75% Verdana, Arial, Helvetica, sans-serif; "
- "width: 600px; margin-right: auto; margin-left: auto;}\r\n"
+ "%s margin-right: auto; margin-left: auto;}\r\n"
""
"#box {background: #cccc99;}\r\n"
".roundtop {background: #ffffff;}\r\n"
@@ -133,6 +142,8 @@ html_header(tcp_queue_t *tq, const char *title, int javascript)
".content {padding-left: 3px; border-left: 1px solid #000000; "
"border-right: 1px solid #000000;}\r\n"
""
+ ".statuscont {float: left; margin: 4px; width: 400px}\r\n"
+ ""
".logo {padding: 2px; width: 60px; height: 56px; "
"float: left};\r\n"
""
@@ -143,7 +154,7 @@ html_header(tcp_queue_t *tq, const char *title, int javascript)
"#meny li{display: inline; list-style-type: none;}\r\n"
"#meny a{padding: 1.15em 0.8em; text-decoration: none;}\r\n"
"-->\r\n"
- "");
+ "", w);
if(javascript) {
tcp_qprintf(tq,
@@ -210,6 +221,9 @@ box_bottom(tcp_queue_t *tq)
static void
top_menu(tcp_queue_t *tq)
{
+ tcp_qprintf(tq, "
");
+
box_top(tq, "box");
tcp_qprintf(tq,
@@ -221,7 +235,7 @@ top_menu(tcp_queue_t *tq)
"
");
box_bottom(tq);
- tcp_qprintf(tq, "
\r\n");
+ tcp_qprintf(tq, "
\r\n");
}
@@ -319,13 +333,14 @@ output_event(http_connection_t *hc, tcp_queue_t *tq, th_channel_t *ch,
""
""
"%02d:%02d - %02d:%02d"
- "%s",
+ "%s",
bufa,
overlibstuff,
simple ? 80 : 100,
e == cur ? ";font-weight:bold" : "",
a.tm_hour, a.tm_min, b.tm_hour, b.tm_min,
- simple ? 100 : 250,
+ simple ? 100 : 350,
e == cur ? ";font-weight:bold" : "",
title
);
@@ -352,11 +367,8 @@ page_root(http_connection_t *hc, const char *remain, void *opaque)
int i;
int simple = is_client_simple(hc);
-
tcp_init_queue(&tq, -1);
-
- html_header(&tq, "HTS/tvheadend", !simple);
-
+ html_header(&tq, "HTS/tvheadend", !simple, 700);
top_menu(&tq);
epg_lock();
@@ -383,8 +395,9 @@ page_root(http_connection_t *hc, const char *remain, void *opaque)
e = epg_event_find_current_or_upcoming(ch);
for(i = 0; i < 3 && e != NULL; i++) {
+
output_event(hc, &tq, ch, e, simple);
- e = TAILQ_NEXT(e, e_link);
+ e = TAILQ_NEXT(e, e_link);
}
tcp_qprintf(&tq, "");
@@ -440,7 +453,7 @@ page_channel(http_connection_t *hc, const char *remain, void *opaque)
tcp_init_queue(&tq, -1);
- html_header(&tq, "HTS/tvheadend", !simple);
+ html_header(&tq, "HTS/tvheadend", !simple, 700);
top_menu(&tq);
@@ -461,8 +474,8 @@ page_channel(http_connection_t *hc, const char *remain, void *opaque)
for(w = 0; w < 7; w++) {
tcp_qprintf(&tq,
- "%s
",
+ ""
+ "%s
",
ch->ch_tag, w,
days[(wday + w) % 7]);
@@ -471,8 +484,9 @@ page_channel(http_connection_t *hc, const char *remain, void *opaque)
if(a.tm_wday != wday + w)
break;
- if(a.tm_wday == wday + doff)
+ if(a.tm_wday == wday + doff) {
output_event(hc, &tq, ch, e, simple);
+ }
e = TAILQ_NEXT(e, e_link);
}
}
@@ -536,7 +550,7 @@ page_event(http_connection_t *hc, const char *remain, void *opaque)
tcp_init_queue(&tq, -1);
- html_header(&tq, "HTS/tvheadend", 0);
+ html_header(&tq, "HTS/tvheadend", 0, 700);
top_menu(&tq);
tcp_qprintf(&tq, "