diff options
author | Jochen Dolze <vdr@dolze.de> | 2012-03-04 14:24:18 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2012-03-04 14:24:18 +0100 |
commit | e2ac357ef3f1b76ea126573a69aba85409407a5e (patch) | |
tree | ae39141325b6873e70eb84b80cf54a7231e60361 /dist | |
parent | 5ad8db6cf4425ba81cb84bbc29c408c5f5e84c14 (diff) | |
download | vdr-plugin-xmltv2vdr-e2ac357ef3f1b76ea126573a69aba85409407a5e.tar.gz vdr-plugin-xmltv2vdr-e2ac357ef3f1b76ea126573a69aba85409407a5e.tar.bz2 |
Added season/episode handling
Changed epgdata size limit, reusing old downloaded files
Diffstat (limited to 'dist')
-rw-r--r-- | dist/epgdata2xmltv/epgdata2xmltv.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/dist/epgdata2xmltv/epgdata2xmltv.cpp b/dist/epgdata2xmltv/epgdata2xmltv.cpp index 7515cb0..fcef073 100644 --- a/dist/epgdata2xmltv/epgdata2xmltv.cpp +++ b/dist/epgdata2xmltv/epgdata2xmltv.cpp @@ -115,7 +115,7 @@ int cepgdata2xmltv::DownloadData(const char *url) curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 0); // don't follow redirects curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); // Send all data to this function curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *) &data); // Pass our 'data' struct to the callback function - curl_easy_setopt(curl_handle, CURLOPT_MAXFILESIZE, 20971520); // Set maximum file size to get (bytes) + curl_easy_setopt(curl_handle, CURLOPT_MAXFILESIZE, 45971520); // Set maximum file size to get (bytes) curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1); // No progress meter curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1); // No signaling curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, 240); // Set timeout to 240 seconds @@ -210,6 +210,11 @@ int cepgdata2xmltv::Fetch(const char *dest, const char *pin, int day) return 1; } + if (ret==-63) + { + esyslog("filesize exceeded, please report this!"); + return 1; + } return 0; } @@ -274,7 +279,7 @@ int cepgdata2xmltv::Process(int argc, char *argv[]) sprintf(vgl,"%04i%02i%02i",tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday); char *dest=NULL; - if (asprintf(&dest,"/tmp/epgdata_%02i.zip",day)==-1) + if (asprintf(&dest,"/tmp/%s_epgdata.zip",vgl)==-1) { esyslog("failed to allocate string"); continue; |