mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
add simple Webif for WebTV WebRadio and xmltv
Conflicts: data/y-web/languages/Deutsch data/y-web/languages/English
This commit is contained in:
@@ -67,6 +67,7 @@ install_DATA = channels.js \
|
|||||||
Y_Settings_video_audio.yhtm \
|
Y_Settings_video_audio.yhtm \
|
||||||
Y_Settings_VNC.yhtm \
|
Y_Settings_VNC.yhtm \
|
||||||
Y_Settings_wol.yhtm \
|
Y_Settings_wol.yhtm \
|
||||||
|
Y_Settings_xmltv.yhtm \
|
||||||
Y_Settings_yWeb.yhtm \
|
Y_Settings_yWeb.yhtm \
|
||||||
Y_Settings_zapit.yhtm \
|
Y_Settings_zapit.yhtm \
|
||||||
Y_StreamInfo.yhtm \
|
Y_StreamInfo.yhtm \
|
||||||
|
@@ -107,6 +107,11 @@ function init(){
|
|||||||
{=var-set:m_link_text={=L:set.menue.lcd_display=}=}
|
{=var-set:m_link_text={=L:set.menue.lcd_display=}=}
|
||||||
{=include-block:Y_Blocks.txt;management_link=}
|
{=include-block:Y_Blocks.txt;management_link=}
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
{=var-set:m_link_href=Y_Settings_xmltv.yhtm=}
|
||||||
|
{=var-set:m_link_text={=L:set.menue.xmltv=}=}
|
||||||
|
{=include-block:Y_Blocks.txt;management_link=}
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
{=var-set:m_link_href=Y_Settings_buttons.yhtm=}
|
{=var-set:m_link_href=Y_Settings_buttons.yhtm=}
|
||||||
{=var-set:m_link_text={=L:set.menue.key_settings=}=}
|
{=var-set:m_link_text={=L:set.menue.key_settings=}=}
|
||||||
|
52
data/y-web/Y_Settings_xmltv.yhtm
Normal file
52
data/y-web/Y_Settings_xmltv.yhtm
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{=include-block:Y_Blocks.txt;management_check_top=}
|
||||||
|
{=include-block:Y_Blocks.txt;head=}
|
||||||
|
<script type="text/javascript" src="/Y_Baselib.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
//<![CDATA[
|
||||||
|
function do_submit() {
|
||||||
|
show_waitbox(true);
|
||||||
|
document.f.submit();
|
||||||
|
}
|
||||||
|
//]]>
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{=var-set:wait_text={=L:save_values=}=}{=include-block:Y_Blocks.txt;snip_wait=}
|
||||||
|
<div class="work_box">
|
||||||
|
<div class="work_box_head"><div class="work_box_head_h2">
|
||||||
|
{=var-set:help_url=Help-Settings-XMLTV_Settings=}{=var-set:menu={=L:set.xmltv.header=}=}{=include-block:Y_Blocks.txt;work_menu=}</div></div>
|
||||||
|
<div class="work_box_body">
|
||||||
|
<form name="f" class="y_form" accept-charset="UTF-8" action="/control/xmltvlist" method="POST" enctype="x-www-form-urlencoded">
|
||||||
|
<table border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="y_form_header">WebTV</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td><textarea id="webtv" name="webtv" cols="120" rows="10">{=func:get_webtv_list=}</textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="y_form_header">WebRadio</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td><textarea id="webradio" name="webradio" cols="120" rows="10">{=func:get_webradio_list=}</textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="y_form_header">XMLTV</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td><textarea id="xmltv" name="xmltv" cols="120" rows="10">{=func:get_xmltv_list=}</textarea></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
<input type="hidden" name="tmpl" value="Y_Settings_xmltv.yhtm"/>
|
||||||
|
<button type="button" ytype="save" title="submit and save values" onclick="do_submit()">{=L:save=}</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{=include-block:Y_Blocks.txt;management_check_bottom=}
|
||||||
|
|
@@ -256,6 +256,8 @@ set.menue.boot_options=Bootoptionen
|
|||||||
set.menue.peronalization=Personalisierung
|
set.menue.peronalization=Personalisierung
|
||||||
set.menue.plugins=Plugins
|
set.menue.plugins=Plugins
|
||||||
set.menue.others=Diverses
|
set.menue.others=Diverses
|
||||||
|
set.menue.xmltv=XMLTV
|
||||||
|
|
||||||
========Neutrino Settings - Recording
|
========Neutrino Settings - Recording
|
||||||
set.rec.rec_dest=Aufnahmeziel
|
set.rec.rec_dest=Aufnahmeziel
|
||||||
set.rec.device=Aufnahmegerät
|
set.rec.device=Aufnahmegerät
|
||||||
@@ -406,6 +408,9 @@ set.settings.restore=Wiederherstellen
|
|||||||
set.settings.restore_desc=Hochladen und wiederherstellen einer vorher erstellten Sicherung. Ihre Box startet danach neu.
|
set.settings.restore_desc=Hochladen und wiederherstellen einer vorher erstellten Sicherung. Ihre Box startet danach neu.
|
||||||
set.settings.warning=Sichern & Wiederherstellen ist nur bei einem gleichen Image mit gleichem Entwicklungsstand sinnvoll.
|
set.settings.warning=Sichern & Wiederherstellen ist nur bei einem gleichen Image mit gleichem Entwicklungsstand sinnvoll.
|
||||||
|
|
||||||
|
============Settings XMLTV
|
||||||
|
set.xmltv.header=XMLTV Einstellungen
|
||||||
|
|
||||||
============ Tools Info
|
============ Tools Info
|
||||||
tools.info.show_messages=Kernel Meldungen
|
tools.info.show_messages=Kernel Meldungen
|
||||||
tools.info.processes=Prozesse
|
tools.info.processes=Prozesse
|
||||||
|
@@ -259,6 +259,8 @@ set.menue.boot_options=Boot options
|
|||||||
set.menue.peronalization=Personalization
|
set.menue.peronalization=Personalization
|
||||||
set.menue.plugins=Plugins
|
set.menue.plugins=Plugins
|
||||||
set.menue.others=Others
|
set.menue.others=Others
|
||||||
|
set.menue.xmltv=XMLTV
|
||||||
|
|
||||||
========Neutrino Settings - Recording
|
========Neutrino Settings - Recording
|
||||||
set.rec.rec_dest=Recoring destination
|
set.rec.rec_dest=Recoring destination
|
||||||
set.rec.device=Recording device
|
set.rec.device=Recording device
|
||||||
@@ -409,6 +411,9 @@ set.settings.restore=Restore
|
|||||||
set.settings.restore_desc=Upload and restore your settings. Your STB will reboot.
|
set.settings.restore_desc=Upload and restore your settings. Your STB will reboot.
|
||||||
set.settings.warning=Backup & Restore is only useful for the same image with the same level of development.
|
set.settings.warning=Backup & Restore is only useful for the same image with the same level of development.
|
||||||
|
|
||||||
|
============Settings XMLTV
|
||||||
|
set.xmltv.header=XMLTV Settings
|
||||||
|
|
||||||
============ Tools Info
|
============ Tools Info
|
||||||
tools.info.show_messages=Kernel Messages
|
tools.info.show_messages=Kernel Messages
|
||||||
tools.info.processes=Processes
|
tools.info.processes=Processes
|
||||||
|
@@ -236,6 +236,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
|
|||||||
{"xmltv.data", &CControlAPI::xmltvepgCGI, "+xml"},
|
{"xmltv.data", &CControlAPI::xmltvepgCGI, "+xml"},
|
||||||
{"xmltv.xml", &CControlAPI::xmltvepgCGI, "+xml"},
|
{"xmltv.xml", &CControlAPI::xmltvepgCGI, "+xml"},
|
||||||
{"xmltv.m3u", &CControlAPI::xmltvm3uCGI, ""},
|
{"xmltv.m3u", &CControlAPI::xmltvm3uCGI, ""},
|
||||||
|
{"xmltvlist", &CControlAPI::xmltvlistCGI, "text/plain"},
|
||||||
// utils
|
// utils
|
||||||
{"build_live_url", &CControlAPI::build_live_url, ""},
|
{"build_live_url", &CControlAPI::build_live_url, ""},
|
||||||
{"get_logo", &CControlAPI::logoCGI, "text/plain"},
|
{"get_logo", &CControlAPI::logoCGI, "text/plain"},
|
||||||
@@ -3400,6 +3401,70 @@ void CControlAPI::xmltvm3uCGI(CyhookHandler *hh)
|
|||||||
|
|
||||||
hh->SendResult(result);
|
hh->SendResult(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CControlAPI::xmltvlistCGI(CyhookHandler *hh)
|
||||||
|
{
|
||||||
|
std::vector<std::string>::iterator it;
|
||||||
|
std::vector<std::string> url_list;
|
||||||
|
std::string tmp;
|
||||||
|
std::string::size_type i = 0;
|
||||||
|
|
||||||
|
if (!hh->ParamList["webtv"].empty())
|
||||||
|
{
|
||||||
|
std::string webtv_url = hh->ParamList["webtv"];
|
||||||
|
g_settings.webtv_xml.clear();
|
||||||
|
url_list = ::split(webtv_url, '\n');
|
||||||
|
for (it = url_list.begin(); it != url_list.end(); it++)
|
||||||
|
{
|
||||||
|
tmp = (*it);
|
||||||
|
tmp.erase(std::remove(tmp.begin(), tmp.end(), '\n'), tmp.end());
|
||||||
|
tmp.erase(std::remove(tmp.begin(), tmp.end(), '\r'), tmp.end());
|
||||||
|
tmp.erase(std::remove(tmp.begin(), tmp.end(), '\t'), tmp.end());
|
||||||
|
if (!tmp.empty())
|
||||||
|
g_settings.webtv_xml.push_back(tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_settings.webtv_xml.clear();
|
||||||
|
|
||||||
|
if (!hh->ParamList["webradio"].empty())
|
||||||
|
{
|
||||||
|
std::string webradio_url = hh->ParamList["webradio"];
|
||||||
|
g_settings.webradio_xml.clear();
|
||||||
|
url_list = ::split(webradio_url, '\n');
|
||||||
|
for (it = url_list.begin(); it != url_list.end(); it++)
|
||||||
|
{
|
||||||
|
tmp = (*it);
|
||||||
|
tmp.erase(std::remove(tmp.begin(), tmp.end(), '\n'), tmp.end());
|
||||||
|
tmp.erase(std::remove(tmp.begin(), tmp.end(), '\r'), tmp.end());
|
||||||
|
tmp.erase(std::remove(tmp.begin(), tmp.end(), '\t'), tmp.end());
|
||||||
|
if (!tmp.empty())
|
||||||
|
g_settings.webradio_xml.push_back(tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_settings.webradio_xml.clear();
|
||||||
|
|
||||||
|
if (!hh->ParamList["xmltv"].empty())
|
||||||
|
{
|
||||||
|
std::string xmltv_url = hh->ParamList["xmltv"];
|
||||||
|
g_settings.xmltv_xml.clear();
|
||||||
|
url_list = ::split(xmltv_url, '\n');
|
||||||
|
for (it = url_list.begin(); it != url_list.end(); it++)
|
||||||
|
{
|
||||||
|
tmp = (*it);
|
||||||
|
tmp.erase(std::remove(tmp.begin(), tmp.end(), '\n'), tmp.end());
|
||||||
|
tmp.erase(std::remove(tmp.begin(), tmp.end(), '\r'), tmp.end());
|
||||||
|
tmp.erase(std::remove(tmp.begin(), tmp.end(), '\t'), tmp.end());
|
||||||
|
if (!tmp.empty())
|
||||||
|
g_settings.xmltv_xml.push_back(tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_settings.xmltv_xml.clear();
|
||||||
|
|
||||||
|
hh->SendOk();
|
||||||
|
}
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// audio_no : (optional) audio channel
|
// audio_no : (optional) audio channel
|
||||||
// host : (optional) ip of dbox
|
// host : (optional) ip of dbox
|
||||||
|
@@ -129,6 +129,7 @@ private:
|
|||||||
void updateBouquetCGI(CyhookHandler *hh);
|
void updateBouquetCGI(CyhookHandler *hh);
|
||||||
void xmltvepgCGI(CyhookHandler *hh);
|
void xmltvepgCGI(CyhookHandler *hh);
|
||||||
void xmltvm3uCGI(CyhookHandler *hh);
|
void xmltvm3uCGI(CyhookHandler *hh);
|
||||||
|
void xmltvlistCGI(CyhookHandler *hh);
|
||||||
void build_live_url(CyhookHandler *hh);
|
void build_live_url(CyhookHandler *hh);
|
||||||
void logoCGI(CyhookHandler *hh);
|
void logoCGI(CyhookHandler *hh);
|
||||||
void ConfigCGI(CyhookHandler *hh);
|
void ConfigCGI(CyhookHandler *hh);
|
||||||
|
@@ -126,6 +126,9 @@ const CNeutrinoYParser::TyFuncCall CNeutrinoYParser::yFuncCallList[]=
|
|||||||
{"set_timer_form", &CNeutrinoYParser::func_set_timer_form},
|
{"set_timer_form", &CNeutrinoYParser::func_set_timer_form},
|
||||||
{"bouquet_editor_main", &CNeutrinoYParser::func_bouquet_editor_main},
|
{"bouquet_editor_main", &CNeutrinoYParser::func_bouquet_editor_main},
|
||||||
{"set_bouquet_edit_form", &CNeutrinoYParser::func_set_bouquet_edit_form},
|
{"set_bouquet_edit_form", &CNeutrinoYParser::func_set_bouquet_edit_form},
|
||||||
|
{"get_webtv_list", &CNeutrinoYParser::func_get_webtv_list},
|
||||||
|
{"get_webradio_list", &CNeutrinoYParser::func_get_webradio_list},
|
||||||
|
{"get_xmltv_list", &CNeutrinoYParser::func_get_xmltv_list},
|
||||||
};
|
};
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// y-func : dispatching and executing
|
// y-func : dispatching and executing
|
||||||
@@ -1258,3 +1261,27 @@ std::string CNeutrinoYParser::func_set_bouquet_edit_form(CyhookHandler *hh, std
|
|||||||
else
|
else
|
||||||
return "No Bouquet selected";
|
return "No Bouquet selected";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CNeutrinoYParser::func_get_webtv_list(CyhookHandler *hh, std::string para)
|
||||||
|
{
|
||||||
|
std::string yresult;
|
||||||
|
for (std::list<std::string>::iterator it = g_settings.webtv_xml.begin(); it != g_settings.webtv_xml.end(); it++)
|
||||||
|
yresult += string_printf((*it).c_str()) + "\n";
|
||||||
|
return yresult;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CNeutrinoYParser::func_get_webradio_list(CyhookHandler *hh, std::string para)
|
||||||
|
{
|
||||||
|
std::string yresult;
|
||||||
|
for (std::list<std::string>::iterator it = g_settings.webradio_xml.begin(); it != g_settings.webradio_xml.end(); it++)
|
||||||
|
yresult += string_printf((*it).c_str()) + "\n";
|
||||||
|
return yresult;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CNeutrinoYParser::func_get_xmltv_list(CyhookHandler *hh, std::string para)
|
||||||
|
{
|
||||||
|
std::string yresult;
|
||||||
|
for (std::list<std::string>::iterator it = g_settings.xmltv_xml.begin(); it != g_settings.xmltv_xml.end(); it++)
|
||||||
|
yresult += string_printf((*it).c_str()) + "\n";
|
||||||
|
return yresult;
|
||||||
|
}
|
@@ -49,6 +49,9 @@ private:
|
|||||||
std::string func_set_timer_form(CyhookHandler *hh, std::string para);
|
std::string func_set_timer_form(CyhookHandler *hh, std::string para);
|
||||||
std::string func_bouquet_editor_main(CyhookHandler *hh, std::string para);
|
std::string func_bouquet_editor_main(CyhookHandler *hh, std::string para);
|
||||||
std::string func_set_bouquet_edit_form(CyhookHandler *hh, std::string para);
|
std::string func_set_bouquet_edit_form(CyhookHandler *hh, std::string para);
|
||||||
|
std::string func_get_webtv_list(CyhookHandler *hh, std::string para);
|
||||||
|
std::string func_get_webradio_list(CyhookHandler *hh, std::string para);
|
||||||
|
std::string func_get_xmltv_list(CyhookHandler *hh, std::string para);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CNeutrinoAPI *NeutrinoAPI;
|
CNeutrinoAPI *NeutrinoAPI;
|
||||||
|
Reference in New Issue
Block a user