diff --git a/modules/torrents/server/controllers/completes.server.controller.js b/modules/torrents/server/controllers/completes.server.controller.js
index 700b06bc..0da43f24 100644
--- a/modules/torrents/server/controllers/completes.server.controller.js
+++ b/modules/torrents/server/controllers/completes.server.controller.js
@@ -71,8 +71,12 @@ exports.removeWarning = function (req, res) {
message: 'SERVER.SCORE_NOT_ENOUGH'
});
} else {
- //update score
- scoreUpdate(req, req.user, scoreConfig.action.scoreToRemoveWarning, -(hnrConfig.scoreToRemoveWarning));
+ //score update
+ var act = scoreConfig.action.scoreToRemoveWarning;
+ act.params = {
+ tid: comp.torrent
+ };
+ scoreUpdate(req, req.user, act, -(hnrConfig.scoreToRemoveWarning));
comp.hnr_warning = false;
comp.remove_warning_at = Date.now();
diff --git a/modules/torrents/server/controllers/subtitles.server.controller.js b/modules/torrents/server/controllers/subtitles.server.controller.js
index 146965e0..4fee30b7 100644
--- a/modules/torrents/server/controllers/subtitles.server.controller.js
+++ b/modules/torrents/server/controllers/subtitles.server.controller.js
@@ -71,7 +71,7 @@ exports.create = function (req, res) {
} else {
Torrent.populate(torrent._subtitles, {
path: 'user',
- select: 'displayName profileImageURL uploaded downloaded'
+ select: 'username displayName profileImageURL isVip score uploaded downloaded'
}, function (err, t) {
if (err) {
return res.status(422).send({
@@ -80,7 +80,12 @@ exports.create = function (req, res) {
} else {
res.status(200).send(torrent);
- scoreUpdate(req, req.user, scoreConfig.action.uploadSubtitle);
+ //score update
+ var act = scoreConfig.action.uploadSubtitle;
+ act.params = {
+ tid: torrent._id
+ };
+ scoreUpdate(req, req.user, act);
//add server message
if (serverNoticeConfig.action.torrentSubtitleNew.enable && !torrent.user._id.equals(req.user._id)) {
@@ -158,7 +163,12 @@ exports.delete = function (req, res) {
res.json(torrent);
- scoreUpdate(req, torrent.user, scoreConfig.action.uploadSubtitleBeDeleted);
+ //score update
+ var act = scoreConfig.action.uploadSubtitleBeDeleted;
+ act.params = {
+ tid: torrent._id
+ };
+ scoreUpdate(req, r.user, act);
//add server message
if (serverNoticeConfig.action.torrentSubtitleDeleted.enable) {
diff --git a/modules/torrents/server/controllers/torrents.server.controller.js b/modules/torrents/server/controllers/torrents.server.controller.js
index 814a1ad8..735b631b 100644
--- a/modules/torrents/server/controllers/torrents.server.controller.js
+++ b/modules/torrents/server/controllers/torrents.server.controller.js
@@ -749,6 +749,11 @@ exports.create = function (req, res) {
$inc: {uptotal: 1}
}).exec();
//update maker torrent count
+ var act = scoreConfig.action.uploadTorrent;
+ act.params = {
+ tid: torrent._id
+ };
+
if (torrent.maker) {
Maker.update({_id: torrent.maker}, {
$inc: {torrent_count: 1}
@@ -762,7 +767,7 @@ exports.create = function (req, res) {
if (!err && m) {
torrent.update({torrent_status: 'reviewed'}).exec();
announceTorrentToIRC(torrent, req);
- scoreUpdate(req, req.user, scoreConfig.action.uploadTorrent);
+ scoreUpdate(req, req.user, act);
}
});
} else {
@@ -770,7 +775,7 @@ exports.create = function (req, res) {
if (req.user.upload_access === 'pass') {
torrent.update({torrent_status: 'reviewed'}).exec();
announceTorrentToIRC(torrent, req);
- scoreUpdate(req, req.user, scoreConfig.action.uploadTorrent);
+ scoreUpdate(req, req.user, act);
}
}
@@ -1151,9 +1156,15 @@ exports.thumbsUp = function (req, res) {
} else {
if (req.user.score >= thumb.score) {
torrent._thumbs.push(thumb);
- scoreUpdate(req, torrent.user, scoreConfig.action.thumbsUpScoreOfTorrentTo);
save();
+ //score update
+ var act = scoreConfig.action.thumbsUpScoreOfTorrentTo;
+ act.params = {
+ tid: torrent._id
+ };
+ scoreUpdate(req, torrent.user, act);
+
//add server message
if (serverNoticeConfig.action.torrentThumbsUp.enable) {
serverMessage.addMessage(torrent.user._id, serverNoticeConfig.action.torrentThumbsUp.title, serverNoticeConfig.action.torrentThumbsUp.content, {
@@ -1181,7 +1192,12 @@ exports.thumbsUp = function (req, res) {
}
});
- scoreUpdate(req, user, scoreConfig.action.thumbsUpScoreOfTorrentFrom);
+ //score update
+ var act = scoreConfig.action.thumbsUpScoreOfTorrentFrom;
+ act.params = {
+ tid: torrent._id
+ };
+ scoreUpdate(req, user, act);
}
};
@@ -1299,7 +1315,13 @@ exports.setRecommendLevel = function (req, res) {
} else {
res.json(torrent);
- scoreUpdate(req, torrent.user, scoreConfig.action.uploadTorrentBeRecommend);
+ if (torrent.torrent_recommended !== 'level0') {
+ var act = scoreConfig.action.uploadTorrentBeRecommend;
+ act.params = {
+ tid: torrent._id
+ };
+ scoreUpdate(req, torrent.user, act);
+ }
//create trace log
traceLogCreate(req, traceConfig.action.adminTorrentSetRecommendLevel, {
@@ -1362,7 +1384,11 @@ exports.setReviewedStatus = function (req, res) {
res.json(torrent);
announceTorrentToIRC(torrent, req);
- scoreUpdate(req, torrent.user, scoreConfig.action.uploadTorrent);
+ var act = scoreConfig.action.uploadTorrent;
+ act.params = {
+ tid: torrent._id
+ };
+ scoreUpdate(req, torrent.user, act);
//add server message
if (serverNoticeConfig.action.torrentReviewed.enable) {
@@ -1496,7 +1522,11 @@ exports.delete = function (req, res) {
//only update score when torrent status is reviewed
if (torrent.torrent_status === 'reviewed') {
- scoreUpdate(req, torrent.user, scoreConfig.action.uploadTorrentBeDeleted);
+ var act = scoreConfig.action.uploadTorrentBeDeleted;
+ act.params = {
+ tid: torrent._id
+ };
+ scoreUpdate(req, torrent.user, act);
}
//create trace log
diff --git a/modules/users/server/controllers/admin.server.controller.js b/modules/users/server/controllers/admin.server.controller.js
index 195928af..7616dd18 100644
--- a/modules/users/server/controllers/admin.server.controller.js
+++ b/modules/users/server/controllers/admin.server.controller.js
@@ -327,7 +327,11 @@ exports.updateUserScore = function (req, res) {
score: sv,
reason: {
event: scoreConfig.action.adminModify.name,
- params: undefined
+ event_str: scoreConfig.action.adminModify.content,
+ params: {
+ uid: req.user._id,
+ uname: req.user.displayName
+ }
}
});
sl.save(function (err) {