feature 889 added: pwg.images.exist check the existence of a photo in the

database based on its md5sum. (avoid failing on pwg.images.add).


git-svn-id: http://piwigo.org/svn/trunk@2683 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2008-10-07 22:01:14 +00:00
parent 42c665eeff
commit 3eecf04629
3 changed files with 67 additions and 0 deletions
+19
View File
@@ -173,6 +173,25 @@ if ($opt{action} eq 'pwg.tags.add') {
print Dumper(from_json($response->content));
}
if ($opt{action} eq 'pwg.images.exist') {
$form = {
method => $opt{action},
};
foreach my $key (keys %{ $opt{define} }) {
$form->{$key} = $opt{define}{$key};
}
my $response = $ua->post(
$conf{base_url}.'/ws.php?format=json',
$form
);
use Data::Dumper;
print Dumper(from_json($response->content)->{result});
# print Dumper($response);
}
$query = pwg_ws_get_query(
method => 'pwg.session.logout'
);