summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-03-17 18:41:16 +0100
committerTheTroll <trolldev@gmail.com>2010-03-17 18:41:16 +0100
commitbba9118edf4b05670bf6ee46af6a569f7fd5650c (patch)
treeae143ef28f36496a619626aa5228e06a99268eb2
parent5a82ce8d05eb30148d8079aed01c503c73dd58d6 (diff)
downloadistreamdev-bba9118edf4b05670bf6ee46af6a569f7fd5650c.tar.gz
istreamdev-bba9118edf4b05670bf6ee46af6a569f7fd5650c.tar.bz2
Get recordings info
-rwxr-xr-xbin/backend.php6
-rwxr-xr-xbin/files.php1
-rwxr-xr-xbin/jsonapi.php13
-rwxr-xr-xbin/vdr.php3
4 files changed, 16 insertions, 7 deletions
diff --git a/bin/backend.php b/bin/backend.php
index cf37e2e..6ae8488 100755
--- a/bin/backend.php
+++ b/bin/backend.php
@@ -45,9 +45,9 @@ switch ($action)
break;
case ("getRecInfo"):
- $tree = file_get_contents("textfiles/getRecInfo.txt");
- print $tree;
- break;
+ $tree = getRecInfo($_REQUEST['rec']);
+ print $tree;
+ break;
case ("getVidInfo"):
$tree = file_get_contents("textfiles/getVidInfo.txt");
diff --git a/bin/files.php b/bin/files.php
index dfcda00..f39ee98 100755
--- a/bin/files.php
+++ b/bin/files.php
@@ -191,7 +191,6 @@ function filesgetlisting($dir)
switch ($type)
{
case 'audio':
- // More info
case 'video':
case 'rec':
case 'folder':
diff --git a/bin/jsonapi.php b/bin/jsonapi.php
index eba9725..372c063 100755
--- a/bin/jsonapi.php
+++ b/bin/jsonapi.php
@@ -58,12 +58,23 @@ function getChanInfo($channum)
{
$ret = array();
- $info = array();
$ret['program'] = vdrgetchaninfo($channum);
return json_encode($ret);
}
+function getRecInfo($rec)
+{
+ $ret = array();
+
+ $info = array();
+ list($info['channel'], $info['name'], $info['desc']) = vdrgetrecinfo($rec);
+
+ $ret['program'] = $info;
+
+ return json_encode($ret);
+}
+
function startBroadcast($type, $url, $mode)
{
$ret = array();
diff --git a/bin/vdr.php b/bin/vdr.php
index e10a139..82960dc 100755
--- a/bin/vdr.php
+++ b/bin/vdr.php
@@ -316,8 +316,7 @@ function vdrgetrecinfo($rec)
if (!is_utf8($epgdesc))
$epgdesc = utf8_encode($epgdesc);
-
- return array($channame, epgtitle, $epgdesc);
+ return array($channame, $epgtitle, $epgdesc);
}