Add server-side notifications

This commit is contained in:
John Furrow
2016-09-20 20:42:15 -07:00
parent 5d52f20b3e
commit 84bc57fd32
7 changed files with 159 additions and 0 deletions
+3
View File
@@ -9,6 +9,7 @@ let ClientRequest = require('./ClientRequest');
let formatUtil = require('../../shared/util/formatUtil');
let scgi = require('../util/scgi');
let Torrent = require('./Torrent');
let NotificationCollection = require('./NotificationCollection');
let TorrentCollection = require('./TorrentCollection');
let torrentFilePropsMap = require('../../shared/constants/torrentFilePropsMap');
let torrentGeneralPropsMap = require('../../shared/constants/torrentGeneralPropsMap');
@@ -199,6 +200,8 @@ var client = {
tagCount = torrentCollection.getTagCount();
trackerCount = torrentCollection.getTrackerCount();
NotificationCollection.addNotification({id: 'torrent-list-update', message: 'Torrent List Updated'});
return torrentCollection.getTorrents();
});
request.onComplete(callback);