diff options
author | horchi <vdr@jwendel.de> | 2017-03-16 19:28:49 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2017-03-16 19:28:49 +0100 |
commit | 9065c5cfb63a92a08c44fe249b53b6a8cb003eab (patch) | |
tree | 465dced84c2491e70ff6702267c85c5a8d488b97 | |
parent | 829792b9eab3f9803e6d072ffa9a8a27675c112c (diff) | |
download | vdr-epg-daemon-9065c5cfb63a92a08c44fe249b53b6a8cb003eab.tar.gz vdr-epg-daemon-9065c5cfb63a92a08c44fe249b53b6a8cb003eab.tar.bz2 |
2017-03-16: version 1.1.110 (horchi)\n - added: Congig option for MovieDb api-key\n\n1.1.110
-rw-r--r-- | HISTORY.h | 5 | ||||
-rw-r--r-- | configs/epgd.conf | 7 | ||||
-rw-r--r-- | epgdconfig.c | 1 | ||||
-rw-r--r-- | epgdconfig.h | 2 | ||||
-rw-r--r-- | scraper/themoviedbscraper/themoviedbscraper.c | 18 | ||||
-rw-r--r-- | update.c | 4 |
6 files changed, 23 insertions, 14 deletions
@@ -4,7 +4,7 @@ * ----------------------------------- */ -#define _VERSION "1.1.109" +#define _VERSION "1.1.110" #define VERSION_DATE "16.03.2017" #define DB_API 4 @@ -17,6 +17,9 @@ /* * ------------------------------------ +2017-03-16: version 1.1.110 (horchi) + - added: Congig option for MovieDb api-key + 2017-03-16: version 1.1.109 (horchi) - change: Fixed git merge problems diff --git a/configs/epgd.conf b/configs/epgd.conf index fbcb03d..019c43f 100644 --- a/configs/epgd.conf +++ b/configs/epgd.conf @@ -1,5 +1,5 @@ # ------------------------------------ -# Configuration of EPG Daemon +# Configuration of EPG Daemon # ------------------------------------ # EpgImageSize @@ -36,6 +36,7 @@ SeriesUrl = eplists.constabel.net ScrapEpg = 1 ScrapRecordings = 1 +#ScrapMovieDbApiKey = # NetDevice = eth0 @@ -43,7 +44,7 @@ ScrapRecordings = 1 # HttpPort = 9999 # HttpProxy = 127.0.0.1:8000 -# UserName = -# Password = +# UserName = +# Password = LogLevel = 1 diff --git a/epgdconfig.c b/epgdconfig.c index 84fdc7a..ecf2053 100644 --- a/epgdconfig.c +++ b/epgdconfig.c @@ -39,6 +39,7 @@ cEpgdConfig::cEpgdConfig() sstrcpy(epgView, "eventsview.sql", sizeof(epgView)); sstrcpy(epgViewWeb, "eventsviewplain.sql", sizeof(epgViewWeb)); sstrcpy(theTvDBView, "thetvdbview.sql", sizeof(theTvDBView)); + sstrcpy(scrapMovieDbApiKey, "abb01b5a277b9c2c60ec0302d83c5ee9", sizeof(scrapMovieDbApiKey)); updateThreshold = 200; maintanance = no; diff --git a/epgdconfig.h b/epgdconfig.h index 0335ce7..77166b8 100644 --- a/epgdconfig.h +++ b/epgdconfig.h @@ -51,7 +51,7 @@ struct cEpgdConfig : public cEpgConfig char proxy[256+TB]; char proxyuser[100+TB]; char proxypwd[100+TB]; - + char scrapMovieDbApiKey[100+TB]; int scrapEpg; int scrapRecordings; }; diff --git a/scraper/themoviedbscraper/themoviedbscraper.c b/scraper/themoviedbscraper/themoviedbscraper.c index 62263a9..b18782a 100644 --- a/scraper/themoviedbscraper/themoviedbscraper.c +++ b/scraper/themoviedbscraper/themoviedbscraper.c @@ -9,17 +9,19 @@ #include "../../lib/curl.h" #include "../../tools/stringhelpers.h" +#include "../../epgdconfig.h" #include "themoviedbscraper.h" using namespace std; -cMovieDBScraper::cMovieDBScraper(string language) { - apiKey = "abb01b5a277b9c2c60ec0302d83c5ee9"; - this->language = language; - baseURL = "api.themoviedb.org/3"; - posterSize = "w500"; - backdropSize = "w1280"; - actorthumbSize = "h632"; +cMovieDBScraper::cMovieDBScraper(string language) +{ + apiKey = EpgdConfig.scrapMovieDbApiKey; // "abb01b5a277b9c2c60ec0302d83c5ee9"; + this->language = language; + baseURL = "api.themoviedb.org/3"; + posterSize = "w500"; + backdropSize = "w1280"; + actorthumbSize = "h632"; } cMovieDBScraper::~cMovieDBScraper() { @@ -55,7 +57,7 @@ bool cMovieDBScraper::parseJSON(string jsonString) { if(!json_is_object(images)) { return false; } - + json_t *imgUrl; imgUrl = json_object_get(images, "base_url"); if(!json_is_string(imgUrl)) { @@ -366,6 +366,8 @@ int cEpgd::atConfigItem(const char* Name, const char* Value) else if (!strcasecmp(Name, "ScrapEpg")) EpgdConfig.scrapEpg = atoi(Value); else if (!strcasecmp(Name, "ScrapRecordings")) EpgdConfig.scrapRecordings = atoi(Value); + else if (!strcasecmp(Name, "ScrapMovieDbApiKey")) sstrcpy(EpgdConfig.scrapMovieDbApiKey, Value, sizeof(EpgdConfig.scrapMovieDbApiKey)); + else if (!strcasecmp(Name, "NetDevice")) sstrcpy(EpgdConfig.netDevice, Value, sizeof(EpgdConfig.netDevice)); else if (!strcasecmp(Name, "HttpDevice")) sstrcpy(EpgdConfig.httpDevice, Value, sizeof(EpgdConfig.httpDevice)); else if (!strcasecmp(Name, "HttpPort")) EpgdConfig.httpPort = atoi(Value); @@ -1340,7 +1342,7 @@ void cEpgd::loop() scheduleAutoUpdate(EpgdConfig.checkInitial ? 10 : 0); - scrapNewEvents(); // # debug scarper at Start + // scrapNewEvents(); // # to debug scarper at Start while (!doShutDown()) { |