summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl Vollmer <vollmer@ampache.org>2011-11-23 16:49:36 -0400
committerKarl Vollmer <vollmer@ampache.org>2011-11-23 16:49:36 -0400
commite862098f66d7959663715b7b7002cf087f0fe3cd (patch)
treec5b6391b608947619b74a94a26576eb80e1a216e /lib
parent5adf4081041e7d4c23427db670b7e97d72103ccb (diff)
downloadampache-e862098f66d7959663715b7b7002cf087f0fe3cd.tar.gz
ampache-e862098f66d7959663715b7b7002cf087f0fe3cd.tar.bz2
ampache-e862098f66d7959663715b7b7002cf087f0fe3cd.zip
Testing Bot e-mail function, but a little more work on the remote catalogs
Diffstat (limited to 'lib')
-rw-r--r--lib/class/catalog.class.php19
1 files changed, 6 insertions, 13 deletions
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("<b>Reading Remote Catalog: $catalog_name ($count Songs)</b> [$this->path]<br />\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 "<p>" . _('Completed updating remote catalog(s)') . ".</p><hr />\n";