aboutsummaryrefslogtreecommitdiffstats
path: root/tools/piwigo_remote.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/piwigo_remote.pl')
-rw-r--r--tools/piwigo_remote.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/piwigo_remote.pl b/tools/piwigo_remote.pl
index dcc6ba2cd..30b8743b4 100644
--- a/tools/piwigo_remote.pl
+++ b/tools/piwigo_remote.pl
@@ -10,7 +10,7 @@ use Getopt::Long;
my %opt = ();
GetOptions(
\%opt,
- qw/action=s file=s thumbnail=s category_id=i name=s rank=s/
+ qw/action=s file=s thumbnail=s categories=s define=s%/
);
our $ua = LWP::UserAgent->new;
@@ -59,11 +59,13 @@ if ($opt{action} eq 'pwg.images.add') {
file_content => $file_content,
thumbnail_sum => $thumbnail_sum,
thumbnail_content => $thumbnail_content,
- category_id => $opt{category_id},
- name => $opt{name},
- rank => defined($opt{rank}) ? $opt{rank} : 'auto',
+ categories => $opt{categories},
};
+ foreach my $key (keys %{ $opt{define} }) {
+ $form->{$key} = $opt{define}{$key};
+ }
+
my $response = $ua->post(
$conf{base_url}.'/ws.php?format=json',
$form