diff options
author | TheTroll <trolldev@gmail.com> | 2010-03-18 10:43:30 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-03-18 10:43:30 +0100 |
commit | 5fffc5435015f06f7329f6cdd6ea77c0aa7e809e (patch) | |
tree | a4973aff6d8045a3d64237d177eb26842b6a7dab /bin | |
parent | 10d99171582e17fe26b11e93bdfe319559fd80ad (diff) | |
download | istreamdev-5fffc5435015f06f7329f6cdd6ea77c0aa7e809e.tar.gz istreamdev-5fffc5435015f06f7329f6cdd6ea77c0aa7e809e.tar.bz2 |
Fixed active and running timers
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/vdr.php | 13 |
1 files changed, 4 insertions, 9 deletions
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); |