Skip to content
Browse files

Adding author argument

  • Loading branch information...
1 parent 03036a0 commit 9b7f504ef07af4bb46b6f0fc6cebdf57aed888cc @guillaumev committed Nov 21, 2010
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/PiwigoConnector.vala
View
9 src/PiwigoConnector.vala
@@ -1126,6 +1126,9 @@ private class ImagesAddTransaction : Transaction {
}
debug("photo: '%s', tags: '%s'", photo.get_title(), tags);
+ PhotoMetadata meta = photo.get_metadata();
+ string author = meta.get_artist();
+
debug("PiwigoConnector: Uploading photo %s to category id %s with perm level %s", media_source.get_name(), parameters.get_category_id().to_string(), parameters.get_perm_level().to_string());
add_argument("method", "pwg.images.addSimple");
add_argument("category", parameters.get_category_id().to_string());
@@ -1134,8 +1137,12 @@ private class ImagesAddTransaction : Transaction {
if (tags != "") {
add_argument("tags", tags);
}
+
+ if (author != "") {
+ add_argument("author", author);
+ }
- // TODO: add description, author etc...
+ // TODO: add description
GLib.HashTable<string, string> disposition_table = new GLib.HashTable<string, string>(GLib.str_hash, GLib.str_equal);
disposition_table.insert("filename", media_source.get_name());

0 comments on commit 9b7f504

Please sign in to comment.
Something went wrong with that request. Please try again.