diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp index 452e49b33..dc3de9151 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp @@ -112,6 +112,7 @@ const CNeutrinoYParser::TyFuncCall CNeutrinoYParser::yFuncCallList[]= {"get_channels_as_dropdown", &CNeutrinoYParser::func_get_channels_as_dropdown}, {"get_bouquets_with_epg", &CNeutrinoYParser::func_get_bouquets_with_epg}, {"get_actual_channel_id", &CNeutrinoYParser::func_get_actual_channel_id}, + {"get_logo_name", &CNeutrinoYParser::func_get_logo_name}, {"get_mode", &CNeutrinoYParser::func_get_mode}, {"get_video_pids", &CNeutrinoYParser::func_get_video_pids}, {"get_audio_pid", &CNeutrinoYParser::func_get_radio_pid}, @@ -351,7 +352,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: std::string timestr; bool have_logos = false; - if(!hh->WebserverConfigList["Tuxbox.LogosURL"].empty()) + if (!hh->WebserverConfigList["Tuxbox.LogosURL"].empty() && hh->WebserverConfigList["Tuxbox.DisplayLogos"] == "true" ) have_logos = true; for(int j = 0; j < (int) channels.size(); j++) @@ -522,6 +523,20 @@ std::string CNeutrinoYParser::func_get_actual_channel_id(CyhookHandler *, std:: { return string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, CZapit::getInstance()->GetCurrentChannelID()); } + +//------------------------------------------------------------------------- +// func: Get Logo Name +//------------------------------------------------------------------------- +std::string CNeutrinoYParser::func_get_logo_name(CyhookHandler *hh, std::string channelId) +{ + if (hh->WebserverConfigList["Tuxbox.DisplayLogos"] == "true") { + t_channel_id cid; + if (1 == sscanf(channelId.c_str(), "%llx", &cid)) + return NeutrinoAPI->getLogoFile(hh->WebserverConfigList["Tuxbox.LogosURL"], cid); + } + return ""; +} + //------------------------------------------------------------------------- // y-func : get_mode (returns tv|radio|unknown) //------------------------------------------------------------------------- diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.h b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.h index d21e8afba..7a0410b8b 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.h +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.h @@ -36,6 +36,7 @@ private: std::string func_get_actual_bouquet_number(CyhookHandler *hh, std::string para); std::string func_get_channels_as_dropdown(CyhookHandler *hh, std::string para); std::string func_get_actual_channel_id(CyhookHandler *hh, std::string para); + std::string func_get_logo_name(CyhookHandler *hh, std::string para); std::string func_get_bouquets_with_epg(CyhookHandler *hh, std::string para); std::string func_get_mode(CyhookHandler *hh, std::string para); std::string func_get_video_pids(CyhookHandler *hh, std::string para); diff --git a/src/nhttpd/web/Y_Blocks.txt b/src/nhttpd/web/Y_Blocks.txt index 4d8624a17..9f941b9f4 100644 --- a/src/nhttpd/web/Y_Blocks.txt +++ b/src/nhttpd/web/Y_Blocks.txt @@ -59,6 +59,7 @@ start-block~nhttpd_save_settings {=ini-set:/var/tuxbox/config/nhttpd.conf;mod_sendfile.mime_types;{=mod_sendfile_mime_types=}~cache=} {=ini-set:/var/tuxbox/config/nhttpd.conf;mod_sendfile.sendAll;{=mod_sendfile_sendAll=}~cache=} {=ini-set:/var/tuxbox/config/nhttpd.conf;Language.selected;{=language=}~cache=} +{=ini-set:/var/tuxbox/config/nhttpd.conf;Tuxbox.DisplayLogos;{=Tuxbox_DisplayLogos=}~cache=} {=ini-set:/var/tuxbox/config/nhttpd.conf;Tuxbox.LogosURL;{=Tuxbox_LogosURL=}~save=} {=func:do_reload_httpd_config=} end-block~nhttpd_save_settings diff --git a/src/nhttpd/web/Y_Live_EPG.yhtm b/src/nhttpd/web/Y_Live_EPG.yhtm index 378b888d9..1c25ff5e2 100644 --- a/src/nhttpd/web/Y_Live_EPG.yhtm +++ b/src/nhttpd/web/Y_Live_EPG.yhtm @@ -106,7 +106,7 @@ function _show_epg() - + diff --git a/src/nhttpd/web/Y_Settings_nhttpd.yhtm b/src/nhttpd/web/Y_Settings_nhttpd.yhtm index d3891c79a..a97d63800 100644 --- a/src/nhttpd/web/Y_Settings_nhttpd.yhtm +++ b/src/nhttpd/web/Y_Settings_nhttpd.yhtm @@ -8,6 +8,7 @@ function form_init() obj_set_radio_value('authenticate', "{=ini-get:/var/tuxbox/config/nhttpd.conf;mod_auth.authenticate;false=}"); obj_set_radio_value('threading', "{=ini-get:/var/tuxbox/config/nhttpd.conf;webserver.threading;false=}"); obj_set_radio_value('mod_sendfile_sendAll', "{=ini-get:/var/tuxbox/config/nhttpd.conf;mod_sendfile.sendAll;false=}"); + obj_set_radio_value('Tuxbox_DisplayLogos', "{=ini-get:/var/tuxbox/config/nhttpd.conf;Tuxbox.DisplayLogos;true=}"); // MARTII } function do_submit() { @@ -98,6 +99,13 @@ function do_submit() + + + + diff --git a/src/nhttpd/web/Y_Version.txt b/src/nhttpd/web/Y_Version.txt index a1dbc3b10..e8f31aaae 100644 --- a/src/nhttpd/web/Y_Version.txt +++ b/src/nhttpd/web/Y_Version.txt @@ -1,4 +1,4 @@ -version=2.9.0.16 -date=31.03.2015 +version=2.9.0.17 +date=05.04.2015 type=Release info=Port CST diff --git a/src/nhttpd/web/languages/Deutsch b/src/nhttpd/web/languages/Deutsch index 2c0cf82f0..14d89c519 100644 --- a/src/nhttpd/web/languages/Deutsch +++ b/src/nhttpd/web/languages/Deutsch @@ -312,6 +312,7 @@ set.nhttpd.alternate_web_folder=Alternativer Web-Ordner set.nhttpd.hosted_folder=Eingebundenes Verzeichnis set.nhttpd.allowed_file_extensions=Erlaubte Dateiendungen / MIME set.nhttpd.allow_all_file_extensions=Alle Dateiendungen erlauben +set.nhttpd.display_logos=Logos anzeigen set.nhttpd.url_of_logos_desc=URL bzw. Verzeichnis der Logos eingeben set.nhttpd.url_of_logos=URL bzw. Verzeichnis der Logos set.nhttpd.server=Server diff --git a/src/nhttpd/web/languages/English b/src/nhttpd/web/languages/English index 6a9dfa177..5d8d454a8 100644 --- a/src/nhttpd/web/languages/English +++ b/src/nhttpd/web/languages/English @@ -315,6 +315,7 @@ set.nhttpd.alternate_web_folder=Alternate Web-Folder set.nhttpd.hosted_folder=Mounted directory set.nhttpd.allowed_file_extensions=Allowed File Extensions / MIME set.nhttpd.allow_all_file_extensions=Allow all File Extensions +set.nhttpd.display_logos=Display Logos set.nhttpd.url_of_logos_desc=Enter URL or directory of Logos set.nhttpd.url_of_logos=URL or directory of Logos set.nhttpd.server=Server diff --git a/src/nhttpd/yhttpd.cpp b/src/nhttpd/yhttpd.cpp index 63da32cee..cddc90e01 100644 --- a/src/nhttpd/yhttpd.cpp +++ b/src/nhttpd/yhttpd.cpp @@ -548,6 +548,7 @@ void Cyhttpd::ReadConfig(void) { ConfigList["WebsiteMain.hosted_directory"] = Config->getString( "WebsiteMain.hosted_directory", HOSTEDDOCUMENTROOT); + ConfigList["Tuxbox.DisplayLogos"] = Config->getString("Tuxbox.DisplayLogos", "true"); // Check location of logos if (Config->getString("Tuxbox.LogosURL", "").empty()) { if (access(ConfigList["WebsiteMain.override_directory"] + "/logos", R_OK) == 0) {
  {=L:date=}{=L:from=}{=L:to=}{=L:program=}
{=L:logos=}
{=L:set.nhttpd.display_logos=} + {=L:off=}  + {=L:on=} +
{=L:set.nhttpd.url_of_logos=}