Changeset 2919 for trunk/tools


Ignore:
Timestamp:
Dec 3, 2008, 11:55:17 PM (15 years ago)
Author:
plg
Message:

merge r2722 from branch 2.0 to trunk

feature 892 added: pwg.images.setInfo added so that once we have discovered
the photo was already in the database (thanks to pwg.images.exist), we can
only set the photo metadata.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/piwigo_remote.pl

    r2683 r2919  
    193193}
    194194
     195if ($opt{action} eq 'pwg.images.setInfo') {
     196    $form = {
     197        method => $opt{action},
     198    };
     199
     200    foreach my $key (keys %{ $opt{define} }) {
     201        $form->{$key} = $opt{define}{$key};
     202    }
     203
     204    my $response = $ua->post(
     205        $conf{base_url}.'/ws.php?format=json',
     206        $form
     207    );
     208
     209    use Data::Dumper;
     210    # print Dumper(from_json($response->content)->{result});
     211    print Dumper($response);
     212}
     213
    195214$query = pwg_ws_get_query(
    196215    method => 'pwg.session.logout'
Note: See TracChangeset for help on using the changeset viewer.