In library check for search
This commit is contained in:
@@ -323,6 +323,13 @@ Block.Search.Item = new Class({
|
|||||||
|
|
||||||
if(!self.options.hasClass('set')){
|
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(
|
self.options.adopt(
|
||||||
new Element('div').adopt(
|
new Element('div').adopt(
|
||||||
self.info.images && self.info.images.poster.length > 0 ? new Element('img.thumbnail', {
|
self.info.images && self.info.images.poster.length > 0 ? new Element('img.thumbnail', {
|
||||||
@@ -330,8 +337,8 @@ Block.Search.Item = new Class({
|
|||||||
}) : null,
|
}) : null,
|
||||||
self.info.in_wanted ? new Element('span.in_wanted', {
|
self.info.in_wanted ? new Element('span.in_wanted', {
|
||||||
'text': 'Already in wanted list: ' + self.info.in_wanted.profile.label
|
'text': 'Already in wanted list: ' + self.info.in_wanted.profile.label
|
||||||
}) : (self.info.in_library ? new Element('span.in_library', {
|
}) : (in_library ? new Element('span.in_library', {
|
||||||
'text': 'Already in library: ' + self.info.in_library.profile.label
|
'text': 'Already in library: ' + in_library.join(', ')
|
||||||
}) : null),
|
}) : null),
|
||||||
self.title_select = new Element('select', {
|
self.title_select = new Element('select', {
|
||||||
'name': 'title'
|
'name': 'title'
|
||||||
|
|||||||
Reference in New Issue
Block a user