2013-02-14 03:28:56 +01:00
|
|
|
|
define(['app'], function () {
|
|
|
|
|
NzbDrone.Quality.QualityProfileModel = Backbone.Model.extend({
|
|
|
|
|
|
2013-03-08 04:11:42 +01:00
|
|
|
|
mutators: {
|
|
|
|
|
allowed: function() {
|
|
|
|
|
return _.where(this.get('qualities'), { allowed: true });
|
|
|
|
|
},
|
2013-02-14 03:28:56 +01:00
|
|
|
|
|
2013-03-08 04:11:42 +01:00
|
|
|
|
cutoffName: function() {
|
|
|
|
|
return _.findWhere(this.get('qualities'), { id: this.get('cutoff') }).name;
|
2013-01-27 04:04:15 +01:00
|
|
|
|
}
|
2013-02-14 03:28:56 +01:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
defaults: {
|
2013-03-08 04:11:42 +01:00
|
|
|
|
id: null,
|
|
|
|
|
name: '',
|
2013-03-14 01:26:30 +01:00
|
|
|
|
//'qualities.allowed': false,
|
2013-03-08 04:11:42 +01:00
|
|
|
|
cutoff: null
|
2013-02-14 03:28:56 +01:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
2013-01-27 04:04:15 +01:00
|
|
|
|
|