Index: /extensions/BatchDownloader/admin/sets.php
===================================================================
--- /extensions/BatchDownloader/admin/sets.php	(revision 16597)
+++ /extensions/BatchDownloader/admin/sets.php	(revision 16598)
@@ -12,8 +12,9 @@
 if (isset($_GET['cancel']))
 {
-  $BatchDownloader = new BatchDownloader($_GET['cancel']);
+  $BatchDownloader = new BatchDownloader($_GET['cancel']);  
+  $BatchDownloader->updateParam('total_size', $BatchDownloader->getEstimatedTotalSize());
+  $BatchDownloader->updateParam('status', 'done');
   $BatchDownloader->deleteLastArchive();
   $BatchDownloader->clearImages();
-  $BatchDownloader->updateParam('status', 'done');
 }
 
@@ -94,5 +95,5 @@
   'list' => l10n('Random'),
   'recent_pics' => l10n('Recent photos'),
-  // 'selection' => l10n('Selection'),
+  'collection' => l10n('User collection'),
   );
 
Index: /extensions/BatchDownloader/admin/template/config.tpl
===================================================================
--- /extensions/BatchDownloader/admin/template/config.tpl	(revision 16597)
+++ /extensions/BatchDownloader/admin/template/config.tpl	(revision 16598)
@@ -83,5 +83,5 @@
     <li>
       <label>
-        <span class="property">{'Delete unterminated downloads after'|@translate}</span>
+        <span class="property">{'Delete downloads after'|@translate}</span>
         <input type="text" name="archive_timeout" value="{$batch_download.archive_timeout}" size="3"> {'hours'|@translate}
       </label>
Index: /extensions/BatchDownloader/include/BatchDownloader.class.php
===================================================================
--- /extensions/BatchDownloader/include/BatchDownloader.class.php	(revision 16597)
+++ /extensions/BatchDownloader/include/BatchDownloader.class.php	(revision 16598)
@@ -431,5 +431,5 @@
       $out.= '<li id="zip-'.$i.'">';
       
-      if ($i < $this->data['last_zip']+1)
+      if ($this->data['status'] == 'done' or $i < $this->data['last_zip']+1)
       {
         $out.= '<img src="'.BATCH_DOWNLOAD_PATH.'template/drive.png"> Archive #'.$i.' (already downloaded)';
Index: /extensions/BatchDownloader/include/events.inc.php
===================================================================
--- /extensions/BatchDownloader/include/events.inc.php	(revision 16597)
+++ /extensions/BatchDownloader/include/events.inc.php	(revision 16598)
@@ -34,5 +34,5 @@
       case 'view':
         $page['sub_section'] = 'view';
-        $page['title'].= l10n('Edit set');
+        $page['title'].= l10n('Edit the set');
         break;
       default:
@@ -107,5 +107,5 @@
   // toolbar button
   $button = '<li><a href="'. $url .'&amp;action=advdown_set" title="'.l10n('Download all pictures of this selection').'" class="pwg-state-default pwg-button" rel="nofollow">
-			<span class="pwg-icon" style="background:url(\'' . BATCH_DOWNLOAD_PATH . 'template/zip.png\') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">'.l10n('Advanced Downloader').'</span>
+			<span class="pwg-icon" style="background:url(\'' . BATCH_DOWNLOAD_PATH . 'template/zip.png\') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">'.l10n('Batch Downloader').'</span>
 		</a></li>';
   $template->concat('PLUGIN_INDEX_ACTIONS', $button);
@@ -130,9 +130,10 @@
     user_id = '.$user['id'].'
     AND status != "done"
+  LIMIT 1
 ;';
   $result = pwg_query($query);
   if (!pwg_db_num_rows($result)) return;
   
-  $menu->register_block(new RegisteredBlock('mbAdvancedDownloader', l10n('Downloads'), 'AdvancedDownloader'));
+  $menu->register_block(new RegisteredBlock('mbBatchDownloader', l10n('Batch Downloader'), 'BatchDownloader'));
 }
 
@@ -142,5 +143,5 @@
   
   $menu = &$menu_ref_arr[0];
-  $block = $menu->get_block('mbAdvancedDownloader');
+  $block = $menu->get_block('mbBatchDownloader');
   
   if ($block != null)
@@ -171,5 +172,5 @@
     $template->set_template_dir(BATCH_DOWNLOAD_PATH . 'template/');
     $block->set_title(l10n('Downloads'));
