diff --git a/couchpotato/core/plugins/movie/static/search.css b/couchpotato/core/plugins/movie/static/search.css index 59750088..82fd13cc 100644 --- a/couchpotato/core/plugins/movie/static/search.css +++ b/couchpotato/core/plugins/movie/static/search.css @@ -45,7 +45,7 @@ border-radius: 0; display: block; border: 0; - background: rgba(255,255,255,.08); + background: none; color: #FFF; font-size: 25px; height: 100%; @@ -105,7 +105,7 @@ background: #5c697b; margin: 4px 0 0; width: 470px; - min-height: 140px; + min-height: 50px; box-shadow: 0 20px 20px -10px rgba(0,0,0,0.55); display: none; } diff --git a/couchpotato/core/plugins/movie/static/search.js b/couchpotato/core/plugins/movie/static/search.js index c61b1624..8fa4fb0c 100644 --- a/couchpotato/core/plugins/movie/static/search.js +++ b/couchpotato/core/plugins/movie/static/search.js @@ -98,6 +98,9 @@ Block.Search = new Class({ self.el[self.q() ? 'addClass' : 'removeClass']('filled') if(self.q() != self.last_q){ + if(self.api_request && self.api_request.isRunning()) + self.api_request.cancel(); + if(self.autocomplete_timer) clearTimeout(self.autocomplete_timer) self.autocomplete_timer = self.autocomplete.delay(300, self) } @@ -116,12 +119,9 @@ Block.Search = new Class({ }, list: function(){ - var self = this; - - if(self.api_request && self.api_request.running) return - - var q = self.q(); - var cache = self.cache[q]; + var self = this, + q = self.q(), + cache = self.cache[q]; self.hideResults(false); @@ -164,9 +164,6 @@ Block.Search = new Class({ }); - if(q != self.q()) - self.list() - // Calculate result heights var w = window.getSize(), rc = self.result_container.getCoordinates();