summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorDave <vdr@pickles.me.uk>2011-09-04 10:07:37 +0100
committerDave <vdr@pickles.me.uk>2011-09-04 10:07:37 +0100
commit8390e0faa174c34339dd9d43342fdae33379eec6 (patch)
tree8a8f3b61a655c86122fe1dc6394f0ef322c4fc16 /plugin
parent8a51dd3076c28c1dcfd9865e55ab899c4722ea81 (diff)
downloadvdrtva-8390e0faa174c34339dd9d43342fdae33379eec6.tar.gz
vdrtva-8390e0faa174c34339dd9d43342fdae33379eec6.tar.bz2
Error handling timers for event names containing colons.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/vdrtva.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugin/vdrtva.c b/plugin/vdrtva.c
index 0946878..c105c44 100644
--- a/plugin/vdrtva.c
+++ b/plugin/vdrtva.c
@@ -579,7 +579,7 @@ bool cPluginvdrTva::AddNewEventsToSeries()
if (schedule) {
const cEvent *event = schedule->GetEvent(eventCRID->Eid());
struct tm tm_r;
- char startbuff[64], endbuff[64];
+ char startbuff[64], endbuff[64], etitle[256];
time_t starttime = event->StartTime();
time_t endtime = event->EndTime();
if (!Setup.UseVps) {
@@ -590,7 +590,9 @@ bool cPluginvdrTva::AddNewEventsToSeries()
strftime(startbuff, sizeof(startbuff), "%Y-%m-%d:%H%M", &tm_r);
localtime_r(&endtime, &tm_r);
strftime(endbuff, sizeof(endbuff), "%H%M", &tm_r);
- cString timercmd = cString::sprintf("%u:%d:%s:%s:%d:%d:%s:\n", flags, channel->Number(), startbuff, endbuff, priority, lifetime, event->Title());
+ strn0cpy (etitle, event->Title(), sizeof(etitle));
+ strreplace(etitle, ':', '|');
+ cString timercmd = cString::sprintf("%u:%d:%s:%s:%d:%d:%s:\n", flags, channel->Number(), startbuff, endbuff, priority, lifetime, etitle);
cTimer *timer = new cTimer;
if (timer->Parse(timercmd)) {
cTimer *t = Timers.GetTimer(timer);