From d4390d2dfcda8008f08e4b6e69c1f83553eecf9f Mon Sep 17 00:00:00 2001 From: Karl Vollmer Date: Wed, 23 Nov 2011 16:17:14 -0400 Subject: Add Catalog count to handshake response for API, Wiki updated to reflect change --- lib/class/api.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/class/api.class.php') 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 -- cgit