summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-03-22 20:38:04 +0100
committerAlib <aliboba@free.fr>2010-03-22 20:38:04 +0100
commitcd4f1116b4957248c5e73d729b8aa9b298c3a24f (patch)
treed7779b5db9595c5eb3a4c78baf00c244acf8102c
parent56df9ea9ad0810b8c1e6b581fdf44a55750a5c04 (diff)
parent8658d9676d68c228a1ecbff795aad99a8eec8f04 (diff)
downloadistreamdev-cd4f1116b4957248c5e73d729b8aa9b298c3a24f.tar.gz
istreamdev-cd4f1116b4957248c5e73d729b8aa9b298c3a24f.tar.bz2
Merge branch 'jquery' of projects.vdr-developer.org:istreamdev into jquery
-rwxr-xr-xbin/vdr.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/vdr.php b/bin/vdr.php
index fa573da..751ae32 100755
--- a/bin/vdr.php
+++ b/bin/vdr.php
@@ -105,10 +105,16 @@ function vdrgetchannels($category, $now)
if ($now)
$epgnow = vdrsendcommand("LSTE NOW");
+ $channum = 1;
+
while ($line = fgets($fp, 1024))
{
if (!$cat_found)
{
+ // 2 case where we dont increment channum
+ if (! (($line[0] == "") || (($line[0] == ":") && ($line[1] != "@"))) )
+ $channum++;
+
if ($line[0] != ":")
continue;
@@ -118,6 +124,8 @@ function vdrgetchannels($category, $now)
{
$catarray = explode(' ', $cat);
$cat = substr($cat, strlen($catarray[0])+1);
+
+ $channum = substr($catarray[0], 1);
}
if (!is_utf8($cat))
@@ -137,7 +145,7 @@ function vdrgetchannels($category, $now)
$tmpchan = array();
$tmpchan['name'] = $channame;
- $tmpchan['number'] = vdrgetchannum($channame);
+ $tmpchan['number'] = $channum;
if ($now)
{
// Extract now
@@ -180,6 +188,8 @@ function vdrgetchannels($category, $now)
$tmpchan['name'] = utf8_encode($tmpchan['name']);
$chanlist[] = $tmpchan;
+
+ $channum++;
}
}