-    $block->template = 'menublock.tpl';
+    $block->template = 'menublock_batch_down.tpl';
     $block->data = $data;
   }
Index: /extensions/BatchDownloader/language/en_UK/description.txt
===================================================================
--- /extensions/BatchDownloader/language/en_UK/description.txt	(revision 16597)
+++ /extensions/BatchDownloader/language/en_UK/description.txt	(revision 16598)
@@ -0,0 +1,1 @@
+Allows users to download pictures sets in ZIP. Compatible with User Collections.
Index: /extensions/BatchDownloader/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/BatchDownloader/language/en_UK/plugin.lang.php	(revision 16597)
+++ /extensions/BatchDownloader/language/en_UK/plugin.lang.php	(revision 16598)
@@ -1,5 +1,41 @@
 <?php
 
-
+$lang['download'] = 'download';
+$lang['done'] = 'done';
+$lang['Whole gallery'] = 'Whole gallery';
+$lang['Random'] = 'Random';
+$lang['User collection'] = 'User collection';
+$lang['Nb images'] = 'Nb images';
+$lang['Nb archives'] = 'Nb archives';
+$lang['Total size'] = 'Total size';
+$lang['Download history'] = 'Download history';
+$lang['Download set deleted'] = 'Download set deleted';
+$lang['The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>'] = 'The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>';
+$lang['You choose to download %d pictures, but the system is limited to %d. You can edit the set, or the last %d pictures will not be downloaded.'] = 'You choose to download %d pictures, but the system is limited to %d. You can edit the set, or the last %d pictures will not be downloaded.';
+$lang['You can not edit this set'] = 'You can not edit this set';
+$lang['Batch Downloader'] = 'Batch Downloader';
+$lang['Generate ZIP'] = 'Generate ZIP';
+$lang['Edit the set'] = 'Edit the set';
+$lang['Download all pictures of this selection'] = 'Download all pictures of this selection';
+$lang['Downloads'] = 'Downloads';
+$lang['Download permissions'] = 'Download permissions';
+$lang['User groups'] = 'User groups';
+$lang['Archives'] = 'Archives';
+$lang['Maximum photo size'] = 'Maximum photo size';
+$lang['Delete downloads after'] = 'Delete downloads after';
+$lang['Maximum number of photos per download set'] = 'Maximum number of photos per download set';
+$lang['Maximum size of each archive (in Megabytes)'] = 'Maximum size of each archive (in Megabytes)';
+$lang['Archive prefix'] = 'Archive prefix';
+$lang['Archive comment'] = 'Archive comment';
+$lang['Set type'] = 'Set type';
+$lang['Delete this set'] = 'Delete this set';
+$lang['Cancel this set'] = 'Cancel this set';
+$lang['Download info'] = 'Download info';
+$lang['Estimated number of archives'] = 'Estimated number of archives';
+$lang['real number of archives can differ'] = 'real number of archives can differ';
+$lang['Download links'] = 'Download links';
+$lang['<b>Warning:</b> all files will be deleted within %d hours'] = '<b>Warning:</b> all files will be deleted within %d hours';
+$lang['Cancel this download'] = 'Cancel this download';
+$lang['Return to download page'] = 'Return to download page';
 
 ?>
Index: /extensions/BatchDownloader/language/fr_FR/description.txt
===================================================================
--- /extensions/BatchDownloader/language/fr_FR/description.txt	(revision 16597)
+++ /extensions/BatchDownloader/language/fr_FR/description.txt	(revision 16598)
@@ -0,0 +1,1 @@
+Permet aux utilisateurs de télécharger les photos par lot. Compatible avec User Collections.
Index: /extensions/BatchDownloader/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/BatchDownloader/language/fr_FR/plugin.lang.php	(revision 16597)
+++ /extensions/BatchDownloader/language/fr_FR/plugin.lang.php	(revision 16598)
@@ -1,5 +1,41 @@
 <?php
 
