From 5fffc5435015f06f7329f6cdd6ea77c0aa7e809e Mon Sep 17 00:00:00 2001 From: TheTroll Date: Thu, 18 Mar 2010 10:43:30 +0100 Subject: Fixed active and running timers --- bin/vdr.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'bin/vdr.php') diff --git a/bin/vdr.php b/bin/vdr.php index 4253856..9197b1b 100755 --- a/bin/vdr.php +++ b/bin/vdr.php @@ -353,13 +353,13 @@ function vdrlisttimers() $typearray = explode(" ", $timerarray[0]); $newtimer['name'] = $timerarray[7]; - $newtimer['active'] = (($typearray[1] & 0x1) != 0); + $newtimer['active'] = ($typearray[1] & 0x1)?"1":0; $newtimer['channumber'] = $timerarray[1]; $newtimer['channame'] = vdrgetchanname($timerarray[1]); $newtimer['date'] = $timerarray[2]; $newtimer['starttime'] = $timerarray[3]; $newtimer['endtime'] = $timerarray[4]; - $newtimer['running'] = (($typearray[1] & 0x8) != 0); + $newtimer['running'] = ($typearray[1] & 0x8)?1:0; $timerslist[] = $newtimer; } @@ -391,15 +391,10 @@ function vdrsettimer($prevtimer, $channum, $date, $stime, $etime, $desc, $active { $ret = array(); - if ($active == 'on') - $type = "1"; - else - $type = "0"; - if ($prevtimer == "") - $command = "NEWT " .$type .":" .$channum .":" .$date .":" .$stime .":" .$etime .":99:99:" .$desc; + $command = "NEWT " .$active .":" .$channum .":" .$date .":" .$stime .":" .$etime .":99:99:" .$desc; else - $command = "MODT " .$prevtimer ." " .$type .":" .$channum .":" .$date .":" .$stime .":" .$etime .":99:99:" .$desc; + $command = "MODT " .$prevtimer ." " .$active .":" .$channum .":" .$date .":" .$stime .":" .$etime .":99:99:" .$desc; $message = vdrsendcommand($command); -- cgit v1.2.3