1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00
Sonarr/UI/Quality/qualityProfileModel.js
kay.one 663160c06a removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
2013-03-29 12:18:44 -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
}
});
});