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