mirror of
https://github.com/Radarr/Radarr
synced 2025-12-26 10:12:42 +01:00
28 lines
833 B
JavaScript
28 lines
833 B
JavaScript
var Backbone = require('backbone');
|
|
var IndexerModel = require('./CustomFormatModel');
|
|
|
|
var vent = require('vent');
|
|
|
|
module.exports = Backbone.Collection.extend({
|
|
model : IndexerModel,
|
|
url : window.NzbDrone.ApiRoot + '/customformat',
|
|
|
|
sync : function(method, model, options) {
|
|
vent.trigger(vent.Events.CustomFormatsChanged, {method : method});
|
|
|
|
Backbone.Collection.prototype.sync.apply(this, arguments);
|
|
},
|
|
|
|
add : function(model, options) {
|
|
vent.trigger(vent.Events.CustomFormatsChanged, {options : options});
|
|
|
|
Backbone.Collection.prototype.add.apply(this, arguments);
|
|
},
|
|
|
|
remove : function(model, options) {
|
|
vent.trigger(vent.Events.CustomFormatsChanged, {options : options});
|
|
|
|
Backbone.Collection.prototype.remove.apply(this, arguments);
|
|
}
|
|
});
|
|
|