Don't show suggestions if there aren't any. fix #2153

This commit is contained in:
Ruud committed 2013-09-22 10:47:13 +02:00
1 parent 03700e0a04
commit 2365e1859f
2 files changed
+7 -2

No files matched your search

+1 -1
View File
@@ -102,6 +102,6 @@ class Suggestion(Plugin):
if suggestions: if suggestions:
new_suggestions.extend(suggestions) new_suggestions.extend(suggestions)
self.setCache('suggestion_cached', new_suggestions, timeout = 6048000) self.setCache('suggestion_cached', new_suggestions, timeout = 3024000)
return new_suggestions return new_suggestions
@@ -58,7 +58,10 @@ var SuggestList = new Class({
var self = this; var self = this;
if(!json) return; if(!json || json.count == 0){
self.el.hide();
}
else {
Object.each(json.suggestions, function(movie){ Object.each(json.suggestions, function(movie){
@@ -107,6 +110,8 @@ var SuggestList = new Class({
}); });
}
self.fireEvent('loaded'); self.fireEvent('loaded');
}, },