Browse Source

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

pull/2237/head
Ruud 12 years ago
parent
commit
2365e1859f
  1. 2
      couchpotato/core/plugins/suggestion/main.py
  2. 7
      couchpotato/core/plugins/suggestion/static/suggest.js

2
couchpotato/core/plugins/suggestion/main.py

@ -102,6 +102,6 @@ class Suggestion(Plugin):
if suggestions:
new_suggestions.extend(suggestions)
self.setCache('suggestion_cached', new_suggestions, timeout = 6048000)
self.setCache('suggestion_cached', new_suggestions, timeout = 3024000)
return new_suggestions

7
couchpotato/core/plugins/suggestion/static/suggest.js

@ -58,7 +58,10 @@ var SuggestList = new Class({
var self = this;
if(!json) return;
if(!json || json.count == 0){
self.el.hide();
}
else {
Object.each(json.suggestions, function(movie){
@ -107,6 +110,8 @@ var SuggestList = new Class({
});
}
self.fireEvent('loaded');
},

Loading…
Cancel
Save