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