[grilo-plugins] flickr: Define max size for getting hot tags list



commit 23c301d499944c065baafa4a702e17be21b1ffda
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Thu Jun 17 17:04:11 2010 +0200

    flickr: Define max size for getting hot tags list

 src/flickr/grl-flickr.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/flickr/grl-flickr.c b/src/flickr/grl-flickr.c
index d3573cb..fc2ceec 100644
--- a/src/flickr/grl-flickr.c
+++ b/src/flickr/grl-flickr.c
@@ -44,6 +44,7 @@
 #define G_LOG_DOMAIN "grl-flickr"
 
 #define SEARCH_MAX  500
+#define HOTLIST_MAX 200
 
 /* --- Plugin information --- */
 
@@ -376,11 +377,11 @@ grl_flickr_source_browse (GrlMediaSource *source,
   container_id = grl_media_get_id (bs->container);
 
   if (!container_id) {
-    /* Get hot tags list. List is limited up to 200 tags */
-    if (bs->skip >= 200) {
+    /* Get hot tags list. List is limited up to HOTLIST_MAX tags */
+    if (bs->skip >= HOTLIST_MAX) {
       bs->callback (bs->source, bs->browse_id, NULL, 0, bs->user_data, NULL);
     } else {
-      request_size = bs->skip + CLAMP (bs->count, 0, 200);
+      request_size = CLAMP (bs->skip + bs->count, 0, HOTLIST_MAX);
       g_flickr_tags_getHotList (f, request_size, gettags_cb, bs);
     }
   } else {



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