Browse files

ui_template:render_front: show popular_downloads, not recent

  • Loading branch information...
1 parent 925c313 commit b17bae9ba6948c828c9528c65b29e0478618efb3 @astro committed Jun 14, 2012
Showing with 3 additions and 4 deletions.
  1. +0 −1 apps/model/src/model_enclosures.erl
  2. +3 −3 apps/ui/src/ui_template.erl
View
1 apps/model/src/model_enclosures.erl
@@ -61,7 +61,6 @@ popular_downloads(Limit, peers) ->
query_downloads("get_popular_downloads($1)", [Limit]);
popular_downloads(Limit, Period) when is_integer(Period) ->
- io:format("popular_downloads ~p ~p~n", [Limit, Period]),
query_downloads("get_most_downloaded($1, $2)", [Limit, Period]);
popular_downloads(Limit, all) ->
%% get_popular_downloads() will select "downloaded"
View
6 apps/ui/src/ui_template.erl
@@ -921,8 +921,8 @@ render_help(_Req, _) ->
throw({http, 404}).
render_front(Req) ->
- {ok, RecentDownloads} =
- model_enclosures:recent_downloads(4),
+ {ok, PopularDownloads} =
+ model_enclosures:popular_downloads(4, 1),
Opts = #render_opts{title = <<"Bitlove: Peer-to-Peer Love for Your Podcast Downloads">>,
publisher = true,
@@ -971,7 +971,7 @@ render_front(Req) ->
]}
}
],
- {'div', render_downloads(Opts, RecentDownloads)}
+ {'div', render_downloads(Opts, PopularDownloads)}
).
render_new(Req) ->

0 comments on commit b17bae9

Please sign in to comment.