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: {
|
2013-03-29 23:28:58 +00:00
|
|
|
|
allowed: function () {
|
2013-03-08 03:11:42 +00:00
|
|
|
|
return _.where(this.get('qualities'), { allowed: true });
|
|
|
|
|
},
|
2013-02-14 02:28:56 +00:00
|
|
|
|
|
2013-03-29 23:28:58 +00:00
|
|
|
|
cutoffName: function () {
|
2013-03-08 03:11:42 +00:00
|
|
|
|
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-29 23:28:58 +00:00
|
|
|
|
id : null,
|
|
|
|
|
name : '',
|
2013-03-14 00:26:30 +00:00
|
|
|
|
//'qualities.allowed': false,
|
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
|
|
|
|
|