Return active profiles
This commit is contained in:
@@ -303,7 +303,7 @@ Block.Search.Item = new Class({
|
||||
}).inject(self.title_select)
|
||||
})
|
||||
|
||||
Object.each(Quality.profiles, function(profile){
|
||||
Object.each(Quality.getActiveProfiles(), function(profile){
|
||||
new Element('option', {
|
||||
'value': profile.id ? profile.id : profile.data.id,
|
||||
'text': profile.label ? profile.label : profile.data.label
|
||||
|
||||
@@ -19,6 +19,13 @@ var QualityBase = new Class({
|
||||
return this.profiles[id]
|
||||
},
|
||||
|
||||
// Hide items when getting profiles
|
||||
getActiveProfiles: function(){
|
||||
return Object.filter(this.profiles, function(profile){
|
||||
return !profile.data.hide
|
||||
});
|
||||
},
|
||||
|
||||
getQuality: function(id){
|
||||
return this.qualities.filter(function(q){
|
||||
return q.id == id;
|
||||
|
||||
@@ -78,7 +78,7 @@ MovieActions.Wanted = {
|
||||
}).inject(self.title_select);
|
||||
});
|
||||
|
||||
Object.each(Quality.profiles, function(profile){
|
||||
Object.each(Quality.getActiveProfiles(), function(profile){
|
||||
new Element('option', {
|
||||
'value': profile.id ? profile.id : profile.data.id,
|
||||
'text': profile.label ? profile.label : profile.data.label
|
||||
|
||||
Reference in New Issue
Block a user