summaryrefslogtreecommitdiff
path: root/recinfofile.c
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2017-12-20 07:57:05 +0100
committerhorchi <vdr@jwendel.de>2017-12-20 07:57:05 +0100
commit403f126e5da6d1811d981d5773d0a0772b99acc1 (patch)
tree10e9559baf3e008cb329369794053f4bf34d5eca /recinfofile.c
parent2819b6ccb4cbfd95459c2ec888c305b3355df54b (diff)
downloadvdr-plugin-epg2vdr-403f126e5da6d1811d981d5773d0a0772b99acc1.tar.gz
vdr-plugin-epg2vdr-403f126e5da6d1811d981d5773d0a0772b99acc1.tar.bz2
2017-12-19 version 1.1.74 (horchi)\n - added: recording detail query to service interface\n\n1.1.74
Diffstat (limited to 'recinfofile.c')
-rw-r--r--recinfofile.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/recinfofile.c b/recinfofile.c
index 6c1b00c..9c48609 100644
--- a/recinfofile.c
+++ b/recinfofile.c
@@ -119,6 +119,28 @@ int cEventDetails::updateByRow(cDbRow* row)
}
//***************************************************************************
+// Row To Xml
+//***************************************************************************
+
+int cEventDetails::row2Xml(cDbRow* row, cXml* xml)
+{
+ for (int i = 0; fields[i]; i++)
+ {
+ cDbValue* value = row->getValue(fields[i]);
+
+ if (!value || value->isEmpty())
+ continue;
+
+ if (value->getField()->hasFormat(cDBS::ffAscii) || value->getField()->hasFormat(cDBS::ffText) || value->getField()->hasFormat(cDBS::ffMText))
+ xml->appendElement(fields[i], value->getStrValue());
+ else
+ xml->appendElement(fields[i], value->getIntValue());
+ }
+
+ return success;
+}
+
+//***************************************************************************
// Update To Row
//***************************************************************************
@@ -128,6 +150,9 @@ int cEventDetails::updateToRow(cDbRow* row)
for (it = values.begin(); it != values.end(); it++)
{
+ if (!it->first.length())
+ continue;
+
cDbValue* value = row->getValue(it->first.c_str());
if (!value)
@@ -136,9 +161,6 @@ int cEventDetails::updateToRow(cDbRow* row)
continue;
}
- if (!it->first.length())
- continue;
-
if (value->getField()->isString())
value->setValue(it->second.c_str());
else if (value->getField()->isInt())