From aa41a468e53655e186ea667631466bff65cc42fc Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 22 Sep 2008 21:47:03 +0000 Subject: improvement: WebService method pwg.images.add can set fill #images table columns. rank is directly related to a category and several categories can be linked at once. Basic technical metadata {filesize, width, height} are automaticaly filled. git-svn-id: http://piwigo.org/svn/trunk@2569 68402e56-0260-453c-a942-63ccdbb3a9ee --- tools/piwigo_remote.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tools/piwigo_remote.pl') 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 -- cgit v1.2.3