Re: [PATCH 14/15] bliptv: updated for the new caps and options APIs



This plugin is missing the boilerplate for the new caps function. I also
noticed (and will put it here to avoid replying to all the other emails)
that the boilerplate

> +static GrlCaps *
> +grl_youtube_source_get_caps (GrlMetadataSource *source,
> +                             GrlSupportedOps operation)
> +{
> +  static GrlCaps *caps = NULL;
> +
> +  if (caps == NULL) {
> +    caps = grl_caps_new ();
> +  }
> +
> +  return caps;
> +}

Has extra braces in the if (x) part. I think we're usually avoiding
braces unless there is more than one line there.

That's all I spotted in this patchset :)

On 02/12/11 19:42, gemont igalia com wrote:
> From: Guillaume Emont <guijemont igalia com>
> 
> ---
>  src/media/bliptv/grl-bliptv.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/src/media/bliptv/grl-bliptv.c b/src/media/bliptv/grl-bliptv.c
> index d1eb41d..47347dc 100644
> --- a/src/media/bliptv/grl-bliptv.c
> +++ b/src/media/bliptv/grl-bliptv.c
> @@ -388,9 +388,10 @@ grl_bliptv_source_browse (GrlMediaSource *source,
>    BliptvOperation *op = g_slice_new0 (BliptvOperation);
>    GError *error = NULL;
>    gchar *length;
> +  gint count = grl_operation_options_get_count (bs->options);
>  
>    op->source       = g_object_ref (source);
> -  op->count        = bs->count;
> +  op->count        = count;
>    op->operation_id = bs->browse_id;
>    op->callback     = bs->callback;
>    op->user_data    = bs->user_data;
> @@ -400,7 +401,7 @@ grl_bliptv_source_browse (GrlMediaSource *source,
>    op->proxy = rest_proxy_new ("http://blip.tv/posts/";, FALSE);
>    op->call = rest_proxy_new_call (op->proxy);
>    rest_proxy_call_add_param (op->call, "skin", "rss");
> -  length = g_strdup_printf ("%u", bs->count);
> +  length = g_strdup_printf ("%u", count);
>    rest_proxy_call_add_param (op->call, "pagelen", length);
>    g_free (length);
>  
> @@ -430,9 +431,10 @@ grl_bliptv_source_search (GrlMediaSource *source,
>    GError *error = NULL;
>    GError *grl_error;
>    gchar *length;
> +  gint count = grl_operation_options_get_count (ss->options);
>  
>    op->source       = g_object_ref (source);
> -  op->count        = ss->count;
> +  op->count        = count;
>    op->operation_id = ss->search_id;
>    op->callback     = ss->callback;
>    op->user_data    = ss->user_data;
> @@ -443,7 +445,7 @@ grl_bliptv_source_search (GrlMediaSource *source,
>    op->call = rest_proxy_new_call (op->proxy);
>    rest_proxy_call_add_param (op->call, "skin", "rss");
>    rest_proxy_call_add_param (op->call, "search", ss->text);
> -  length = g_strdup_printf ("%u", ss->count);
> +  length = g_strdup_printf ("%u", count);
>    rest_proxy_call_add_param (op->call, "pagelen", length);
>    g_free (length);
>  


-- 
Simon Pena <spena igalia com>
Igalia - Free Software Engineering

Attachment: signature.asc
Description: OpenPGP digital signature



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