Changeset 2683 for trunk/tools


Ignore:
Timestamp:
Oct 8, 2008, 12:01:14 AM (16 years ago)
Author:
plg
Message:

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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/piwigo_remote.pl

    r2670 r2683  
    174174}
    175175
     176if ($opt{action} eq 'pwg.images.exist') {
     177    $form = {
     178        method => $opt{action},
     179    };
     180
     181    foreach my $key (keys %{ $opt{define} }) {
     182        $form->{$key} = $opt{define}{$key};
     183    }
     184
     185    my $response = $ua->post(
     186        $conf{base_url}.'/ws.php?format=json',
     187        $form
     188    );
     189
     190    use Data::Dumper;
     191    print Dumper(from_json($response->content)->{result});
     192    # print Dumper($response);
     193}
     194
    176195$query = pwg_ws_get_query(
    177196    method => 'pwg.session.logout'
Note: See TracChangeset for help on using the changeset viewer.