mirror of
https://github.com/Radarr/Radarr
synced 2026-02-22 22:54:26 +01:00
Calendar/Upcoming now update on grab/download events Better use of backbone collection on calendar New: Calendar will auto refresh when episodes are grabbed and downloaded
24 lines
677 B
JavaScript
24 lines
677 B
JavaScript
'use strict';
|
||
|
||
define(
|
||
[
|
||
'marionette',
|
||
'Calendar/UpcomingCollection',
|
||
'Calendar/UpcomingItemView',
|
||
'Mixins/backbone.signalr.mixin'
|
||
], function (Marionette, UpcomingCollection, UpcomingItemView) {
|
||
return Marionette.CollectionView.extend({
|
||
itemView: UpcomingItemView,
|
||
|
||
initialize: function () {
|
||
this.collection = new UpcomingCollection().bindSignalR();
|
||
this.collection.fetch();
|
||
|
||
this.listenTo(this.collection, 'change', this._refresh);
|
||
},
|
||
|
||
_refresh: function () {
|
||
this.render();
|
||
}
|
||
});
|
||
});
|