summaryrefslogtreecommitdiff
path: root/timers.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-01-04 12:30:00 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-01-04 12:30:00 +0100
commit8976ebcec5ca1ac03c54209b7cc12e9d14915c6b (patch)
tree8562202f489ee585c1252b2cb4a9e61b3e200efe /timers.c
parent3a1058fe1fca6d10cea42786aa54abf3d0bd0b94 (diff)
downloadvdr-8976ebcec5ca1ac03c54209b7cc12e9d14915c6b.tar.gz
vdr-8976ebcec5ca1ac03c54209b7cc12e9d14915c6b.tar.bz2
Implemented automatic PID switching and channel detection
Diffstat (limited to 'timers.c')
-rw-r--r--timers.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/timers.c b/timers.c
index 36e249c3..1db88a0f 100644
--- a/timers.c
+++ b/timers.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.c 1.7 2003/12/13 13:06:29 kls Exp $
+ * $Id: timers.c 1.8 2003/12/27 13:10:04 kls Exp $
*/
#include "timers.h"
@@ -216,8 +216,10 @@ bool cTimer::Parse(const char *s)
strn0cpy(file, filebuffer, MaxFileName);
strreplace(file, '|', ':');
strreplace(summary, '|', '\n');
- tChannelID cid = tChannelID::FromString(channelbuffer);
- channel = cid.Valid() ? Channels.GetByChannelID(cid, true) : Channels.GetByNumber(atoi(channelbuffer));
+ if (isnumber(channelbuffer))
+ channel = Channels.GetByNumber(atoi(channelbuffer));
+ else
+ channel = Channels.GetByChannelID(tChannelID::FromString(channelbuffer), true);
if (!channel) {
esyslog("ERROR: channel %s not defined", channelbuffer);
result = false;