Browse Source

Return active profiles

pull/51/merge
Ruud 14 years ago
parent
commit
5489215ffe
  1. 2
      couchpotato/core/plugins/movie/static/search.js
  2. 7
      couchpotato/core/plugins/quality/static/quality.js
  3. 2
      couchpotato/static/scripts/page/wanted.js

2
couchpotato/core/plugins/movie/static/search.js

@ -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

7
couchpotato/core/plugins/quality/static/quality.js

@ -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;

2
couchpotato/static/scripts/page/wanted.js

@ -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

Loading…
Cancel
Save