From 62dca5b0046fbe79bf5a6bf7976e8604325b7b4c Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 30 Apr 2012 17:24:05 +0200 Subject: [PATCH] In library check for search --- couchpotato/core/plugins/movie/static/search.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/movie/static/search.js b/couchpotato/core/plugins/movie/static/search.js index d668a687..438ba9aa 100644 --- a/couchpotato/core/plugins/movie/static/search.js +++ b/couchpotato/core/plugins/movie/static/search.js @@ -322,6 +322,13 @@ Block.Search.Item = new Class({ var self = this; if(!self.options.hasClass('set')){ + + if(self.info.in_library){ + var in_library = []; + self.info.in_library.releases.each(function(release){ + in_library.include(release.quality.label) + }); + } self.options.adopt( new Element('div').adopt( @@ -330,8 +337,8 @@ Block.Search.Item = new Class({ }) : null, self.info.in_wanted ? new Element('span.in_wanted', { 'text': 'Already in wanted list: ' + self.info.in_wanted.profile.label - }) : (self.info.in_library ? new Element('span.in_library', { - 'text': 'Already in library: ' + self.info.in_library.profile.label + }) : (in_library ? new Element('span.in_library', { + 'text': 'Already in library: ' + in_library.join(', ') }) : null), self.title_select = new Element('select', { 'name': 'title'