summaryrefslogtreecommitdiff
path: root/ttools.c
diff options
context:
space:
mode:
Diffstat (limited to 'ttools.c')
-rw-r--r--ttools.c100
1 files changed, 0 insertions, 100 deletions
diff --git a/ttools.c b/ttools.c
index e24b652..96afed9 100644
--- a/ttools.c
+++ b/ttools.c
@@ -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;
-}