diff options
author | Karl Vollmer <vollmer@ampache.org> | 2011-11-23 16:17:14 -0400 |
---|---|---|
committer | Karl Vollmer <vollmer@ampache.org> | 2011-11-23 16:17:14 -0400 |
commit | d4390d2dfcda8008f08e4b6e69c1f83553eecf9f (patch) | |
tree | 0a83e192e9ee959bbd3dd3cf257eb055e52b9bb1 /lib/class/api.class.php | |
parent | 8fbbe64e8ff9b0f9b598a397f3ad9b256331e978 (diff) | |
download | ampache-d4390d2dfcda8008f08e4b6e69c1f83553eecf9f.tar.gz ampache-d4390d2dfcda8008f08e4b6e69c1f83553eecf9f.tar.bz2 ampache-d4390d2dfcda8008f08e4b6e69c1f83553eecf9f.zip |
Add Catalog count to handshake response for API, Wiki updated to reflect change
Diffstat (limited to 'lib/class/api.class.php')
-rw-r--r-- | lib/class/api.class.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/class/api.class.php b/lib/class/api.class.php index 91433437..54fa0a94 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -210,6 +210,10 @@ class Api { $db_results = Dba::read($sql); $playlist = Dba::fetch_assoc($db_results); + $sql = "SELECT COUNT(`id`) AS `catalog` FROM `catalog`"; + $db_results = Dba::read($sql); + $catalog = Dba::fetch_assoc($db_results); + echo xmlData::keyed_array(array('auth'=>$token, 'api'=>self::$version, 'update'=>date("c",$row['update']), @@ -219,7 +223,8 @@ class Api { 'albums'=>$counts['album'], 'artists'=>$counts['artist'], 'playlists'=>$playlist['playlist'], - 'videos'=>$vcounts['video'])); + 'videos'=>$vcounts['video'], + 'catalogs'=>$catalog['catalog'])); return true; } // match |