1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 17:47:08 +00:00
Lidarr/UI/Quality/qualityProfileModel.js
2013-05-02 16:10:30 -07:00

23 lines
576 B
JavaScript

"use strict";
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
}
});
});