[grilo-plugins] bookmarks: Fix GrlMediaType for images too



commit cc99187f7e391aadcb4c0d9cc4d7e795ac7e137d
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Feb 18 11:53:31 2014 +0000

    bookmarks: Fix GrlMediaType for images too
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724548

 src/bookmarks/grl-bookmarks.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/bookmarks/grl-bookmarks.c b/src/bookmarks/grl-bookmarks.c
index 1b95ead..bef3f32 100644
--- a/src/bookmarks/grl-bookmarks.c
+++ b/src/bookmarks/grl-bookmarks.c
@@ -343,6 +343,12 @@ mime_is_audio (const gchar *mime)
   return mime && g_str_has_prefix (mime, "audio/");
 }
 
+static gboolean
+mime_is_image (const gchar *mime)
+{
+  return mime && g_str_has_prefix (mime, "image/");
+}
+
 static GrlMedia *
 build_media_from_stmt (GrlMedia *content, sqlite3_stmt *sql_stmt)
 {
@@ -376,6 +382,8 @@ build_media_from_stmt (GrlMedia *content, sqlite3_stmt *sql_stmt)
       media = GRL_MEDIA (grl_media_new ());
     } else if (mime_is_video (mime)) {
       media = GRL_MEDIA (grl_media_new ());
+    } else if (mime_is_image (mime)) {
+      media = GRL_MEDIA (grl_media_image_new ());
     } else {
       media = GRL_MEDIA (grl_media_new ());
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]