From 74d424da009f9be34eea3b52a28d0f1118590c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rblom?= Date: Sun, 21 Jul 2013 21:31:04 +0200 Subject: [PATCH] html5video: moved index file into tvheadend --- src/webui/extjs.c | 37 +++++++++++++++++++++++++++++++++++++ src/webui/static/tv.html | 15 --------------- src/webui/static/tv.js | 4 ++-- 3 files changed, 39 insertions(+), 17 deletions(-) delete mode 100644 src/webui/static/tv.html diff --git a/src/webui/extjs.c b/src/webui/extjs.c index 9478725d..bc2bf331 100644 --- a/src/webui/extjs.c +++ b/src/webui/extjs.c @@ -186,6 +186,42 @@ extjs_root(http_connection_t *hc, const char *remain, void *opaque) return 0; } + +/** + * + */ +static int +extjs_livetv(http_connection_t *hc, const char *remain, void *opaque) +{ + htsbuf_queue_t *hq = &hc->hc_reply; + + htsbuf_qprintf(hq, "\n"); + htsbuf_qprintf(hq, "\n"); + htsbuf_qprintf(hq, "\n"); + htsbuf_qprintf(hq, "HTS Tvheadend %s\n", tvheadend_version); + htsbuf_qprintf(hq, "\n"); + + if(tvheadend_webui_debug) { + extjs_load(hq, "static/extjs/adapter/ext/ext-base-debug.js"); + extjs_load(hq, "static/extjs/ext-all-debug.js"); + } else { + extjs_load(hq, "static/extjs/adapter/ext/ext-base.js"); + extjs_load(hq, "static/extjs/ext-all.js"); + } + + extjs_load(hq, "static/tv.js"); + extjs_exec(hq, "Ext.onReady(tv.app.init, tv.app);"); + + htsbuf_qprintf(hq, "\n"); + htsbuf_qprintf(hq, "\n"); + htsbuf_qprintf(hq, "\n"); + + http_output_html(hc); + + return 0; +} + + /** * */ @@ -2240,6 +2276,7 @@ extjs_start(void) { http_path_add("/about.html", NULL, page_about, ACCESS_WEB_INTERFACE); http_path_add("/extjs.html", NULL, extjs_root, ACCESS_WEB_INTERFACE); + http_path_add("/tv.html", NULL, extjs_livetv, ACCESS_WEB_INTERFACE); http_path_add("/capabilities", NULL, extjs_capabilities, ACCESS_WEB_INTERFACE); http_path_add("/tablemgr", NULL, extjs_tablemgr, ACCESS_WEB_INTERFACE); http_path_add("/channels", NULL, extjs_channels, ACCESS_WEB_INTERFACE); diff --git a/src/webui/static/tv.html b/src/webui/static/tv.html deleted file mode 100644 index a0f74c3f..00000000 --- a/src/webui/static/tv.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - Tvheadend - - - - - - - - - diff --git a/src/webui/static/tv.js b/src/webui/static/tv.js index 8fe15e92..707dd0b9 100644 --- a/src/webui/static/tv.js +++ b/src/webui/static/tv.js @@ -162,7 +162,7 @@ tv.ui.VideoPlayer = Ext.extend(Ext.Panel, (function() { }, _getUrl: function(chid, params) { - var url = '../'; + var url = ''; if(params.playlist) url += 'playlist/channelid/' @@ -383,7 +383,7 @@ tv.app = function() { field : 'number', direction : "ASC" }, - url : "../channels", + url : "channels", baseParams : { op : 'list' }