diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-02 01:39:10 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-02 01:39:10 +0000 |
commit | 7a529eeb8af2b1d61e0d82066d9a6aa36e02c09f (patch) | |
tree | cafd383d330cd5e0e643a0593ac7e867ca7b4dd8 | |
parent | a313222ab7b51df79469c6082a856463248006e9 (diff) | |
download | ampache-7a529eeb8af2b1d61e0d82066d9a6aa36e02c09f.tar.gz ampache-7a529eeb8af2b1d61e0d82066d9a6aa36e02c09f.tar.bz2 ampache-7a529eeb8af2b1d61e0d82066d9a6aa36e02c09f.zip |
move around stats information and split it up, tweak quicktime tag detection
-rwxr-xr-x | docs/CHANGELOG | 1 | ||||
-rw-r--r-- | lib/class/vainfo.class.php | 7 | ||||
-rw-r--r-- | stats.php | 9 | ||||
-rw-r--r-- | templates/show_local_catalog_info.inc.php | 46 | ||||
-rw-r--r-- | templates/show_newest.inc.php | 24 | ||||
-rw-r--r-- | templates/show_popular.inc.php | 24 | ||||
-rw-r--r-- | templates/show_stats.inc.php | 29 | ||||
-rw-r--r-- | templates/sidebar_home.inc.php | 7 | ||||
-rw-r--r-- | templates/sidebar_modules.inc.php | 5 |
9 files changed, 94 insertions, 58 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 3b143733..25c6a473 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,7 @@ -------------------------------------------------------------------------- v.3-5-Alpha2 + - Moved Statistics to main menu, split out newest/popular/stats - Fixed bug where saved Thumbnails were almost never used - Fixed Localplay HTTPQ and MPD controls to reconize Live Stream urls. diff --git a/lib/class/vainfo.class.php b/lib/class/vainfo.class.php index b2beee93..78f5186f 100644 --- a/lib/class/vainfo.class.php +++ b/lib/class/vainfo.class.php @@ -661,6 +661,13 @@ class vainfo { } // end foreach + // Also add in any video related stuff we might find + if (strpos('video',$this->_raw2['mime_type'])) { + $info = $this->_parse_avi(&$this->_raw2); + $info['video_codec'] = $this->_raw2['quicktime']['ftyp']['fourcc']; + $array = array_merge($info,$array); + } + return $array; } // _parse_quicktime @@ -46,9 +46,14 @@ switch ($_REQUEST['action']) { break; // Show stats + case 'newest': + require_once Config::get('prefix') . '/templates/show_newest.inc.php'; + break; + case 'popular': + require_once Config::get('preifx') . '/templates/show_popular.inc.php'; + break; + case 'show': default: - // Global stuff first - $stats = Catalog::get_stats(); require_once Config::get('prefix') . '/templates/show_stats.inc.php'; break; } // end switch on action diff --git a/templates/show_local_catalog_info.inc.php b/templates/show_local_catalog_info.inc.php deleted file mode 100644 index 71b6df78..00000000 --- a/templates/show_local_catalog_info.inc.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/* - - Copyright (c) Ampache.org - All Rights Reserved - - this program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -?> -<i><?php echo _('Catalog Statistics'); ?></i> -<table class="tabledata" cellpadding="3" cellspacing="1"> -<tr class="th-top"> - <th><?php echo _('Connected Users'); ?></th> - <th><?php echo _('Total Users'); ?></th> - <th><?php echo _('Albums'); ?></th> - <th><?php echo _('Artists'); ?></th> - <th><?php echo _('Songs'); ?></th> - <th><?php echo _('Genres'); ?></th> - <th><?php echo _('Catalog Size'); ?></th> - <th><?php echo _('Catalog Time'); ?></th> -</tr> -<tr> - <td><?php echo $stats['connected']; ?></td> - <td><?php echo $stats['users'] ?></td> - <td><?php echo $stats['albums']; ?></td> - <td><?php echo $stats['artists']; ?></td> - <td><?php echo $stats['songs']; ?></td> - <td><?php echo $stats['genres']; ?></td> - <td><?php echo $stats['total_size']; ?> <?php echo $stats['size_unit']; ?></td> - <td><?php echo $stats['time_text']; ?></td> -</tr> -</table> diff --git a/templates/show_newest.inc.php b/templates/show_newest.inc.php new file mode 100644 index 00000000..1121d6b6 --- /dev/null +++ b/templates/show_newest.inc.php @@ -0,0 +1,24 @@ +<?php +/* + + Copyright (c) Ampache.org + All rights reserved. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License v2 + as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ +?> +<?php show_box_top(_('Information')); ?> +<?php require_once Config::get('prefix') . '/templates/show_stats_newest.inc.php'; ?> +<?php show_box_bottom(); ?> diff --git a/templates/show_popular.inc.php b/templates/show_popular.inc.php new file mode 100644 index 00000000..1121d6b6 --- /dev/null +++ b/templates/show_popular.inc.php @@ -0,0 +1,24 @@ +<?php +/* + + Copyright (c) Ampache.org + All rights reserved. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License v2 + as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ +?> +<?php show_box_top(_('Information')); ?> +<?php require_once Config::get('prefix') . '/templates/show_stats_newest.inc.php'; ?> +<?php show_box_bottom(); ?> diff --git a/templates/show_stats.inc.php b/templates/show_stats.inc.php index f4f6da6f..a02571ec 100644 --- a/templates/show_stats.inc.php +++ b/templates/show_stats.inc.php @@ -18,10 +18,29 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +$stats = Catalog::get_stats(); ?> -<?php show_box_top(_('Statistics')); ?> -<?php require_once Config::get('prefix') . '/templates/show_local_catalog_info.inc.php'; ?> -<?php require_once Config::get('prefix') . '/templates/show_stats_newest.inc.php'; ?> - - +<?php show_box_top(_('Catalog Statistics')); ?> +<table class="tabledata" cellpadding="3" cellspacing="1"> +<tr class="th-top"> + <th><?php echo _('Connected Users'); ?></th> + <th><?php echo _('Total Users'); ?></th> + <th><?php echo _('Albums'); ?></th> + <th><?php echo _('Artists'); ?></th> + <th><?php echo _('Songs'); ?></th> + <th><?php echo _('Genres'); ?></th> + <th><?php echo _('Catalog Size'); ?></th> + <th><?php echo _('Catalog Time'); ?></th> +</tr> +<tr> + <td><?php echo $stats['connected']; ?></td> + <td><?php echo $stats['users'] ?></td> + <td><?php echo $stats['albums']; ?></td> + <td><?php echo $stats['artists']; ?></td> + <td><?php echo $stats['songs']; ?></td> + <td><?php echo $stats['genres']; ?></td> + <td><?php echo $stats['total_size']; ?> <?php echo $stats['size_unit']; ?></td> + <td><?php echo $stats['time_text']; ?></td> +</tr> +</table> <?php show_box_bottom(); ?> diff --git a/templates/sidebar_home.inc.php b/templates/sidebar_home.inc.php index 6d3780b0..b0ffa145 100644 --- a/templates/sidebar_home.inc.php +++ b/templates/sidebar_home.inc.php @@ -109,4 +109,11 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path'); <li id="sb_home_random_advanced"><a href="<?php echo $web_path; ?>/random.php?action=advanced"><?php echo _('Advanced'); ?></a></li> </ul> </li> + <li><h4><?php echo _('Information'); ?></h4> + <ul class="sb3" id="sb_home_info"> + <li id="sb_home_info_Statistics"><a href="<?php echo $web_path; ?>/stats.php?action=show"><?php echo _('Statistics'); ?></a></li> + <li id="sb_home_info_Newest"><a href="<?php echo $web_path; ?>/stats.php?action=newest"><?php echo _('Newest'); ?></a></li> + <li id="sb_home_info_Popular"><a href="<?php echo $web_path; ?>/stats.php?action=popular"><?php echo _('Popular'); ?></a></li> + </ul> + </li> </ul> diff --git a/templates/sidebar_modules.inc.php b/templates/sidebar_modules.inc.php index 0805aaef..fcf3f1b4 100644 --- a/templates/sidebar_modules.inc.php +++ b/templates/sidebar_modules.inc.php @@ -36,11 +36,6 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path'); <li id="sb_admin_ot_ShowDisabled"><a href="<?php echo $web_path; ?>/admin/flag.php?action=show_disabled"><?php echo _('Show Disabled'); ?></a></li> </ul> </li> - <li><h4><?php echo _('Information'); ?></h4> - <ul class="sb3" id="sb_home_info"> - <li id="sb_home_info_Statistics"><a href="<?php echo $web_path; ?>/stats.php"><?php echo _('Statistics'); ?></a></li> - </ul> - </li> <?php if (Config::get('allow_democratic_playback')) { ?> <li><h4><?php echo _('Democratic'); ?></h4> <ul class="sb3" id="sb_home_democratic"> |