1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-26 17:57:43 +00:00
Sonarr/UI/Quality/qualityProfileModel.js
2013-03-29 16:28:58 -07:00

22 lines
562 B
JavaScript

define(['app'], function () {
NzbDrone.Quality.QualityProfileModel = Backbone.Model.extend({
mutators: {
allowed: function () {
return _.where(this.get('qualities'), { allowed: true });
},
cutoffName: function () {
return _.findWhere(this.get('qualities'), { id: this.get('cutoff') }).name;
}
},
defaults: {
id : null,
name : '',
//'qualities.allowed': false,
cutoff: null
}
});
});