Merge lp:~harp37/pantheon-photos/facebook-publishing into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by Anthony Huben
Status: Merged
Approved by: Cody Garver
Approved revision: 2773
Merged at revision: 2796
Proposed branch: lp:~harp37/pantheon-photos/facebook-publishing
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 38 lines (+13/-2)
2 files modified
THANKS (+1/-0)
plugins/shotwell-publishing/FacebookPublishing.vala (+12/-2)
To merge this branch: bzr merge lp:~harp37/pantheon-photos/facebook-publishing
Reviewer Review Type Date Requested Status
Photos Devs Pending
Review via email: mp+261407@code.launchpad.net

Commit message

Cherrypick upstream Facebook sharing improved metadata support (lp:1462171) commit https://github.com/GNOME/shotwell/commit/eae085285686503c5318d4bae5033c411eef5dd2

Description of the change

Import from Shotwell

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'THANKS'
2--- THANKS 2014-05-28 13:22:43 +0000
3+++ THANKS 2015-06-08 15:04:07 +0000
4@@ -8,6 +8,7 @@
5 Simon Adda-Reyss <simon.addareyss@libertysurf.fr>
6 Mihhail Afanasjev <mihhail.afanasjev@gmail.com>
7 Joeny Ang <ang.joeny@gmail.com>
8+Eduardo Arnold <eduardoarnoldh@gmail.com>
9 Jeroen Arnoldus <b.j.arnoldus@bja-electronics.nl>
10 Michael Axiak <mike@axiak.net>
11 Eser Aygün <eser.aygun@gmail.com>
12
13=== modified file 'plugins/shotwell-publishing/FacebookPublishing.vala'
14--- plugins/shotwell-publishing/FacebookPublishing.vala 2014-08-29 00:46:35 +0000
15+++ plugins/shotwell-publishing/FacebookPublishing.vala 2015-06-08 15:04:07 +0000
16@@ -1392,10 +1392,20 @@
17 if (publishable.get_media_type () == Spit.Publishing.Publisher.MediaType.VIDEO)
18 mp_envelope.append_form_string ("privacy", resource_privacy);
19
20- string publishable_title = publishable.get_publishing_name ();
21- if (!suppress_titling && publishable_title != "")
22+ // get photo title and post it as message on FB API
23+ string publishable_title = publishable.get_param_string("title");
24+ if (!suppress_titling && publishable_title != null)
25 mp_envelope.append_form_string ("name", publishable_title);
26
27+ // set 'message' data field with EXIF comment field. Title has precedence.
28+ string publishable_comment = publishable.get_param_string("comment");
29+ if (!suppress_titling && publishable_comment != null)
30+ mp_envelope.append_form_string("message", publishable_comment);
31+
32+ // set correct date of the picture
33+ if (!suppress_titling)
34+ mp_envelope.append_form_string("backdated_time", publishable.get_exposure_date_time().to_string());
35+
36 string source_file_mime_type =
37 (publishable.get_media_type () == Spit.Publishing.Publisher.MediaType.VIDEO) ?
38 "video" : "image/jpeg";

Subscribers

People subscribed via source and target branches

to all changes: