diff options
author | Christian Pointner <equinox@helsinki.at> | 2010-03-29 07:37:15 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2010-03-29 07:37:15 (GMT) |
commit | d66dc3239664f5035ee7d28e138c4799122028b0 (patch) | |
tree | 8f7a43fe0e3f2bb831078aa0ed837b3571a76328 /rhimport | |
parent | 3cd642a557205510b6f2a6c9808f0dfe96d27172 (diff) |
sanity check for clear carts when in pool mode for single cart show
Diffstat (limited to 'rhimport')
-rwxr-xr-x | rhimport | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -216,6 +216,7 @@ sub start_import_gui() my $co_dropbox = $guixml->get_widget('co_dropbox'); my $dropbox = $allowed_dbs[$co_dropbox->get_active]->{'PATH'}; my $group = $allowed_dbs[$co_dropbox->get_active]->{'GROUP'}; + my $to_cart = $allowed_dbs[$co_dropbox->get_active]->{'TO_CART'}; $l_status->set_label("importiere von $file"); @@ -223,7 +224,7 @@ sub start_import_gui() if($POOL) { my $cb_clear_carts = $guixml->get_widget('cb_clear_carts'); if($cb_clear_carts->get_active) { - rhimport::clear_carts($dbh, $group); + rhimport::clear_carts($dbh, $group, $to_cart); } $ret = rhimport::import_playlist($file, $dropbox, $gui_progress_cb); } else { @@ -344,9 +345,12 @@ if($POOL) { } my $group = ''; +my $to_cart = 0; for my $href (@allowed_dbs) { if($href->{'PATH'} eq $DROPBOX) { $group = $href->{'GROUP'}; + $to_cart = $href->{'TO_CART'}; + last; } } @@ -358,7 +362,7 @@ if($group eq '') { my $ret; if($POOL) { if(!$KEEPCARTS) { - rhimport::clear_carts($dbh, $group); + rhimport::clear_carts($dbh, $group, $to_cart); } $ret = rhimport::import_playlist($FILE, $DROPBOX); |