[PATCH 1/1] all: Handle "support-media" in sources



From: "Juan A. Suarez Romero" <jasuarez igalia com>

Make each source to report the type of media it handles.
---
 src/apple-trailers/grl-apple-trailers.c |    1 +
 src/bliptv/grl-bliptv.c                 |    1 +
 src/flickr/grl-flickr.c                 |    1 +
 src/jamendo/grl-jamendo.c               |    1 +
 src/shoutcast/grl-shoutcast.c           |    1 +
 src/vimeo/grl-vimeo.c                   |    1 +
 src/youtube/grl-youtube.c               |    1 +
 7 files changed, 7 insertions(+)

diff --git a/src/apple-trailers/grl-apple-trailers.c b/src/apple-trailers/grl-apple-trailers.c
index 5f82b36..9a87495 100644
--- a/src/apple-trailers/grl-apple-trailers.c
+++ b/src/apple-trailers/grl-apple-trailers.c
@@ -165,6 +165,7 @@ grl_apple_trailers_source_new (gboolean high_definition,
                          "source-id", SOURCE_ID,
                          "source-name", SOURCE_NAME,
                          "source-desc", SOURCE_DESC,
+                         "supported-media", GRL_MEDIA_TYPE_VIDEO,
                          "high-definition", high_definition,
 			 "large-poster", xlarge,
                          NULL);
diff --git a/src/bliptv/grl-bliptv.c b/src/bliptv/grl-bliptv.c
index 202c396..366df07 100644
--- a/src/bliptv/grl-bliptv.c
+++ b/src/bliptv/grl-bliptv.c
@@ -138,6 +138,7 @@ grl_bliptv_source_new (void)
                        "source-id", SOURCE_ID,
                        "source-name", SOURCE_NAME,
                        "source-desc", SOURCE_DESC,
+                       "supported-media", GRL_MEDIA_TYPE_VIDEO,
                        NULL);
 }
 
diff --git a/src/flickr/grl-flickr.c b/src/flickr/grl-flickr.c
index b2a4129..87319a3 100644
--- a/src/flickr/grl-flickr.c
+++ b/src/flickr/grl-flickr.c
@@ -192,6 +192,7 @@ grl_flickr_source_public_new (const gchar *flickr_api_key,
                          "source-id", PUBLIC_SOURCE_ID,
                          "source-name", PUBLIC_SOURCE_NAME,
                          "source-desc", PUBLIC_SOURCE_DESC,
+                         "supported-media", GRL_MEDIA_TYPE_IMAGE,
                          NULL);
   source->priv->flickr = g_flickr_new (flickr_api_key, flickr_secret, NULL);
 
diff --git a/src/jamendo/grl-jamendo.c b/src/jamendo/grl-jamendo.c
index 3fe3f93..3dce918 100644
--- a/src/jamendo/grl-jamendo.c
+++ b/src/jamendo/grl-jamendo.c
@@ -228,6 +228,7 @@ grl_jamendo_source_new (void)
 		       "source-id", SOURCE_ID,
 		       "source-name", SOURCE_NAME,
 		       "source-desc", SOURCE_DESC,
+		       "supported-media", GRL_MEDIA_TYPE_AUDIO,
 		       NULL);
 }
 
diff --git a/src/shoutcast/grl-shoutcast.c b/src/shoutcast/grl-shoutcast.c
index bb93114..033c6dd 100644
--- a/src/shoutcast/grl-shoutcast.c
+++ b/src/shoutcast/grl-shoutcast.c
@@ -182,6 +182,7 @@ grl_shoutcast_source_new (const gchar *dev_key)
                           "source-id", SOURCE_ID,
                           "source-name", SOURCE_NAME,
                           "source-desc", SOURCE_DESC,
+                          "supported-media", GRL_MEDIA_TYPE_AUDIO,
                           NULL);
 
   source->priv->dev_key = g_strdup (dev_key);
diff --git a/src/vimeo/grl-vimeo.c b/src/vimeo/grl-vimeo.c
index 68fd44d..3222382 100644
--- a/src/vimeo/grl-vimeo.c
+++ b/src/vimeo/grl-vimeo.c
@@ -161,6 +161,7 @@ grl_vimeo_source_new (void)
                        "source-id", SOURCE_ID,
                        "source-name", SOURCE_NAME,
                        "source-desc", SOURCE_DESC,
+                       "supported-media", GRL_MEDIA_TYPE_VIDEO,
                        NULL);
 }
 
diff --git a/src/youtube/grl-youtube.c b/src/youtube/grl-youtube.c
index 53f182d..91957d5 100644
--- a/src/youtube/grl-youtube.c
+++ b/src/youtube/grl-youtube.c
@@ -334,6 +334,7 @@ grl_youtube_source_new (const gchar *api_key, const gchar *client_id, const gcha
 					     "auto-split-threshold",
 					     YOUTUBE_MAX_CHUNK,
                                              "yt-service", service,
+                                             "supported-media", GRL_MEDIA_TYPE_VIDEO,
 					     NULL));
 
   /* Set up quvi */
-- 
1.7.10.4



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