diff options
-rwxr-xr-x | bin/session.php | 4 | ||||
-rwxr-xr-x | bin/vdr.php | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/bin/session.php b/bin/session.php index 172a02a..5b9464b 100755 --- a/bin/session.php +++ b/bin/session.php @@ -158,8 +158,8 @@ function sessiongetinfo($session) case 'tv': $info['name'] = $channame; $channum = vdrgetchannum($channame); - list($info['now_time'], $info['now_title'], $info['now_desc']) = vdrgetepgat($channum, "now"); - list($info['next_time'], $info['next_title'], $info['next_desc']) = vdrgetepgat($channum, "next"); + list($date, $info['now_time'], $info['now_title'], $info['now_desc']) = vdrgetepgat($channum, "now"); + list($date, $info['next_time'], $info['next_title'], $info['next_desc']) = vdrgetepgat($channum, "next"); break; case 'rec': $info['channel'] = $channame; diff --git a/bin/vdr.php b/bin/vdr.php index 2df3044..f1bd495 100755 --- a/bin/vdr.php +++ b/bin/vdr.php @@ -298,8 +298,8 @@ function vdrgetchaninfo($channum) $info['name'] = vdrgetchanname($channum); $info['number'] = $channum; - list($info['now_time'], $info['now_title'], $info['now_desc']) = vdrgetepgat($channum, "now"); - list($info['next_time'], $info['next_title'], $info['next_desc']) = vdrgetepgat($channum, "next"); + list($date, $info['now_time'], $info['now_title'], $info['now_desc']) = vdrgetepgat($channum, "now"); + list($date, $info['next_time'], $info['next_title'], $info['next_desc']) = vdrgetepgat($channum, "next"); return $info; } @@ -683,7 +683,7 @@ function vdrlisttimers() $newtimer['active'] = ($typearray[1] & 0x1)?"1":0; $newtimer['channumber'] = $timerarray[1]; $newtimer['channame'] = vdrgetchanname($timerarray[1]); - $newtimer['date'] = $timerarray[2]; + $newtimer['date'] = preg_replace("$-$", "/", $timerarray[2]); $newtimer['starttime'] = $timerarray[3]; $newtimer['endtime'] = $timerarray[4]; $newtimer['running'] = ($typearray[1] & 0x8)?1:0; @@ -722,6 +722,9 @@ function vdrsettimer($prevtimer, $channum, $date, $stime, $etime, $desc, $active $ret = array(); + // Convert date to VDR format + $date = preg_replace("$/$", "-", $date); + if ($prevtimer == "") $command = "NEWT " .$active .":" .$channum .":" .$date .":" .$stime .":" .$etime .":99:99:" .$desc; else |