From 6de6fcef79405d76e9519f5a8939972ef9b0d244 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 28 Jun 2013 00:52:59 +0200 Subject: [PATCH] yweb: rework classifying slidertable in channellist for a smoother view Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/63173fd5e28a066d716a157382f5a8ac2d48297e Author: vanhofen Date: 2013-06-28 (Fri, 28 Jun 2013) Origin message was: ------------------ - yweb: rework classifying slidertable in channellist for a smoother view --- .../tuxboxapi/coolstream/neutrinoyparser.cpp | 37 ++++++++++++------- src/nhttpd/web/Y_Main.css | 11 ++++-- src/nhttpd/web/Y_Version.txt | 4 +- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp index 9ea0ebaaf..a3489f34a 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp @@ -345,7 +345,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: int i = 1; char classname; t_channel_id current_channel = CZapit::getInstance()->GetCurrentChannelID(); - int prozent; + int prozent = 100; CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo; std::string timestr; bool have_logos = false; @@ -373,20 +373,31 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: /* timer slider */ if(event && event->duration > 0) + { prozent = 100 * (time(NULL) - event->startTime) / event->duration; + yresult += string_printf("\n" + , classname + , (prozent / 10) * 3 + , (10 - (prozent / 10))*3 + ); + } else - prozent = 100; - yresult += string_printf("
\n" + "\t" + "" + "" + "" + "" + "
\n
\n" - , classname - , (prozent / 10) * 3 - , (10 - (prozent / 10))*3 - ); + { + yresult += string_printf("
\n" - "\t" - "" - "" - "" - "" - "
\n
\n" + , classname + ); + } /* channel name and buttons */ yresult += string_printf("
\n" + "\t" + "" + "" + "" + "
\n
\n%s