After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724615 - flickr: Set mime-type for images
flickr: Set mime-type for images
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
unspecified
Other All
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
: 724614 (view as bug list)
Depends on:
Blocks: 707569
 
 
Reported: 2014-02-18 09:33 UTC by Bastien Nocera
Modified: 2014-02-18 11:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flickr: Set mime-type for images (973 bytes, patch)
2014-02-18 09:34 UTC, Bastien Nocera
needs-work Details | Review
flickr: Set MIME-type for media (1.48 KB, patch)
2014-02-18 10:10 UTC, Debarshi Ray
committed Details | Review

Description Bastien Nocera 2014-02-18 09:33:57 UTC
.
Comment 1 Bastien Nocera 2014-02-18 09:34:00 UTC
Created attachment 269517 [details] [review]
flickr: Set mime-type for images
Comment 2 Bastien Nocera 2014-02-18 09:34:26 UTC
*** Bug 724614 has been marked as a duplicate of this bug. ***
Comment 3 Debarshi Ray 2014-02-18 09:54:42 UTC
Review of attachment 269517 [details] [review]:

I think you should add GRL_METADATA_KEY_MIME to the list of supported_keys.

::: src/flickr/grl-flickr.c
@@ +489,3 @@
+      g_free (mime);
+    }
+  }

Need to free content_type too, and it can not be const gchar *.
Comment 4 Debarshi Ray 2014-02-18 10:03:17 UTC
Review of attachment 269517 [details] [review]:

::: src/flickr/grl-flickr.c
@@ +484,3 @@
+
+    content_type = g_content_type_guess (url, NULL, 0, NULL);
+    mime = g_content_type_get_mime_type (content_type);

You need to check if content_type is non-NULL. Else you will get a WARNING.
Comment 5 Debarshi Ray 2014-02-18 10:10:14 UTC
Created attachment 269519 [details] [review]
flickr: Set MIME-type for media
Comment 6 Bastien Nocera 2014-02-18 10:14:06 UTC
Review of attachment 269519 [details] [review]:

Looks good.
Comment 7 Juan A. Suarez Romero 2014-02-18 11:39:40 UTC
Attachment 269519 [details] pushed as c2ceb92 - flickr: Set MIME-type for media