Merge branch 'master' into pu/fb-modules

This commit is contained in:
M. Liebmann
2017-02-09 08:46:47 +01:00
7 changed files with 13 additions and 8 deletions

View File

@@ -155,6 +155,9 @@ TUXBOX_APPS_DIRECTORY_ONE(plugindir,PLUGINDIR,libdir,/lib,/tuxbox/plugins,
TUXBOX_APPS_DIRECTORY_ONE(plugindir_var,PLUGINDIR_VAR,localstatedir,/var,/tuxbox/plugins, TUXBOX_APPS_DIRECTORY_ONE(plugindir_var,PLUGINDIR_VAR,localstatedir,/var,/tuxbox/plugins,
[--with-plugindir_var=PATH ],[where to find the plugins in /var]) [--with-plugindir_var=PATH ],[where to find the plugins in /var])
TUXBOX_APPS_DIRECTORY_ONE(webtvdir_var,WEBTVDIR_VAR,localstatedir,/var,/tuxbox/plugins/webtv,
[--with-webtvdir_var=PATH ],[where to find the livestreamScriptPath in /var])
TUXBOX_APPS_DIRECTORY_ONE(plugindir_mnt,PLUGINDIR_MNT,mntdir,/mnt,/plugins, TUXBOX_APPS_DIRECTORY_ONE(plugindir_mnt,PLUGINDIR_MNT,mntdir,/mnt,/plugins,
[--with-plugindir_mnt=PATH ],[where to find the the extern plugins]) [--with-plugindir_mnt=PATH ],[where to find the the extern plugins])

View File

@@ -280,7 +280,7 @@ CTimerList::CTimerList()
Timer = new CTimerdClient(); Timer = new CTimerdClient();
timerNew_message = ""; timerNew_message = "";
timerNew_pluginName = ""; timerNew_pluginName = "";
httpConnectTimeout = 3; httpConnectTimeout = 300; // ms
changed = false; changed = false;
/* most probable default */ /* most probable default */

View File

@@ -100,6 +100,7 @@ void Helpbox::addLine(const std::string& icon, const std::string& text, const in
int x_text = w_picon + (picon ? OFFSET_INNER_MID : 0); int x_text = w_picon + (picon ? OFFSET_INNER_MID : 0);
CComponentsText * txt = new CComponentsText(x_text, 0, line->getWidth()-x_text, 0, text, text_mode, font); CComponentsText * txt = new CComponentsText(x_text, 0, line->getWidth()-x_text, 0, text, text_mode, font);
txt->doPaintBg(false); txt->doPaintBg(false);
txt->forceTextPaint();
#if 0 //"contrast agent", if you want to see where the text items are drawn. #if 0 //"contrast agent", if you want to see where the text items are drawn.
txt->setColorBody(COL_RED); txt->setColorBody(COL_RED);
#endif #endif

View File

@@ -939,7 +939,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.infoClockSeconds = configfile.getInt32("infoClockSeconds", 1); g_settings.infoClockSeconds = configfile.getInt32("infoClockSeconds", 1);
g_settings.livestreamResolution = configfile.getInt32("livestreamResolution", 1920); g_settings.livestreamResolution = configfile.getInt32("livestreamResolution", 1920);
g_settings.livestreamScriptPath = configfile.getString("livestreamScriptPath", PLUGINDIR_VAR "/webtv"); g_settings.livestreamScriptPath = configfile.getString("livestreamScriptPath", WEBTVDIR_VAR);
g_settings.version_pseudo = configfile.getString("version_pseudo", "19700101000000"); g_settings.version_pseudo = configfile.getString("version_pseudo", "19700101000000");

View File

@@ -457,6 +457,7 @@ std::string CyParser::YWeb_cgi_cmd(CyhookHandler *hh, std::string ycmd) {
else if (ycmd_name.compare("GAMESDIR")) yresult = GAMESDIR; else if (ycmd_name.compare("GAMESDIR")) yresult = GAMESDIR;
else if (ycmd_name.compare("PLUGINDIR")) yresult = PLUGINDIR; else if (ycmd_name.compare("PLUGINDIR")) yresult = PLUGINDIR;
else if (ycmd_name.compare("PLUGINDIR_VAR")) yresult = PLUGINDIR_VAR; else if (ycmd_name.compare("PLUGINDIR_VAR")) yresult = PLUGINDIR_VAR;
else if (ycmd_name.compare("WEBTVDIR_VAR")) yresult = WEBTVDIR_VAR;
else if (ycmd_name.compare("LUAPLUGINDIR")) yresult = LUAPLUGINDIR; else if (ycmd_name.compare("LUAPLUGINDIR")) yresult = LUAPLUGINDIR;
else if (ycmd_name.compare("LOCALEDIR")) yresult = LOCALEDIR; else if (ycmd_name.compare("LOCALEDIR")) yresult = LOCALEDIR;
else if (ycmd_name.compare("LOCALEDIR_VAR")) yresult = LOCALEDIR_VAR; else if (ycmd_name.compare("LOCALEDIR_VAR")) yresult = LOCALEDIR_VAR;

View File

@@ -67,7 +67,7 @@ int CHTTPTool::show_progress( void *clientp, double dltotal, double dlnow, doubl
return 0; return 0;
} }
//#define DEBUG //#define DEBUG
bool CHTTPTool::downloadFile(const std::string & URL, const char * const downloadTarget, int globalProgressEnd, int connecttimeout/*=10*/, int timeout/*=1800*/) bool CHTTPTool::downloadFile(const std::string & URL, const char * const downloadTarget, int globalProgressEnd, int connecttimeout/*=10000*/, int timeout/*=1800*/)
{ {
CURL *curl; CURL *curl;
CURLcode res; CURLcode res;
@@ -99,7 +99,7 @@ printf("url is %s\n", URL.c_str());
curl_easy_setopt(curl, CURLOPT_USERAGENT, userAgent.c_str()); curl_easy_setopt(curl, CURLOPT_USERAGENT, userAgent.c_str());
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, (long)1); curl_easy_setopt(curl, CURLOPT_NOSIGNAL, (long)1);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout); curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, connecttimeout); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, connecttimeout);
curl_easy_setopt(curl, CURLOPT_FAILONERROR, true); curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
#ifdef DEBUG #ifdef DEBUG
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
@@ -137,7 +137,7 @@ printf("download code %d\n", res);
return res==CURLE_OK; return res==CURLE_OK;
} }
std::string CHTTPTool::downloadString(const std::string & URL, int globalProgressEnd, int connecttimeout/*=10*/, int timeout/*=1800*/) std::string CHTTPTool::downloadString(const std::string & URL, int globalProgressEnd, int connecttimeout/*=10000*/, int timeout/*=1800*/)
{ {
CURL *curl; CURL *curl;
CURLcode res; CURLcode res;
@@ -163,7 +163,7 @@ printf("url is %s\n", URL.c_str());
curl_easy_setopt(curl, CURLOPT_USERAGENT, userAgent.c_str()); curl_easy_setopt(curl, CURLOPT_USERAGENT, userAgent.c_str());
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, (long)1); curl_easy_setopt(curl, CURLOPT_NOSIGNAL, (long)1);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout); curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, connecttimeout); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, connecttimeout);
curl_easy_setopt(curl, CURLOPT_FAILONERROR, true); curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false);
#ifdef DEBUG #ifdef DEBUG

View File

@@ -52,8 +52,8 @@ class CHTTPTool
CHTTPTool(); CHTTPTool();
void setStatusViewer( CProgressWindow* statusview ); void setStatusViewer( CProgressWindow* statusview );
bool downloadFile( const std::string & URL, const char * const downloadTarget, int globalProgressEnd=-1, int connecttimeout=10, int timeout=1800); bool downloadFile( const std::string & URL, const char * const downloadTarget, int globalProgressEnd=-1, int connecttimeout=10000, int timeout=1800);
std::string downloadString(const std::string & URL, int globalProgressEnd=-1, int connecttimeout=10, int timeout=1800); std::string downloadString(const std::string & URL, int globalProgressEnd=-1, int connecttimeout=10000, int timeout=1800);
}; };