-
+$lang['download'] = 'téléchargement';
+$lang['done'] = 'terminé';
+$lang['Whole gallery'] = 'Galerie complète';
+$lang['Random'] = 'Aléatoire';
+$lang['User collection'] = 'Collection utilisateur';
+$lang['Nb images'] = 'Nb images';
+$lang['Nb archives'] = 'Nb archives';
+$lang['Total size'] = 'Taille totale';
+$lang['Download history'] = 'Historique des téléchargements';
+$lang['Download set deleted'] = 'Lot supprimé';
+$lang['The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>'] = 'L\'archive est en court de téléchargement, si le téléchargement n\'a pas commencé automatiquement veuillez <a href="%s">cliquer ici</a>';
+$lang['You choose to download %d pictures, but the system is limited to %d. You can edit the set, or the last %d pictures will not be downloaded.'] = 'Vous avez sélectionné %d photos, mais le système est limité à %d. Vous pouvez éditer le lot, ou les %d dernières photos ne seront pas téléchargées.';
+$lang['You can not edit this set'] = 'Vous ne pouvez pas éditer ce lot';
+$lang['Batch Downloader'] = 'Téléchargement par lot';
+$lang['Generate ZIP'] = 'Génération des ZIP';
+$lang['Edit the set'] = 'Editer le lot';
+$lang['Download all pictures of this selection'] = 'Télécharger toutes les photos de cette sélection';
+$lang['Downloads'] = 'Téléchargements';
+$lang['Download permissions'] = 'Permissions de téléchargement';
+$lang['User groups'] = 'Groupes d\'utilisateurs';
+$lang['Archives'] = 'Archives';
+$lang['Maximum photo size'] = 'Taille maximale des photo';
+$lang['Delete unterminated downloads after'] = 'Supprimer les téléchargements après';
+$lang['Maximum number of photos per download set'] = 'Nombre maximal de photos par lot';
+$lang['Maximum size of each archive (in Megabytes)'] = 'Taille maximale de chaque archive (en Megaoctets)';
+$lang['Archive prefix'] = 'Préfixe de l\'archive';
+$lang['Archive comment'] = 'Commentaire de l\'archive';
+$lang['Set type'] = 'Type de lot';
+$lang['Delete this set'] = 'Supprimer ce lot';
+$lang['Cancel this set'] = 'Annuler ce lot';
+$lang['Download info'] = 'Informations sur le téléchargement';
+$lang['Estimated number of archives'] = 'Nombre estimé d\'archives';
+$lang['real number of archives can differ'] = 'le nombre réel d\'archives peut différer';
+$lang['Download links'] = 'Liens de téléchargement';
+$lang['<b>Warning:</b> all files will be deleted within %d hours'] = '<b>Attention:</b> les fichiers seront supprimés dans %d heures';
+$lang['Cancel this download'] = 'Annuler ce téléchargement';
+$lang['Return to download page'] = 'Retourner à la page de téléchargement';
 
 ?>
Index: /extensions/BatchDownloader/main.inc.php
===================================================================
--- /extensions/BatchDownloader/main.inc.php	(revision 16597)
+++ /extensions/BatchDownloader/main.inc.php	(revision 16598)
@@ -3,6 +3,6 @@
 Plugin Name: Batch Downloader
 Version: auto
-Description: Allows users to download pictures sets in ZIP. Compatible with User Selection.
-Plugin URI: http://piwigo.org/ext/extension_view.php?eid=
+Description: Allows users to download pictures sets in ZIP. Compatible with User Collections.
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=616
 Author: Mistic
 Author URI: http://www.strangeplanet.fr
Index: tensions/BatchDownloader/template/menublock.tpl
===================================================================
--- /extensions/BatchDownloader/template/menublock.tpl	(revision 16597)
+++ 	(revision )
@@ -1,11 +1,0 @@
-<dt>{$block->get_title()}</dt>
-<dd>
-	<ul>
-		{foreach from=$block->data item=link}
-		<li>
-      <a href="{$link.URL}" title="{$link.TITLE}" rel="nofollow">{$link.NAME}</a>
-      <span class="menuInfoCat">[{$link.COUNT}]</span>
-    </li>
-		{/foreach}
-	</ul>
-</dd>
Index: /extensions/BatchDownloader/template/menublock_batch_down.tpl
===================================================================
--- /extensions/BatchDownloader/template/menublock_batch_down.tpl	(revision 16598)
+++ /extensions/BatchDownloader/template/menublock_batch_down.tpl	(revision 16598)
@@ -0,0 +1,11 @@
+<dt>{$block->get_title()}</dt>
+<dd>
+	<ul>
+		{foreach from=$block->data item=link}
+		<li>
+      <a href="{$link.URL}" title="{$link.TITLE}" rel="nofollow">{$link.NAME}</a>
+      <span class="menuInfoCat">[{$link.COUNT}]</span>
+    </li>
+		{/foreach}
+	</ul>
+</dd>
