diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/files.php | 15 | ||||
-rwxr-xr-x | bin/session.php | 12 |
2 files changed, 19 insertions, 8 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; } |