summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/curl.c3
-rw-r--r--lib/db.c15
-rw-r--r--lib/searchtimer.c6
3 files changed, 14 insertions, 10 deletions
diff --git a/lib/curl.c b/lib/curl.c
index a8c806f..abcb2da 100644
--- a/lib/curl.c
+++ b/lib/curl.c
@@ -108,6 +108,7 @@ int cCurl::init(const char* httpproxy)
curl_easy_setopt(handle, CURLOPT_PROXY, httpproxy); // Specify HTTP proxy
}
+ curl_easy_setopt(handle, CURLOPT_HTTPHEADER, 0);
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, collect_data);
curl_easy_setopt(handle, CURLOPT_WRITEDATA, 0); // Set option to write to string
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, yes);
@@ -439,7 +440,7 @@ int cCurl::downloadFile(const char* url, int& size, MemoryStruct* data, int time
curl_easy_setopt(handle, CURLOPT_ACCEPT_ENCODING, "gzip"); //
if (headerlist)
- curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headerlist);
+ curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headerlist);
// perform http-get
diff --git a/lib/db.c b/lib/db.c
index 7b50bcd..2dbca80 100644
--- a/lib/db.c
+++ b/lib/db.c
@@ -734,15 +734,18 @@ int cDbTable::init(int allowAlter)
// check/create table ...
- if (exist() && allowAlter)
- validateStructure(allowAlter);
+ if (allowAlter)
+ {
+ if (exist())
+ validateStructure(allowAlter);
- if (createTable() != success)
- return fail;
+ if (!exist() && createTable() != success)
+ return fail;
- // check/create indices
+ // check/create indices
- createIndices();
+ createIndices();
+ }
// ------------------------------
// prepare BASIC statements
diff --git a/lib/searchtimer.c b/lib/searchtimer.c
index cfe69e4..2982996 100644
--- a/lib/searchtimer.c
+++ b/lib/searchtimer.c
@@ -690,7 +690,7 @@ int cSearchTimer::checkTimers()
{
int count = 0;
- tell(1, "Checking timers against actual epg and serarchtimer settings");
+ tell(1, "Checking timers against actual epg and searchtimer settings");
if (checkConnection() != success)
return 0;
@@ -1224,8 +1224,8 @@ int cSearchTimer::isAlreadyDone(int repeatfields, json_t* obj, int silent)
if (repeatfields & sfFolge)
{
- selectDoneTimer->build(" and (field('%s',ifnull(compshorttext,''),ifnull(episodecomppartname,'')) > 0"
- " or field('%s',ifnull(compshorttext,''),ifnull(episodecomppartname,'')) > 0)",
+ selectDoneTimer->build(" and (field('%s',ifnull(compshorttext,'NoShortnameAvailable'),ifnull(episodecomppartname,'NoShortnameAvailable')) > 0"
+ " or field('%s',ifnull(compshorttext,''),ifnull(episodecomppartname,'NoShortnameAvailable')) > 0)",
useeventsDb->getStrValue("COMPSHORTTEXT"), useeventsDb->getStrValue("EPISODECOMPPARTNAME"));
}