summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-03-17 19:06:13 +0100
committerTheTroll <trolldev@gmail.com>2010-03-17 19:06:13 +0100
commit0288e7e23ea7aea31727780b6cfebb0baab87abc (patch)
treeae85dc2ea0ec2ced6ec4f26691212ce16f49980a
parent6d3e8f33022129106ace66b97407bd66c02205c4 (diff)
downloadistreamdev-0288e7e23ea7aea31727780b6cfebb0baab87abc.tar.gz
istreamdev-0288e7e23ea7aea31727780b6cfebb0baab87abc.tar.bz2
Fixed subdirs browing and rec info
-rwxr-xr-xbin/jsonapi.php2
-rwxr-xr-xbin/session.php5
-rwxr-xr-xbin/vdr.php13
-rw-r--r--js/istreamdev.js8
4 files changed, 16 insertions, 12 deletions
diff --git a/bin/jsonapi.php b/bin/jsonapi.php
index 372c063..0c3b350 100755
--- a/bin/jsonapi.php
+++ b/bin/jsonapi.php
@@ -68,7 +68,7 @@ function getRecInfo($rec)
$ret = array();
$info = array();
- list($info['channel'], $info['name'], $info['desc']) = vdrgetrecinfo($rec);
+ list($info['channel'], $info['name'], $info['desc'], $info['recorded']) = vdrgetrecinfo($rec);
$ret['program'] = $info;
diff --git a/bin/session.php b/bin/session.php
index 737ec50..8e3e727 100755
--- a/bin/session.php
+++ b/bin/session.php
@@ -56,7 +56,7 @@ function sessioncreate($type, $url, $mode)
$channame = vdrgetchanname($channum);
break;
case 'rec':
- list($channame, $title, $desc) = vdrgetrecinfo($url);
+ list($channame, $title, $desc, $recorded) = vdrgetrecinfo($url);
break;
default:
$channame = "";
@@ -132,13 +132,12 @@ function sessiongetinfo($session)
$channum = vdrgetchannum($channame);
list($info['now_time'], $info['now_title'], $info['now_desc']) = vdrgetchanepg($channum, 1);
list($info['next_time'], $info['next_title'], $info['next_desc']) = vdrgetchanepg($channum, 0);
-
break;
case 'rec':
$info['channel'] = $channame;
$info['thumbwidth'] = 80;
$info['thumbheight'] = 80;
- list($channame, $info['name'], $info['desc']) = vdrgetrecinfo($url);
+ list($channame, $info['name'], $info['desc'], $info['recorded']) = vdrgetrecinfo($url);
break;
case 'vid':
break;
diff --git a/bin/vdr.php b/bin/vdr.php
index 82960dc..760e4f6 100755
--- a/bin/vdr.php
+++ b/bin/vdr.php
@@ -61,7 +61,6 @@ function vdrgetcategories()
if (!is_utf8($curcat))
$curcat = utf8_encode($curcat);
-// $curcat = rawurlencode($curcat);
}
else if ($line[0] != "")
$curcatchancount++;
@@ -179,8 +178,6 @@ function vdrgetchannels($category, $now)
if (!is_utf8($tmpchan['name']))
$tmpchan['name'] = utf8_encode($tmpchan['name']);
-// $tmpchan['name'] = rawurlencode($tmpchan['name']);
-
$chanlist[] = $tmpchan;
}
@@ -308,6 +305,14 @@ function vdrgetrecinfo($rec)
$epgtitle=substr($allepg[$i], 2);
else if(ereg("^D", $allepg[$i]))
$epgdesc=substr($allepg[$i], 2);
+ else if(ereg("^E ", $allepg[$i]))
+ {
+ $time = substr($allepg[$i], 2);
+ $timearray = explode(" ", $time);
+
+ $recorded = date('Y\/m\/d \a\t H\hi', $timearray[1]);
+ }
+
}
// Convert if needed
@@ -316,7 +321,7 @@ function vdrgetrecinfo($rec)
if (!is_utf8($epgdesc))
$epgdesc = utf8_encode($epgdesc);
- return array($channame, $epgtitle, $epgdesc);
+ return array($channame, $epgtitle, $epgdesc, $recorded);
}
diff --git a/js/istreamdev.js b/js/istreamdev.js
index ae823d1..196d9eb 100644
--- a/js/istreamdev.js
+++ b/js/istreamdev.js
@@ -309,7 +309,7 @@ function gen_streamchannel(channame,channumber) {
}
function gen_streamrec(folder,path) {
- var dataString = "action=getRecInfo&rec=" + encodeURIComponent(path) + encodeURIComponent(folder);
+ var dataString = "action=getRecInfo&rec=" + encodeURIComponent(path) + "/" + encodeURIComponent(folder);
//Json call to get rec info
$.getJSON("bin/backend.php",
dataString,
@@ -327,7 +327,7 @@ function gen_streamrec(folder,path) {
}
function gen_streamvid(filename,path) {
- var dataString = "action=getVidInfo&file=" + encodeURIComponent(path) + encodeURIComponent(filename);
+ var dataString = "action=getVidInfo&file=" + encodeURIComponent(path) + "/" + encodeURIComponent(filename);
//Json call to get rec info
$.getJSON("bin/backend.php",
dataString,
@@ -484,7 +484,7 @@ $('ul[rel="filelist"] li[class="arrow"] a').tap(function(event) {
browser++;
if ( type == "folder" )
{
- newpath=path+name;
+ newpath=path+"/"+name;
gen_browser(newpath,browser,name,foldertype);
}
else if ( type == "rec" )
@@ -831,4 +831,4 @@ function epg_selectchan() {
alert(selectedchan);
}
-// [/EPG SECTION] \ No newline at end of file
+// [/EPG SECTION]