diff options
author | horchi <vdr@jwendel.de> | 2017-03-23 18:43:07 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2017-03-23 18:43:07 +0100 |
commit | ea3f8c5d050192b06cab9eaf70e19b544c09b8c5 (patch) | |
tree | ae50c481e279be57bf396cb35ca2167c4e71ac24 /ttools.c | |
parent | 4ce37758aa8e7ff1faea6aea5d19c953f89247b7 (diff) | |
download | vdr-plugin-epg2vdr-ea3f8c5d050192b06cab9eaf70e19b544c09b8c5.tar.gz vdr-plugin-epg2vdr-ea3f8c5d050192b06cab9eaf70e19b544c09b8c5.tar.bz2 |
2017-03-22 version 1.1.53 (horchi)\n - change: Removed old patches for vdr < 2.2.0\n - added: Patch to extend cEvent with aux field like cTimer\n - change: Moved user defines from Makefile to Make.config\n\n1.1.54
Diffstat (limited to 'ttools.c')
-rw-r--r-- | ttools.c | 100 |
1 files changed, 0 insertions, 100 deletions
@@ -582,103 +582,3 @@ int updateTimerObjectFromRow(cTimer* timer, cDbRow* timerRow, const cEvent* even return done; } - -//*************************************************************************** -// Enrich Event -//*************************************************************************** - -int enrichEvent(cEpgEvent* event, cDbTable* table, cDbStatement* select) -{ - if (select->find()) - { - const char* fields[] = - { - "imagecount", // int - "numrating", // int - - "year", // ascii 10 - "channelid", // ascii 50 - "category", // ascii 50 - "country", // ascii 50 - "audio", // ascii 50 - - "txtrating", // ascii 100 - "genre", // ascii 100 - "flags", // ascii 100 - "commentator", // ascii 200 - "tipp", // ascii 250 - "rating", // ascii 250 - "moderator", // ascii 250 - "music", // ascii 250 - "screenplay", // ascii 500 - "shortreview", // ascii 500 - - "guest", // text 1000 - "producer", // text 1000 - "camera", // text 1000 - "director", // text 1000 - "topic", // ascii 1000 - - "other", // text 2000 - "shortdescription", // mtext 3000 - "actor", // mtext 5000 - "longdescription", // mtext 25000 - "cntlongdescription", // MText 25000 - - 0 - }; - - for (int i = 0; fields[i]; i++) - { - cDbValue* value = table->getValue(fields[i]); - - if (!value || value->isEmpty()) - continue; - - if (value->getField()->hasFormat(cDBS::ffAscii) || value->getField()->hasFormat(cDBS::ffText) || value->getField()->hasFormat(cDBS::ffMText)) - event->setValue(fields[i], value->getStrValue()); - else - event->setValue(fields[i], value->getIntValue()); - } - - std::string source = table->getStrValue("CNTSOURCE") + std::string("/") + table->getStrValue("SUBSOURCE"); - source = strReplace("vdr", "dvb", source); - // source = regex_replace(source, regex("vdr"), "dvb"); - event->setValue("source", source.c_str()); - } - else - { - tell(0, "Info: Event (%d) not found", event->EventID()); - } - - select->freeResult(); - - return done; -} - -//*************************************************************************** -// Copy Event -//*************************************************************************** - -cEpgEvent* createEventCopy(const cEvent* event) -{ - FILE* inMem = 0; - char* bp; - size_t size; - - if ((inMem = open_memstream(&bp, &size))) - { - event->Dump(inMem, "", yes); - fflush(inMem); - fclose(inMem); - - cEpgEvent* epgEvent = new cEpgEvent(event->EventID()); - inMem = fmemopen(bp, strlen(bp), "r"); - epgEvent->Read(inMem); - fclose(inMem); - - return epgEvent; - } - - return 0; -} |