From e862098f66d7959663715b7b7002cf087f0fe3cd Mon Sep 17 00:00:00 2001 From: Karl Vollmer Date: Wed, 23 Nov 2011 16:49:36 -0400 Subject: Testing Bot e-mail function, but a little more work on the remote catalogs --- lib/class/catalog.class.php | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'lib/class/catalog.class.php') diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index 5a7921c2..84471c33 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -1301,27 +1301,20 @@ class Catalog extends database_object { // Figure out how many songs, more information etc $remote_catalog_info = $remote_handle->info(); - - - // Print out the catalogs we are going to sync - foreach ($data as $vars) { - $catalog_name = $vars['name']; - $count = $vars['count']; - print("Reading Remote Catalog: $catalog_name ($count Songs) [$this->path]
\n"); - $total += $count; - } - - // Flush the output - flush(); + // Tell em what we've found johnny! + printf(_('%u remote catalogs found (%u songs)'),$remote_catalog_info['catalogs'],$remote_catalog_info['songs']); + flush(); // Hardcoded for now $step = '500'; $current = '0'; + $total = $remote_catalog_info['songs']; while ($total > $current) { $start = $current; $current += $step; - $this->get_remote_song($client,$token,$start,$step); + $remote_handle->parse_response($remote_handle->send_command('songs',array('offset'=>$start,'limit'=>$step))); + $songs = $remote_handle->get_response(); } echo "

" . _('Completed updating remote catalog(s)') . ".


\n"; -- cgit