From f22b836ede03810028c73a68453c7c59c3d69c8c Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 12 Jul 2013 14:42:59 +0200 Subject: [PATCH] Combine adopt --- couchpotato/core/plugins/movie/static/search.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/plugins/movie/static/search.js b/couchpotato/core/plugins/movie/static/search.js index f013aa1a..86990f35 100644 --- a/couchpotato/core/plugins/movie/static/search.js +++ b/couchpotato/core/plugins/movie/static/search.js @@ -223,12 +223,11 @@ Block.Search.Item = new Class({ 'text': info.year }) : null ) - ).grab( + ).adopt( self.rating = info.rating && info.rating.imdb.length == 2 && parseFloat(info.rating.imdb[0]) > 0 ? new Element('span.rating', { 'text': parseFloat(info.rating.imdb[0]), 'title': parseInt(info.rating.imdb[1]) + ' votes' - }) : null - ).grab( + }) : null, self.genre = info.genres && info.genres.length > 0 ? new Element('span.genres', { 'text': info.genres.slice(0, 3).join(', ') }) : null