mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 04:21:27 +02:00
Activity instead of History
New: Renamed history to activity New: Queue is default tab of activity
This commit is contained in:
31
src/UI/Activity/Queue/QueueCollection.js
Normal file
31
src/UI/Activity/Queue/QueueCollection.js
Normal file
@@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'underscore',
|
||||
'backbone',
|
||||
'backbone.pageable',
|
||||
'Activity/Queue/QueueModel',
|
||||
'Mixins/backbone.signalr.mixin'
|
||||
], function (_, Backbone, PageableCollection, QueueModel) {
|
||||
var QueueCollection = PageableCollection.extend({
|
||||
url : window.NzbDrone.ApiRoot + '/queue',
|
||||
model: QueueModel,
|
||||
|
||||
state: {
|
||||
pageSize: 15
|
||||
},
|
||||
|
||||
mode: 'client',
|
||||
|
||||
findEpisode: function (episodeId) {
|
||||
return _.find(this.fullCollection.models, function (queueModel) {
|
||||
return queueModel.get('episode').id === episodeId;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var collection = new QueueCollection().bindSignalR();
|
||||
collection.fetch();
|
||||
|
||||
return collection;
|
||||
});
|
Reference in New Issue
Block a user