diff options
author | Alib <aliboba@free.fr> | 2010-03-21 13:37:01 +0100 |
---|---|---|
committer | Alib <aliboba@free.fr> | 2010-03-21 13:37:01 +0100 |
commit | 699e33d7edac42d61ab56d24650be8503697a0d8 (patch) | |
tree | b94cf68ed3295035ab87bf1fcc293534690795c6 /bin/session.php | |
parent | 580682c2f6b6a4e0d8185fdf54248573178507f6 (diff) | |
download | istreamdev-699e33d7edac42d61ab56d24650be8503697a0d8.tar.gz istreamdev-699e33d7edac42d61ab56d24650be8503697a0d8.tar.bz2 |
corrected channame value to defined when generating thumb
Diffstat (limited to 'bin/session.php')
-rwxr-xr-x | bin/session.php | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/bin/session.php b/bin/session.php index 2a149d3..fee5b58 100755 --- a/bin/session.php +++ b/bin/session.php @@ -33,6 +33,21 @@ function sessioncreate($type, $url, $mode) // Create session exec('mkdir ../ram/' .$session); + // Extract $channame if needed + switch ($type) + { + case 'tv': + $urlarray = explode("/", $url); + $channum = $urlarray[count($urlarray)-1]; + $channame = vdrgetchanname($channum); + break; + case 'rec': + list($channame, $title, $desc, $recorded) = vdrgetrecinfo($url); + break; + default: + $channame = ""; + break; + } // Create logo if ($type == 'vid') generatelogo($type, $url, '../ram/' .$session .'/thumb.png'); @@ -57,22 +72,6 @@ function sessioncreate($type, $url, $mode) $cmd = str_replace('%', '%%', $cmd); exec ($cmd); - - // Extract $channame if needed - switch ($type) - { - case 'tv': - $urlarray = explode("/", $url); - $channum = $urlarray[count($urlarray)-1]; - $channame = vdrgetchanname($channum); - break; - case 'rec': - list($channame, $title, $desc, $recorded) = vdrgetrecinfo($url); - break; - default: - $channame = ""; - break; - } // Write streaminfo writeinfostream($session, $type, $mode, $url, $channame); |