1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00
Radarr/NzbDrone.Backbone/Quality/qualityProfileModel.js
2013-03-13 17:26:30 -07:00

23 lines
554 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
}
});
});