From ed318d97bc7ab06299e9504c7e3249cd8dc0324c Mon Sep 17 00:00:00 2001 From: satbaby Date: Mon, 17 Dec 2012 12:58:24 +0100 Subject: [PATCH 1/3] nhttpd: skip doubles decode on channlename, revert 42b69a8a5eb061ea90b25328be8c5ed5efd46782 --- src/nhttpd/yhttpd_core/helper.cpp | 3 --- src/nhttpd/yhttpd_core/yrequest.cpp | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/nhttpd/yhttpd_core/helper.cpp b/src/nhttpd/yhttpd_core/helper.cpp index d529127fc..e2449fbbd 100644 --- a/src/nhttpd/yhttpd_core/helper.cpp +++ b/src/nhttpd/yhttpd_core/helper.cpp @@ -203,12 +203,9 @@ std::string decodeString(std::string encodedString) { iStr = strtoul(hex, NULL, 16); /* convert to Hex char */ result += (char) iStr; count += 3; -#if 0 -//why decode '+' to ' ' ? } else if (string[count] == '+') { result += ' '; count++; -#endif } else { result += string[count]; count++; diff --git a/src/nhttpd/yhttpd_core/yrequest.cpp b/src/nhttpd/yhttpd_core/yrequest.cpp index 999903915..84ccc5274 100644 --- a/src/nhttpd/yhttpd_core/yrequest.cpp +++ b/src/nhttpd/yhttpd_core/yrequest.cpp @@ -161,7 +161,11 @@ bool CWebserverRequest::ParseParams(std::string param_string) { if (!ySplitStringExact(param_string, "&", param, param_string)) ende = true; if (ySplitStringExact(param, "=", name, value)) { - value = trim(decodeString(value)); + if("channelname" == name){//skip doubles decode on channlename + value = trim((value)); + }else{ + value = trim(decodeString(value)); + } if (ParameterList[name].empty()) ParameterList[name] = value; else { From f66b2baedce1e9350ad18d402317dcc1847e35e3 Mon Sep 17 00:00:00 2001 From: satbaby Date: Mon, 17 Dec 2012 22:01:46 +0100 Subject: [PATCH 2/3] nhttpd: dont doubles decode, revert ed318d97bc7ab06299e9504c7e3249cd8dc0324c --- src/nhttpd/tuxboxapi/coolstream/controlapi.cpp | 2 +- src/nhttpd/yhttpd_core/yrequest.cpp | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index bd352e888..08968fddd 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -561,7 +561,7 @@ void CControlAPI::MessageCGI(CyhookHandler *hh) if (event != 0) { - message=decodeString(message); + //message=decodeString(message); NeutrinoAPI->EventServer->sendEvent(event, CEventServer::INITID_HTTPD, (void *) message.c_str(), message.length() + 1); hh->SendOk(); } diff --git a/src/nhttpd/yhttpd_core/yrequest.cpp b/src/nhttpd/yhttpd_core/yrequest.cpp index 84ccc5274..ae3a543d7 100644 --- a/src/nhttpd/yhttpd_core/yrequest.cpp +++ b/src/nhttpd/yhttpd_core/yrequest.cpp @@ -161,11 +161,7 @@ bool CWebserverRequest::ParseParams(std::string param_string) { if (!ySplitStringExact(param_string, "&", param, param_string)) ende = true; if (ySplitStringExact(param, "=", name, value)) { - if("channelname" == name){//skip doubles decode on channlename - value = trim((value)); - }else{ - value = trim(decodeString(value)); - } + value = trim(decodeString(value)); if (ParameterList[name].empty()) ParameterList[name] = value; else { @@ -215,7 +211,7 @@ bool CWebserverRequest::ParseHeader(std::string header) { void CWebserverRequest::analyzeURL(std::string url) { ParameterList.clear(); // URI decode - url = decodeString(url); + //url = decodeString(url); url = trim(url, "\r\n"); // non-HTTP-Standard: allow \r or \n in URL. Delete it. UrlData["fullurl"] = url; // split Params From bce78c2cff3a078a75f78d6e33bc2b80d28f3509 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 18 Dec 2012 21:58:00 +0100 Subject: [PATCH 3/3] - moviebrowser.cpp: accept covers without appended date/time patch by FlatTV --- src/gui/moviebrowser.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index adc0e056a..8ed92f2a4 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -1235,7 +1235,12 @@ void CMovieBrowser::refreshMovieInfo(void) int picw = (int)(((float)16 / (float)9) * (float)m_cBoxFrameInfo.iHeight); int pich = m_cBoxFrameInfo.iHeight; std::string fname = getScreenshotName(m_movieSelectionHandler->file.Name); - logo_ok = (fname != ""); + if(fname.empty()) { + std::string cover = m_movieSelectionHandler->file.Name; + cover.replace((cover.length()-18),15,""); //covername without yyyymmdd_hhmmss + fname = getScreenshotName(cover); + } + logo_ok = (!fname.empty()); int flogo_w = 0, flogo_h = 0; if(logo_ok) { g_PicViewer->getSize(fname.c_str(), &flogo_w, &flogo_h);