mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 20:42:37 +01:00
31 lines
769 B
JavaScript
31 lines
769 B
JavaScript
"use strict";
|
|
|
|
define(
|
|
[
|
|
'backbone'
|
|
], function (Backbone) {
|
|
return Backbone.Model.extend({
|
|
|
|
mutators: {
|
|
thirtyMinuteSize: function () {
|
|
var maxSize = this.get('maxSize');
|
|
|
|
if (maxSize === 0) {
|
|
return 'No Limit';
|
|
}
|
|
|
|
return (maxSize * 1024 * 1024 * 30).bytes(1);
|
|
},
|
|
sixtyMinuteSize : function () {
|
|
var maxSize = this.get('maxSize');
|
|
|
|
if (maxSize === 0) {
|
|
return 'No Limit';
|
|
}
|
|
|
|
return (maxSize * 1024 * 1024 * 60).bytes(1);
|
|
}
|
|
}
|
|
});
|
|
});
|