diff options
-rwxr-xr-x | bin/files.php | 15 | ||||
-rwxr-xr-x | bin/session.php | 12 | ||||
-rw-r--r-- | js/istreamdev.js | 2 |
3 files changed, 20 insertions, 9 deletions
diff --git a/bin/files.php b/bin/files.php index ba82d21..d87d332 100755 --- a/bin/files.php +++ b/bin/files.php @@ -11,9 +11,18 @@ function mediagetinfostream($stream) $info['name'] = basename($stream); $info['desc'] = ""; $info['duration'] = sec2hms($fileinfo['playtime_seconds']); - $info['format'] = $fileinfo['fileformat']; - $info['video'] = $fileinfo['video']['codec']; - $info['audio'] = $fileinfo['audio']['codec']; + if ($fileinfo['fileformat']) + $info['format'] = $fileinfo['fileformat']; + else + $info['format'] = "unkown"; + if ($fileinfo['video']['codec']) + $info['video'] = $fileinfo['video']['codec']; + else + $info['video'] = "unkown"; + if ($fileinfo['audio']['codec']) + $info['audio'] = $fileinfo['audio']['codec']; + else + $info['audio'] = "unkown"; $info['resolution'] = $fileinfo['video']['resolution_x'] ."x" .$fileinfo['video']['resolution_y']; return $info; diff --git a/bin/session.php b/bin/session.php index ccf12fe..09d793f 100755 --- a/bin/session.php +++ b/bin/session.php @@ -122,21 +122,23 @@ function sessiongetinfo($session) $info['type'] = $type; $info['mode'] = $mode; + // Get info + $getid3 = new getID3; + $fileinfo = $getid3->analyze('../ram/' .$session .'/thumb.png'); + $info['thumbwidth'] = $fileinfo['video']['resolution_x']; + $info['thumbheight'] = $fileinfo['video']['resolution_y']; + // Type info switch ($type) { case 'tv': $info['name'] = $channame; - $info['thumbwidth'] = 80; - $info['thumbheight'] = 80; $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'], $info['recorded']) = vdrgetrecinfo($url); break; case 'vid': @@ -146,7 +148,7 @@ function sessiongetinfo($session) $info['format'] = $infovid['format']; $info['video'] = $infovid['video']; $info['audio'] = $infovid['audio']; - $info['resiolution'] = $infovid['resiolution']; + $info['resolution'] = $infovid['resolution']; break; } diff --git a/js/istreamdev.js b/js/istreamdev.js index 8c4a906..1b2a160 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -339,7 +339,7 @@ function gen_streamvid(filename,path) { $("#streamvid").find('span[class="epgtime_now"]').html( 'Duration: ' + program.duration );
desc='<b>format: </b>' + program.format + '<br><b>video: </b>' + program.video + '<br><b>audio: </b>' + program.audio + '<br><b>resolution: </b>' + program.resolution;
$("#streamvid").find('span[class="desc_now"]').html( desc );
- $("#streamvid").find('span[rel="url"]').html( path + filename );
+ $("#streamvid").find('span[rel="url"]').html( path + "/" + filename );
$("#streamvid").find('span[rel="type"]').html('vid');
json_complete('#streamvid','cube');
});
|