[shotwell/shotwell-0.24] picasa: Use proper mime type for video
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/shotwell-0.24] picasa: Use proper mime type for video
- Date: Sat, 4 Mar 2017 09:40:49 +0000 (UTC)
commit f9b906012a757e9fdc4e053cb789558ddbd914e0
Author: Jens Georg <mail jensge org>
Date: Tue Feb 21 22:57:47 2017 +0100
picasa: Use proper mime type for video
Signed-off-by: Jens Georg <mail jensge org>
plugins/shotwell-publishing/PicasaPublishing.vala | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/plugins/shotwell-publishing/PicasaPublishing.vala
b/plugins/shotwell-publishing/PicasaPublishing.vala
index 6ff7c39..f496750 100644
--- a/plugins/shotwell-publishing/PicasaPublishing.vala
+++ b/plugins/shotwell-publishing/PicasaPublishing.vala
@@ -429,8 +429,16 @@ internal class UploadTransaction :
this.session = session;
this.parameters = parameters;
this.publishable = publishable;
- this.mime_type = (publishable.get_media_type() == Spit.Publishing.Publisher.MediaType.VIDEO) ?
- "video/mpeg" : "image/jpeg";
+ if (publishable.get_media_type() == Spit.Publishing.Publisher.MediaType.VIDEO) {
+ try {
+ var info =
this.publishable.get_serialized_file().query_info(FileAttribute.STANDARD_CONTENT_TYPE,
FileQueryInfoFlags.NONE);
+ this.mime_type = ContentType.get_mime_type(info.get_content_type());
+ } catch (Error err) {
+ this.mime_type = "video/mpeg";
+ }
+ } else {
+ this.mime_type = "image/jpeg";
+ }
}
public override void execute() throws Spit.Publishing.PublishingError {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]