mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-07 06:25:39 +02:00
fix(core): remove all code for public mode, meanTorrent support private mode only now
This commit is contained in:
@@ -255,13 +255,10 @@ such as:
|
||||
announcePrefix: '[mean.im].',
|
||||
admin: 'admin@mean.im',
|
||||
baseUrl: 'http://mean.im',
|
||||
clientBlackListUrl: '/about/black',
|
||||
privateTorrentCmsMode: true
|
||||
clientBlackListUrl: '/about/black'
|
||||
},
|
||||
```
|
||||
meanTorrent tracker is private, please set the `announce.url` to your server url, then when user to upload torrent file, It will autocheck the torrent announce url whether matching as `announce.url`.
|
||||
But, meanTorrent support public tracker torrents CMS mode with `privateTorrentCmsMode` set to `false`, in `public` mode, user can upload and download public tracker torrent files, but these torrent files is can not
|
||||
used by meanTorrent tracker server.
|
||||
|
||||
```javascript
|
||||
tmdbConfig: {
|
||||
|
||||
27
config/env/torrents.js
vendored
27
config/env/torrents.js
vendored
@@ -71,9 +71,6 @@ module.exports = {
|
||||
* @announcePrefix: prefix of torrent file name, is will auto add when user download the torrent files
|
||||
* @admin: site admin mail address
|
||||
* @clientBlackListUrl: forbidden download client list url, user can view this list to check forbidden client software
|
||||
* @privateTorrentCmsMode: meanTorrent default tracker server mode is private (value true), the tracker server only accept private mode.
|
||||
* but, you can set this value to false to make a public torrent cms web site without tracker server and announce function.
|
||||
* if this value is false(public mode), server can scrape all torrent status from owner tracker server
|
||||
* @downloadCheck: announce download(leech) settings
|
||||
* @ratio: if less than this value, can not download(leech)
|
||||
* @checkAfterSignupDays: all users download check start {value} days after signup, so the newest register user has {value} days to upgrade his ratio value,
|
||||
@@ -96,7 +93,6 @@ module.exports = {
|
||||
announcePrefix: '{' + commonEnvConfig.variable.site.site_namekey + '}.',
|
||||
admin: commonEnvConfig.variable.site.site_admin_mail,
|
||||
clientBlackListUrl: '/about/black',
|
||||
privateTorrentCmsMode: true,
|
||||
downloadCheck: {
|
||||
ratio: 1,
|
||||
checkAfterSignupDays: 30
|
||||
@@ -141,29 +137,6 @@ module.exports = {
|
||||
image_url: '/modules/core/client/img/rss.jpeg'
|
||||
},
|
||||
|
||||
/**
|
||||
* @scrapeTorrentsStatus
|
||||
*
|
||||
* This option used only when public cms mode (announce.privateTorrentCmsMode = false),
|
||||
* This defines the timing of scrape torrent status from other tracker server
|
||||
* NOTE: you can change these value at anytime if you understand it
|
||||
*
|
||||
* @scrapeInterval: scrape interval with torrent last_scrape, Avoid frequent scrape, unit in hours
|
||||
* @onTorrentUpload: scrape status at server side when the torrent uploaded by a user (= init the status info)
|
||||
* @onTorrentInHome: scrape each torrent status at client side when load into home page (= update the status info)
|
||||
* @onTorrentInList: scrape each torrent status at client side when load into torrent list page (= update the status info)
|
||||
* if too more items list in one page, this will make efficiency very low
|
||||
* @onTorrentInDetail: scrape current torrent status at client side when load torrent detail info,
|
||||
* if onTorrentInHome and onTorrentInList is true, this value recommend to false
|
||||
*/
|
||||
scrapeTorrentStatus: {
|
||||
scrapeInterval: 2,
|
||||
onTorrentUpload: true,
|
||||
onTorrentInHome: true,
|
||||
onTorrentInList: true,
|
||||
onTorrentInDetail: false
|
||||
},
|
||||
|
||||
/**
|
||||
* @ircAnnounce
|
||||
*
|
||||
|
||||
@@ -1,229 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path'),
|
||||
bencoding = require('bencoding'),
|
||||
common = require(path.resolve('./config/lib/common')),
|
||||
request = require('request'),
|
||||
dgram = require('dgram'),
|
||||
URL = require('url');
|
||||
|
||||
/**
|
||||
* doScrape
|
||||
* @param t - torrent object
|
||||
*/
|
||||
module.exports.doScrape = function (t, cb) {
|
||||
var scrapeInfo = [];
|
||||
var regex = new RegExp('announce', 'g');
|
||||
console.log('torrent_announce = ' + t.torrent_announce);
|
||||
console.log('info_hash = ' + t.info_hash);
|
||||
|
||||
var url = URL.parse(t.torrent_announce);
|
||||
var protocol = url.protocol;
|
||||
var hostname = url.hostname;
|
||||
var port = url.port;
|
||||
var path = url.pathname;
|
||||
var npath = '';
|
||||
var info_hash = escape(common.hexToBinary(t.info_hash));
|
||||
|
||||
var i = path.indexOf('announce');
|
||||
if (i >= 0) {
|
||||
var j = path.indexOf('/', i);
|
||||
if (j >= 0) {
|
||||
path = path.slice(0, j);
|
||||
}
|
||||
npath = path.replace(regex, 'scrape');
|
||||
} else {
|
||||
npath = '/scrape';
|
||||
}
|
||||
|
||||
var scrapeUrl = protocol + '//' + hostname;
|
||||
scrapeUrl += port ? ':' + port : '';
|
||||
scrapeUrl += npath;
|
||||
|
||||
scrapeUrl += '?info_hash=' + info_hash;
|
||||
console.log('-= scrape =- ' + scrapeUrl);
|
||||
|
||||
if (scrapeUrl.toUpperCase().startsWith('HTTP')) {
|
||||
doHTTPScrape();
|
||||
} else {
|
||||
doUDPScrape();
|
||||
}
|
||||
|
||||
/**
|
||||
* doHTTPScrape
|
||||
*/
|
||||
function doHTTPScrape() {
|
||||
request(scrapeUrl, {encoding: null}, function (error, response, body) {
|
||||
//console.log('error:', error);
|
||||
//console.log('statusCode:', response && response.statusCode);
|
||||
//console.log('body:', body);
|
||||
if (error) {
|
||||
//console.log('-= scrape error =- ' + scrapeUrl);
|
||||
if (cb) cb(error, null);
|
||||
} else if (response) {
|
||||
if (response.statusCode === 200) {
|
||||
var data = new Buffer(body);
|
||||
var result = bencoding.decode(data);
|
||||
|
||||
//console.log(result);
|
||||
//console.log(result.toJSON());
|
||||
//console.log(result.vals[0]);
|
||||
result.keys.forEach(function (k1, idx1) {
|
||||
//console.log(k1.toString('utf8').toUpperCase() + ' - ' + idx1 + ' - ' + result.vals[idx1]);
|
||||
if (k1.toString('utf8').toUpperCase() === 'FAILURE REASON') {
|
||||
//console.log('-= scrape error =- ' + result.vals[idx1].toString('utf8'));
|
||||
if (cb) cb(result.vals[idx1].toString('utf8'), null);
|
||||
} else if (k1.toString('utf8').toUpperCase() === 'FILES') {
|
||||
var val = result.vals[idx1];
|
||||
val.keys.forEach(function (k2, idx2) {
|
||||
//console.log(k2.toString('hex'));
|
||||
//console.log(val.vals[idx2].toJSON());
|
||||
|
||||
scrapeInfo.push({
|
||||
info_hash: k2.toString('hex'),
|
||||
data: val.vals[idx2].toJSON()
|
||||
});
|
||||
});
|
||||
//console.log(scrapeInfo);
|
||||
if (scrapeInfo.length > 0) {
|
||||
scrapeInfo.forEach(function (s) {
|
||||
console.log(s);
|
||||
if (s.info_hash === t.info_hash) {
|
||||
t.update({
|
||||
torrent_seeds: s.data.complete,
|
||||
torrent_finished: s.data.downloaded,
|
||||
torrent_leechers: s.data.incomplete
|
||||
}).exec();
|
||||
}
|
||||
});
|
||||
if (cb) cb(null, scrapeInfo);
|
||||
} else {
|
||||
if (cb) cb('422 result is empty', null);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (response.statusCode === 403) {
|
||||
if (cb) cb('403 Forbidden', null);
|
||||
}
|
||||
}
|
||||
|
||||
//update torrent last scrape time
|
||||
t.update({
|
||||
last_scrape: Date.now()
|
||||
}).exec();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* doUDPScrape
|
||||
*/
|
||||
function doUDPScrape() {
|
||||
var server = dgram.createSocket('udp4');
|
||||
var connectionIdHigh = 0x417;
|
||||
var connectionIdLow = 0x27101980;
|
||||
var transactionId = Math.floor((Math.random() * 100000) + 1);
|
||||
var action;
|
||||
|
||||
var ACTION_CONNECT = 0;
|
||||
var ACTION_ANNOUNCE = 1;
|
||||
var ACTION_SCRAPE = 2;
|
||||
var ACTION_ERROR = 3;
|
||||
|
||||
//server.on('listening', function () {
|
||||
// var address = server.address();
|
||||
// console.log('server listening ' + address.address + ':' + address.port);
|
||||
//});
|
||||
|
||||
server.on('message', function (msg, rinfo) {
|
||||
var buf = new Buffer(msg);
|
||||
|
||||
//console.log(rinfo);
|
||||
action = buf.readUInt32BE(0, 4);
|
||||
transactionId = buf.readUInt32BE(4, 4);
|
||||
//console.log('returned action: ' + action);
|
||||
//console.log('returned transactionId: ' + transactionId);
|
||||
|
||||
if (action === ACTION_CONNECT) {
|
||||
//console.log('connect response');
|
||||
connectionIdHigh = buf.readUInt32BE(8, 4);
|
||||
connectionIdLow = buf.readUInt32BE(12, 4);
|
||||
scrapeTorrent();
|
||||
} else if (action === ACTION_SCRAPE) {
|
||||
//console.log('scrape response');
|
||||
var _info = {};
|
||||
_info.complete = buf.readUInt32BE(8, 4);
|
||||
_info.downloaded = buf.readUInt32BE(12, 4);
|
||||
_info.incomplete = buf.readUInt32BE(16, 4);
|
||||
|
||||
scrapeInfo.push({
|
||||
info_hash: t.info_hash,
|
||||
data: _info
|
||||
});
|
||||
//console.log(scrapeInfo);
|
||||
if (scrapeInfo.length > 0) {
|
||||
scrapeInfo.forEach(function (s) {
|
||||
console.log(s);
|
||||
if (s.info_hash === t.info_hash) {
|
||||
t.update({
|
||||
torrent_seeds: s.data.complete,
|
||||
torrent_finished: s.data.downloaded,
|
||||
torrent_leechers: s.data.incomplete
|
||||
}).exec();
|
||||
}
|
||||
});
|
||||
if (cb) cb(null, scrapeInfo);
|
||||
} else {
|
||||
if (cb) cb('422 result is empty', null);
|
||||
}
|
||||
} else if (action === ACTION_ERROR) {
|
||||
//console.log('error response');
|
||||
if (cb) cb('ACTION_ERROR', null);
|
||||
}
|
||||
});
|
||||
|
||||
server.bind();
|
||||
startConnection();
|
||||
|
||||
//update torrent last scrape time
|
||||
t.update({
|
||||
last_scrape: Date.now()
|
||||
}).exec();
|
||||
|
||||
function startConnection() {
|
||||
var buf = new Buffer(16);
|
||||
|
||||
buf.fill(0);
|
||||
|
||||
buf.writeUInt32BE(connectionIdHigh, 0);
|
||||
buf.writeUInt32BE(connectionIdLow, 4);
|
||||
buf.writeUInt32BE(ACTION_CONNECT, 8);
|
||||
buf.writeUInt32BE(transactionId, 12);
|
||||
|
||||
sendPacket(buf);
|
||||
}
|
||||
|
||||
function sendPacket(buf) {
|
||||
server.send(buf, 0, buf.length, port, hostname, function (err, bytes) {
|
||||
if (err) {
|
||||
//console.log(err.message);
|
||||
if (cb) cb(err, null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function scrapeTorrent() {
|
||||
var buf = new Buffer(36);
|
||||
|
||||
buf.fill(0);
|
||||
|
||||
buf.writeUInt32BE(connectionIdHigh, 0);
|
||||
buf.writeUInt32BE(connectionIdLow, 4);
|
||||
buf.writeUInt32BE(ACTION_SCRAPE, 8);
|
||||
buf.writeUInt32BE(transactionId, 12);
|
||||
buf.write(info_hash, 16, buf.length, 'hex');
|
||||
|
||||
// do scrape
|
||||
sendPacket(buf);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -383,7 +383,6 @@
|
||||
ADMIN_BASIC_REVIEWED: 'Review',
|
||||
ADMIN_BASIC_UPDATE: 'Update torrent info from TMDB',
|
||||
ADMIN_BASIC_DELETE: 'Delete torrent',
|
||||
ADMIN_BASIC_SCRAPE: 'Scrape torrent status',
|
||||
ADMIN_BASIC_SET_HNR: 'SetHnR',
|
||||
ADMIN_BASIC_UNSET_HNR: 'UnsetHnR',
|
||||
ADMIN_BASIC_SET_VIP: 'SetVIP',
|
||||
|
||||
@@ -383,7 +383,6 @@
|
||||
ADMIN_BASIC_REVIEWED: '通过审核',
|
||||
ADMIN_BASIC_UPDATE: '从 TMDB 更新电影信息',
|
||||
ADMIN_BASIC_DELETE: '删除种子',
|
||||
ADMIN_BASIC_SCRAPE: '刮削种子状态',
|
||||
ADMIN_BASIC_SET_HNR: '设置HnR',
|
||||
ADMIN_BASIC_UNSET_HNR: '取消HnR',
|
||||
ADMIN_BASIC_SET_VIP: '设置VIP',
|
||||
|
||||
@@ -6,18 +6,17 @@
|
||||
.controller('HomeTorrentsController', HomeTorrentsController);
|
||||
|
||||
HomeTorrentsController.$inject = ['$scope', '$state', '$translate', 'Authentication', 'TorrentsService', 'Notification', 'MeanTorrentConfig',
|
||||
'getStorageLangService', 'DownloadService', '$timeout', 'localStorageService', 'ScrapeService', 'TorrentGetInfoServices', 'DebugConsoleService',
|
||||
'getStorageLangService', 'DownloadService', '$timeout', 'localStorageService', 'TorrentGetInfoServices', 'DebugConsoleService',
|
||||
'marked'];
|
||||
|
||||
function HomeTorrentsController($scope, $state, $translate, Authentication, TorrentsService, Notification, MeanTorrentConfig, getStorageLangService,
|
||||
DownloadService, $timeout, localStorageService, ScrapeService, TorrentGetInfoServices, mtDebug,
|
||||
DownloadService, $timeout, localStorageService, TorrentGetInfoServices, mtDebug,
|
||||
marked) {
|
||||
var vm = this;
|
||||
vm.DLS = DownloadService;
|
||||
vm.TGI = TorrentGetInfoServices;
|
||||
vm.tmdbConfig = MeanTorrentConfig.meanTorrentConfig.tmdbConfig;
|
||||
vm.appConfig = MeanTorrentConfig.meanTorrentConfig.app;
|
||||
vm.scrapeConfig = MeanTorrentConfig.meanTorrentConfig.scrapeTorrentStatus;
|
||||
vm.announce = MeanTorrentConfig.meanTorrentConfig.announce;
|
||||
vm.torrentType = MeanTorrentConfig.meanTorrentConfig.torrentType;
|
||||
vm.itemsPerPageConfig = MeanTorrentConfig.meanTorrentConfig.itemsPerPage;
|
||||
@@ -158,11 +157,6 @@
|
||||
vm.movieTopList = items.rows;
|
||||
|
||||
vm.initTopOneMovieInfo();
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.movieTopOne);
|
||||
ScrapeService.scrapeTorrent(vm.movieTopList);
|
||||
}
|
||||
}
|
||||
}, function (err) {
|
||||
Notification.error({
|
||||
@@ -179,10 +173,6 @@
|
||||
}, function (items) {
|
||||
if (items.rows.length > 0) {
|
||||
vm.movieNewList = items.rows;
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.movieNewList);
|
||||
}
|
||||
}
|
||||
}, function (err) {
|
||||
Notification.error({
|
||||
@@ -207,11 +197,6 @@
|
||||
vm.TVTopList = items.rows;
|
||||
|
||||
vm.initTopOneTVInfo();
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.TVTopOne);
|
||||
ScrapeService.scrapeTorrent(vm.TVTopList);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -224,10 +209,6 @@
|
||||
}, function (items) {
|
||||
if (items.rows.length > 0) {
|
||||
vm.TVNewList = items.rows;
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.TVNewList);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -248,11 +229,6 @@
|
||||
vm.musicTopList = items.rows;
|
||||
|
||||
vm.initTopOneMusicInfo();
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.musicTopOne);
|
||||
ScrapeService.scrapeTorrent(vm.musicTopList);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -265,10 +241,6 @@
|
||||
}, function (items) {
|
||||
if (items.rows.length > 0) {
|
||||
vm.musicNewList = items.rows;
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.musicNewList);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -289,11 +261,6 @@
|
||||
vm.sportsTopList = items.rows;
|
||||
|
||||
vm.initTopOneSportsInfo();
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.sportsTopOne);
|
||||
ScrapeService.scrapeTorrent(vm.sportsTopList);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -306,10 +273,6 @@
|
||||
}, function (items) {
|
||||
if (items.rows.length > 0) {
|
||||
vm.sportsNewList = items.rows;
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.sportsNewList);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -330,11 +293,6 @@
|
||||
vm.varietyTopList = items.rows;
|
||||
|
||||
vm.initTopOneVarietyInfo();
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.varietyTopOne);
|
||||
ScrapeService.scrapeTorrent(vm.varietyTopList);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -347,10 +305,6 @@
|
||||
}, function (items) {
|
||||
if (items.rows.length > 0) {
|
||||
vm.varietyNewList = items.rows;
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.varietyNewList);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -371,11 +325,6 @@
|
||||
vm.pictureTopList = items.rows;
|
||||
|
||||
vm.initTopOnePictureInfo();
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.pictureTopOne);
|
||||
ScrapeService.scrapeTorrent(vm.pictureTopList);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -388,10 +337,6 @@
|
||||
}, function (items) {
|
||||
if (items.rows.length > 0) {
|
||||
vm.pictureNewList = items.rows;
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.pictureNewList);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -412,11 +357,6 @@
|
||||
vm.gameTopList = items.rows;
|
||||
|
||||
vm.initTopOneGameInfo();
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.gameTopOne);
|
||||
ScrapeService.scrapeTorrent(vm.gameTopList);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -429,10 +369,6 @@
|
||||
}, function (items) {
|
||||
if (items.rows.length > 0) {
|
||||
vm.gameNewList = items.rows;
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.gameNewList);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -453,11 +389,6 @@
|
||||
vm.softwareTopList = items.rows;
|
||||
|
||||
vm.initTopOneSoftwareInfo();
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.softwareTopOne);
|
||||
ScrapeService.scrapeTorrent(vm.softwareTopList);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -470,10 +401,6 @@
|
||||
}, function (items) {
|
||||
if (items.rows.length > 0) {
|
||||
vm.softwareNewList = items.rows;
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.softwareNewList);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -494,11 +421,6 @@
|
||||
vm.ebookTopList = items.rows;
|
||||
|
||||
vm.initTopOneEbookInfo();
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.ebookTopOne);
|
||||
ScrapeService.scrapeTorrent(vm.ebookTopList);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -511,10 +433,6 @@
|
||||
}, function (items) {
|
||||
if (items.rows.length > 0) {
|
||||
vm.ebookNewList = items.rows;
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInHome) {
|
||||
ScrapeService.scrapeTorrent(vm.ebookNewList);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_TORRENTSSIZE' | translate}}: {{vm.siteInfo.totalTorrentsSize | bytes}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_SEEDERS' | translate}}: {{vm.siteInfo.totalSeeders}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_LEECHERS' | translate}}: {{vm.siteInfo.totalLeechers}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3" ng-if="vm.announceConfig.privateTorrentCmsMode">{{'TOTAL_UPLOADED' | translate}}: {{vm.siteInfo.totalUploaded | bytes}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3" ng-if="vm.announceConfig.privateTorrentCmsMode">{{'TOTAL_DOWNLOADED' | translate}}: {{vm.siteInfo.totalDownloaded | bytes}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_UPLOADED' | translate}}: {{vm.siteInfo.totalUploaded | bytes}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_DOWNLOADED' | translate}}: {{vm.siteInfo.totalDownloaded | bytes}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_FORUMTOPICS' | translate}}: {{vm.siteInfo.totalForumTopics}}</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">{{'TOTAL_FORUMREPLIES' | translate}}: {{vm.siteInfo.totalForumReplies}}</div>
|
||||
</div>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<span vip-flag="vm.topic.user"></span>
|
||||
<!--<span score-level-curr="vm.topic.user"></span>-->
|
||||
<!--<span message-to="vm.topic.user" to-class="message-to-icon"></span>-->
|
||||
<span class="user-ud-text xs-hide" ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<span class="user-ud-text xs-hide">
|
||||
(<span class="glyphicon glyphicon-arrow-up torrent-up"></span>{{vm.topic.user.uploaded | bytes}}
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>{{vm.topic.user.downloaded | bytes}}
|
||||
)
|
||||
@@ -180,7 +180,7 @@
|
||||
<span vip-flag="rep.user"></span>
|
||||
<!--<span score-level="vm.getUserScoreLevel(vm.topic.user);"></span>-->
|
||||
<!--<span message-to="vm.topic.user" to-class="message-to-icon"></span>-->
|
||||
<span class="user-ud-text xs-hide" ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<span class="user-ud-text xs-hide">
|
||||
(<span class="glyphicon glyphicon-arrow-up torrent-up"></span>{{rep.user.uploaded | bytes}}
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>{{rep.user.downloaded | bytes}}
|
||||
)
|
||||
|
||||
@@ -109,27 +109,27 @@
|
||||
<script type="text/ng-template" id="userinfo.html">
|
||||
<div>
|
||||
<ul class="list-unstyled margin-left-10 margin-right-10">
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.UPLOADED' | translate}}:
|
||||
<li>{{ 'STATUS_FIELD.UPLOADED' | translate}}:
|
||||
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>{{ vm.selectedUser.uploaded | bytes:2 }}
|
||||
</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.DOWNLOADED' | translate}}:
|
||||
<li>{{ 'STATUS_FIELD.DOWNLOADED' | translate}}:
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>{{ vm.selectedUser.downloaded | bytes:2 }}
|
||||
</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.RATIO' | translate}}:
|
||||
<li>{{ 'STATUS_FIELD.RATIO' | translate}}:
|
||||
<span ng-class="vm.selectedUser.ratio > 1 ? 'ratio-normal' : 'ratio-warning' ">{{ vm.selectedUser.ratio | ratio}}</span>
|
||||
</li>
|
||||
|
||||
<li class="status-divider" ng-if="vm.announce.privateTorrentCmsMode"></li>
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.UPTOTAL' | translate}}:{{ vm.selectedUser.uptotal }}</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.SEEDED' | translate}}:{{ vm.selectedUser.seeded }}</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.LEECHED' | translate}}:{{ vm.selectedUser.leeched }}</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.FINISHED' | translate}}:{{ vm.selectedUser.finished }}</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode && vm.selectedUser.hnr_warning>0">
|
||||
<li>{{ 'STATUS_FIELD.UPTOTAL' | translate}}:{{ vm.selectedUser.uptotal }}</li>
|
||||
<li>{{ 'STATUS_FIELD.SEEDED' | translate}}:{{ vm.selectedUser.seeded }}</li>
|
||||
<li>{{ 'STATUS_FIELD.LEECHED' | translate}}:{{ vm.selectedUser.leeched }}</li>
|
||||
<li>{{ 'STATUS_FIELD.FINISHED' | translate}}:{{ vm.selectedUser.finished }}</li>
|
||||
<li ng-if="vm.selectedUser.hnr_warning>0">
|
||||
{{ 'STATUS_FIELD.HNR_WARNING' | translate}}:<span class="badge badge_danger">{{vm.selectedUser.hnr_warning}}</span>
|
||||
</li>
|
||||
|
||||
<li class="status-divider" ng-if="vm.announce.privateTorrentCmsMode"></li>
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<li>{{ 'STATUS_FIELD.FORUM_TOPICS' | translate}}:{{ vm.selectedUser.topics }}</li>
|
||||
<li>{{ 'STATUS_FIELD.FORUM_REPLIES' | translate}}:{{ vm.selectedUser.replies }}</li>
|
||||
|
||||
@@ -139,27 +139,27 @@
|
||||
<script type="text/ng-template" id="userinfo.html">
|
||||
<div>
|
||||
<ul class="list-unstyled margin-left-10 margin-right-10">
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.UPLOADED' | translate}}:
|
||||
<li>{{ 'STATUS_FIELD.UPLOADED' | translate}}:
|
||||
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>{{ vm.selectedUser.uploaded | bytes:2 }}
|
||||
</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.DOWNLOADED' | translate}}:
|
||||
<li>{{ 'STATUS_FIELD.DOWNLOADED' | translate}}:
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>{{ vm.selectedUser.downloaded | bytes:2 }}
|
||||
</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.RATIO' | translate}}:
|
||||
<li>{{ 'STATUS_FIELD.RATIO' | translate}}:
|
||||
<span ng-class="vm.selectedUser.ratio > 1 ? 'ratio-normal' : 'ratio-warning' ">{{ vm.selectedUser.ratio | ratio}}</span>
|
||||
</li>
|
||||
|
||||
<li class="status-divider" ng-if="vm.announce.privateTorrentCmsMode"></li>
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.UPTOTAL' | translate}}:{{ vm.selectedUser.uptotal }}</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.SEEDED' | translate}}:{{ vm.selectedUser.seeded }}</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.LEECHED' | translate}}:{{ vm.selectedUser.leeched }}</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode">{{ 'STATUS_FIELD.FINISHED' | translate}}:{{ vm.selectedUser.finished }}</li>
|
||||
<li ng-if="vm.announce.privateTorrentCmsMode && vm.selectedUser.hnr_warning>0">
|
||||
<li>{{ 'STATUS_FIELD.UPTOTAL' | translate}}:{{ vm.selectedUser.uptotal }}</li>
|
||||
<li>{{ 'STATUS_FIELD.SEEDED' | translate}}:{{ vm.selectedUser.seeded }}</li>
|
||||
<li>{{ 'STATUS_FIELD.LEECHED' | translate}}:{{ vm.selectedUser.leeched }}</li>
|
||||
<li>{{ 'STATUS_FIELD.FINISHED' | translate}}:{{ vm.selectedUser.finished }}</li>
|
||||
<li ng-if="vm.selectedUser.hnr_warning>0">
|
||||
{{ 'STATUS_FIELD.HNR_WARNING' | translate}}:<span class="badge badge_danger">{{vm.selectedUser.hnr_warning}}</span>
|
||||
</li>
|
||||
|
||||
<li class="status-divider" ng-if="vm.announce.privateTorrentCmsMode"></li>
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<li>{{ 'STATUS_FIELD.FORUM_TOPICS' | translate}}:{{ vm.selectedUser.topics }}</li>
|
||||
<li>{{ 'STATUS_FIELD.FORUM_REPLIES' | translate}}:{{ vm.selectedUser.replies }}</li>
|
||||
|
||||
@@ -22,19 +22,19 @@
|
||||
icon: 'fa-arrow-up',
|
||||
title: $translate.instant('PAGE_HEADER_RANKING_UPLOAD'),
|
||||
templateUrl: 'upload_ranking.html',
|
||||
ng_show: vm.announce.privateTorrentCmsMode
|
||||
ng_show: true
|
||||
},
|
||||
{
|
||||
icon: 'fa-arrow-down',
|
||||
title: $translate.instant('PAGE_HEADER_RANKING_DOWNLOAD'),
|
||||
templateUrl: 'download_ranking.html',
|
||||
ng_show: vm.announce.privateTorrentCmsMode
|
||||
ng_show: true
|
||||
},
|
||||
{
|
||||
icon: 'fa-exchange',
|
||||
title: $translate.instant('PAGE_HEADER_RANKING_RATIO'),
|
||||
templateUrl: 'ratio_ranking.html',
|
||||
ng_show: vm.announce.privateTorrentCmsMode
|
||||
ng_show: true
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -185,12 +185,12 @@
|
||||
<th class="text-center"></th>
|
||||
<th>{{ 'TABLE_FIELDS.USERNAME' | translate}}</th>
|
||||
<th class="text-right ranking-active-col">{{ 'TABLE_FIELDS.SCORE' | translate}}</th>
|
||||
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.UPLOAD' | translate}}</th>
|
||||
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.DOWNLOAD' | translate}}</th>
|
||||
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.RATIO' | translate}}</th>
|
||||
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.SEEDED' | translate}}</th>
|
||||
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.LEECHED' | translate}}</th>
|
||||
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.FINISHED' | translate}}</th>
|
||||
<th class="text-center">{{ 'TABLE_FIELDS.UPLOAD' | translate}}</th>
|
||||
<th class="text-center">{{ 'TABLE_FIELDS.DOWNLOAD' | translate}}</th>
|
||||
<th class="text-center">{{ 'TABLE_FIELDS.RATIO' | translate}}</th>
|
||||
<th class="text-center">{{ 'TABLE_FIELDS.SEEDED' | translate}}</th>
|
||||
<th class="text-center">{{ 'TABLE_FIELDS.LEECHED' | translate}}</th>
|
||||
<th class="text-center">{{ 'TABLE_FIELDS.FINISHED' | translate}}</th>
|
||||
<th class="text-center">{{ 'TABLE_FIELDS.JOINED' | translate}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -205,13 +205,13 @@
|
||||
<!--<span message-to="user" to-class="message-to-icon"></span>-->
|
||||
</td>
|
||||
<td class="text-right ranking-active-col">{{user.score | number: 2}} <span score-level-curr="user"></span></td>
|
||||
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{user.uploaded | bytes:2}}</td>
|
||||
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{user.downloaded | bytes:2}}</td>
|
||||
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode"><span
|
||||
<td class="text-center">{{user.uploaded | bytes:2}}</td>
|
||||
<td class="text-center">{{user.downloaded | bytes:2}}</td>
|
||||
<td class="text-center"><span
|
||||
ng-class="user.ratio == 0 ? 'ratio-warning' : 'ratio-normal' ">{{ user.ratio | ratio}}</span></td>
|
||||
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{user.seeded}}</td>
|
||||
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{user.leeched}}</td>
|
||||
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{user.finished}}</td>
|
||||
<td class="text-center">{{user.seeded}}</td>
|
||||
<td class="text-center">{{user.leeched}}</td>
|
||||
<td class="text-center">{{user.finished}}</td>
|
||||
<td class="text-center">{{user.created | life}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
<span user-info="item.user" info-name></span>
|
||||
<span vip-flag="item.user"></span>
|
||||
<!--<span message-to="item.user" to-class="message-to-icon"></span>-->
|
||||
<span class="user-ud-text" ng-if="vm.announceConfig.privateTorrentCmsMode">
|
||||
<span class="user-ud-text">
|
||||
(<span class="glyphicon glyphicon-arrow-up torrent-up"></span>{{item.user.uploaded | bytes}}
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>{{item.user.downloaded | bytes}}
|
||||
)
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
TorrentsInfoController.$inject = ['$scope', '$state', '$stateParams', '$translate', 'Authentication', 'Notification', 'TorrentsService',
|
||||
'MeanTorrentConfig', 'DownloadService', '$sce', '$filter', 'CommentsService', 'ModalConfirmService', 'marked', 'Upload', '$timeout',
|
||||
'SubtitlesService', 'getStorageLangService', 'ScrapeService', 'NotifycationService', 'DebugConsoleService', 'TorrentGetInfoServices',
|
||||
'SubtitlesService', 'getStorageLangService', 'NotifycationService', 'DebugConsoleService', 'TorrentGetInfoServices',
|
||||
'localStorageService', '$compile', 'SideOverlay', 'ResourcesTagsServices', 'CollectionsService'];
|
||||
|
||||
function TorrentsInfoController($scope, $state, $stateParams, $translate, Authentication, Notification, TorrentsService, MeanTorrentConfig,
|
||||
DownloadService, $sce, $filter, CommentsService, ModalConfirmService, marked, Upload, $timeout, SubtitlesService,
|
||||
getStorageLangService, ScrapeService, NotifycationService, mtDebug, TorrentGetInfoServices,
|
||||
getStorageLangService, NotifycationService, mtDebug, TorrentGetInfoServices,
|
||||
localStorageService, $compile, SideOverlay, ResourcesTagsServices, CollectionsService) {
|
||||
var vm = this;
|
||||
vm.DLS = DownloadService;
|
||||
@@ -20,7 +20,6 @@
|
||||
vm.user = Authentication.user;
|
||||
vm.RTS = ResourcesTagsServices;
|
||||
vm.announce = MeanTorrentConfig.meanTorrentConfig.announce;
|
||||
vm.scrapeConfig = MeanTorrentConfig.meanTorrentConfig.scrapeTorrentStatus;
|
||||
vm.tmdbConfig = MeanTorrentConfig.meanTorrentConfig.tmdbConfig;
|
||||
vm.imdbConfig = MeanTorrentConfig.meanTorrentConfig.imdbConfig;
|
||||
vm.resourcesTags = MeanTorrentConfig.meanTorrentConfig.resourcesTags;
|
||||
@@ -142,9 +141,6 @@
|
||||
vm.initTabLists();
|
||||
vm.commentBuildPager();
|
||||
vm.buildPeersPager();
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInDetail) {
|
||||
ScrapeService.scrapeTorrent(vm.torrentLocalInfo);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -427,13 +423,6 @@
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* doScrape
|
||||
*/
|
||||
vm.doScrape = function () {
|
||||
ScrapeService.scrapeTorrent(vm.torrentLocalInfo, true);
|
||||
};
|
||||
|
||||
/**
|
||||
* initTabLists
|
||||
*/
|
||||
@@ -464,7 +453,7 @@
|
||||
icon: 'fa-users',
|
||||
title: $translate.instant('TAB_USER_INFO'),
|
||||
templateUrl: 'userInfo.html',
|
||||
ng_show: vm.announce.privateTorrentCmsMode,
|
||||
ng_show: true,
|
||||
badges: [
|
||||
{
|
||||
value: '↑ ' + vm.torrentLocalInfo.torrent_seeds + ' ↓ ' + vm.torrentLocalInfo.torrent_leechers + ' √ ' + vm.torrentLocalInfo.torrent_finished,
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
.controller('TorrentsController', TorrentsController);
|
||||
|
||||
TorrentsController.$inject = ['$scope', '$state', '$translate', '$timeout', 'Authentication', 'Notification', 'TorrentsService', 'getStorageLangService',
|
||||
'MeanTorrentConfig', 'DownloadService', '$window', 'ScrapeService', 'DebugConsoleService', 'TorrentGetInfoServices', 'ResourcesTagsServices'];
|
||||
'MeanTorrentConfig', 'DownloadService', '$window', 'DebugConsoleService', 'TorrentGetInfoServices', 'ResourcesTagsServices'];
|
||||
|
||||
function TorrentsController($scope, $state, $translate, $timeout, Authentication, Notification, TorrentsService, getStorageLangService, MeanTorrentConfig,
|
||||
DownloadService, $window, ScrapeService, mtDebug, TorrentGetInfoServices, ResourcesTagsServices) {
|
||||
DownloadService, $window, mtDebug, TorrentGetInfoServices, ResourcesTagsServices) {
|
||||
var vm = this;
|
||||
vm.DLS = DownloadService;
|
||||
vm.TGI = TorrentGetInfoServices;
|
||||
@@ -17,7 +17,6 @@
|
||||
vm.RTS = ResourcesTagsServices;
|
||||
vm.lang = getStorageLangService.getLang();
|
||||
vm.announce = MeanTorrentConfig.meanTorrentConfig.announce;
|
||||
vm.scrapeConfig = MeanTorrentConfig.meanTorrentConfig.scrapeTorrentStatus;
|
||||
vm.resourcesTags = MeanTorrentConfig.meanTorrentConfig.resourcesTags;
|
||||
vm.torrentSalesType = MeanTorrentConfig.meanTorrentConfig.torrentSalesType;
|
||||
vm.itemsPerPageConfig = MeanTorrentConfig.meanTorrentConfig.itemsPerPage;
|
||||
@@ -53,10 +52,6 @@
|
||||
vm.torrentFilterLength = items.total;
|
||||
vm.torrentPagedItems = items.rows;
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInList) {
|
||||
ScrapeService.scrapeTorrent(vm.torrentPagedItems);
|
||||
}
|
||||
|
||||
if (callback) callback();
|
||||
});
|
||||
};
|
||||
@@ -91,10 +86,6 @@
|
||||
}, function (items) {
|
||||
mtDebug.info(items);
|
||||
vm.listTopInfo = items.rows;
|
||||
|
||||
if (!vm.announce.privateTorrentCmsMode && vm.scrapeConfig.onTorrentInList) {
|
||||
ScrapeService.scrapeTorrent(vm.listTopInfo);
|
||||
}
|
||||
}, function (err) {
|
||||
Notification.error({
|
||||
message: '<i class="glyphicon glyphicon-remove"></i> ' + $translate.instant('TOP_LIST_INFO_ERROR')
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('torrents.services')
|
||||
.factory('ScrapeService', ScrapeService);
|
||||
|
||||
ScrapeService.$inject = ['TorrentsService', '$timeout', 'moment', 'MeanTorrentConfig', 'DebugConsoleService'];
|
||||
|
||||
function ScrapeService(TorrentsService, $timeout, moment, MeanTorrentConfig, mtDebug) {
|
||||
var scrapeConfig = MeanTorrentConfig.meanTorrentConfig.scrapeTorrentStatus;
|
||||
|
||||
return {
|
||||
scrapeTorrent: scrapeTorrent
|
||||
};
|
||||
|
||||
function scrapeTorrent(obj, isNow) {
|
||||
isNow = isNow || false;
|
||||
|
||||
if (Array.isArray(obj)) {
|
||||
angular.forEach(obj, function (oi) {
|
||||
var h = moment().diff(moment(oi.last_scrape), 'hours');
|
||||
|
||||
if (h >= scrapeConfig.scrapeInterval || isNow) {
|
||||
$timeout(function () {
|
||||
TorrentsService.scrape({
|
||||
torrentId: oi._id
|
||||
}, function (scinfo) {
|
||||
mtDebug.info(scinfo);
|
||||
oi.torrent_seeds = scinfo.data.complete;
|
||||
oi.torrent_finished = scinfo.data.downloaded;
|
||||
oi.torrent_leechers = scinfo.data.incomplete;
|
||||
}, function (err) {
|
||||
mtDebug.info(err);
|
||||
});
|
||||
}, 10);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var h = moment().diff(moment(obj.last_scrape), 'hours');
|
||||
|
||||
if (h >= scrapeConfig.scrapeInterval || isNow) {
|
||||
$timeout(function () {
|
||||
TorrentsService.scrape({
|
||||
torrentId: obj._id
|
||||
}, function (scinfo) {
|
||||
mtDebug.info(scinfo);
|
||||
obj.torrent_seeds = scinfo.data.complete;
|
||||
obj.torrent_finished = scinfo.data.downloaded;
|
||||
obj.torrent_leechers = scinfo.data.incomplete;
|
||||
}, function (err) {
|
||||
mtDebug.info(err);
|
||||
});
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}());
|
||||
@@ -96,13 +96,6 @@
|
||||
torrentId: '@_id'
|
||||
}
|
||||
},
|
||||
scrape: {
|
||||
method: 'GET',
|
||||
url: '/api/torrents/:torrentId/scrape',
|
||||
params: {
|
||||
torrentId: '@_id'
|
||||
}
|
||||
},
|
||||
siteInfo: {
|
||||
method: 'GET',
|
||||
url: '/api/torrents/siteInfo'
|
||||
|
||||
@@ -287,7 +287,7 @@
|
||||
{{ (item.torrent_vip ? 'ADMIN_BASIC_UNSET_VIP' : 'ADMIN_BASIC_SET_VIP') | translate}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="margin-top-2" ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<div class="margin-top-2">
|
||||
<div class="admin-tools-btn-list btn-group margin-top-2" uib-dropdown dropdown-append-to-body>
|
||||
<button id="btn-append-to-body" type="button"
|
||||
class="btn btn-xs btn-default btn-block"
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
<span user-info="item.user" info-name></span>
|
||||
<span vip-flag="item.user"></span>
|
||||
<!--<span message-to="item.user" to-class="message-to-icon"></span>-->
|
||||
<span class="user-ud-text" ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<span class="user-ud-text">
|
||||
(<span class="glyphicon glyphicon-arrow-up torrent-up"></span>{{item.user.uploaded | bytes}}
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>{{item.user.downloaded | bytes}}
|
||||
)
|
||||
@@ -592,14 +592,12 @@
|
||||
<dt class="h-line">{{ 'ANNOUNCE_URL' | translate}}:</dt>
|
||||
<dd class="h-line">{{vm.torrentLocalInfo.torrent_announce}}</dd>
|
||||
|
||||
<div ng-if="!vm.announce.privateTorrentCmsMode">
|
||||
<dt class="h-line">{{ 'TABLE_FIELDS.SEEDED' | translate}}:</dt>
|
||||
<dd class="h-line"><span class="glyphicon glyphicon-arrow-up torrent-up"></span> {{vm.torrentLocalInfo.torrent_seeds}}</dd>
|
||||
<dt class="h-line">{{ 'TABLE_FIELDS.LEECHED' | translate}}:</dt>
|
||||
<dd class="h-line"><span class="glyphicon glyphicon-arrow-down torrent-down"></span> {{vm.torrentLocalInfo.torrent_leechers}}</dd>
|
||||
<dt class="h-line">{{ 'TABLE_FIELDS.DOWNLOAD' | translate}}:</dt>
|
||||
<dd class="h-line"><span class="glyphicon glyphicon-ok torrent-finished"></span> {{vm.torrentLocalInfo.torrent_finished}}</dd>
|
||||
</div>
|
||||
<dt class="h-line">{{ 'TABLE_FIELDS.SEEDED' | translate}}:</dt>
|
||||
<dd class="h-line"><span class="glyphicon glyphicon-arrow-up torrent-up"></span> {{vm.torrentLocalInfo.torrent_seeds}}</dd>
|
||||
<dt class="h-line">{{ 'TABLE_FIELDS.LEECHED' | translate}}:</dt>
|
||||
<dd class="h-line"><span class="glyphicon glyphicon-arrow-down torrent-down"></span> {{vm.torrentLocalInfo.torrent_leechers}}</dd>
|
||||
<dt class="h-line">{{ 'TABLE_FIELDS.DOWNLOAD' | translate}}:</dt>
|
||||
<dd class="h-line"><span class="glyphicon glyphicon-ok torrent-finished"></span> {{vm.torrentLocalInfo.torrent_finished}}</dd>
|
||||
|
||||
<div ng-if="vm.torrentLocalInfo.torrent_type == 'tvserial'">
|
||||
<dt class="h-line">{{ 'TMDB_FIELDS.THIS_SE' | translate}}:</dt>
|
||||
@@ -630,19 +628,17 @@
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<div ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<dt class="h-line">{{ 'VIDEO_SALE_INFO' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<dt class="h-line">{{ 'VIDEO_SALE_INFO' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="label label-sale"
|
||||
title="{{vm.TGI.getTorrentSaleTypeDesc(vm.torrentLocalInfo);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{vm.torrentLocalInfo.isSaling ? (vm.torrentLocalInfo.torrent_sale_expires | date: 'MM-dd HH:mm') : 'NO'}}"
|
||||
ng-class="{'label-default': !vm.torrentLocalInfo.isSaling, 'label-success': vm.torrentLocalInfo.isSaling}">
|
||||
{{vm.torrentLocalInfo.torrent_sale_status}} {{vm.torrentLocalInfo.isSaling ? (vm.torrentLocalInfo.torrent_sale_expires | unlife) : ''}}
|
||||
</span>
|
||||
<!--<span ng-if="vm.torrentLocalInfo.isSaling">-->
|
||||
<!--[{{ 'SALE_EXPIRES_TIME' | translate}}: {{vm.torrentLocalInfo.torrent_sale_expires | unlife}}]-->
|
||||
<!--</span>-->
|
||||
</dd>
|
||||
</div>
|
||||
<!--<span ng-if="vm.torrentLocalInfo.isSaling">-->
|
||||
<!--[{{ 'SALE_EXPIRES_TIME' | translate}}: {{vm.torrentLocalInfo.torrent_sale_expires | unlife}}]-->
|
||||
<!--</span>-->
|
||||
</dd>
|
||||
|
||||
<div ng-if="vm.torrentLocalInfo.torrent_recommended != 'none'">
|
||||
<dt class="h-line">{{ 'ADMIN_BASIC_RLEVEL_SET' | translate}}:</dt>
|
||||
@@ -1048,9 +1044,6 @@
|
||||
<button class="btn btn-default btn-sm"
|
||||
ng-click="vm.editTags($event);">{{ 'ADMIN_BASIC_EDIT_TAGS' | translate}}
|
||||
</button>
|
||||
<button class="btn btn-default btn-sm" ng-click="vm.doScrape();"
|
||||
ng-if="!vm.announce.privateTorrentCmsMode">{{ 'ADMIN_BASIC_SCRAPE' | translate}}
|
||||
</button>
|
||||
</dd>
|
||||
|
||||
<div class="margin-top-10" ng-if="vm.torrentLocalInfo.torrent_type=='movie' && vm.showCollectionCommand()">
|
||||
@@ -1065,21 +1058,19 @@
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<div class="margin-top-20" ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<dt class="h-line">{{ 'ADMIN_SALE_TYPE_SET' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<mark>{{vm.TGI.getTorrentSaleTypeDesc(vm.torrentLocalInfo);}}</mark>
|
||||
</dd>
|
||||
<dt class="h-line">{{ 'ADMIN_SALE_TYPE_SET' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<mark>{{vm.TGI.getTorrentSaleTypeDesc(vm.torrentLocalInfo);}}</mark>
|
||||
</dd>
|
||||
|
||||
<div class="padding-top-10 margin-left-50">
|
||||
<div class="btn-group sales-btn-group text-center">
|
||||
<label ng-repeat="st in vm.torrentSalesType.value"
|
||||
class="btn btn-sm" ng-model="vm.model_salestype" uib-btn-radio="'{{st.name}}'" uncheckable
|
||||
ng-class="{'btn-default':vm.torrentLocalInfo.torrent_sale_status != st.name, 'btn-success':vm.torrentLocalInfo.torrent_sale_status == st.name}"
|
||||
ng-click="vm.setSaleType();">
|
||||
<small>{{st.name}}</small>
|
||||
</label>
|
||||
</div>
|
||||
<div class="padding-top-10 margin-left-50">
|
||||
<div class="btn-group sales-btn-group text-center">
|
||||
<label ng-repeat="st in vm.torrentSalesType.value"
|
||||
class="btn btn-sm" ng-model="vm.model_salestype" uib-btn-radio="'{{st.name}}'" uncheckable
|
||||
ng-class="{'btn-default':vm.torrentLocalInfo.torrent_sale_status != st.name, 'btn-success':vm.torrentLocalInfo.torrent_sale_status == st.name}"
|
||||
ng-click="vm.setSaleType();">
|
||||
<small>{{st.name}}</small>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ var path = require('path'),
|
||||
fs = require('fs'),
|
||||
nt = require('nt'),
|
||||
benc = require('bncode'),
|
||||
scrape = require(path.resolve('./config/lib/scrape')),
|
||||
async = require('async'),
|
||||
tmdb = require('moviedb')(config.meanTorrentConfig.tmdbConfig.key),
|
||||
traceLogCreate = require(path.resolve('./config/lib/tracelog')).create,
|
||||
@@ -203,15 +202,14 @@ exports.upload = function (req, res) {
|
||||
message = 'Read torrent file faild';
|
||||
reject(message);
|
||||
} else {
|
||||
if (config.meanTorrentConfig.announce.privateTorrentCmsMode) {
|
||||
//force change announce url to config value
|
||||
var announce = config.meanTorrentConfig.announce.url;
|
||||
torrent.metadata.announce = announce;
|
||||
//force change announce url to config value
|
||||
var announce = config.meanTorrentConfig.announce.url;
|
||||
torrent.metadata.announce = announce;
|
||||
|
||||
var cws = fs.createWriteStream(newfile);
|
||||
cws.write(benc.encode(torrent.metadata));
|
||||
cws.end();
|
||||
|
||||
var cws = fs.createWriteStream(newfile);
|
||||
cws.write(benc.encode(torrent.metadata));
|
||||
cws.end();
|
||||
}
|
||||
torrentinfo = torrent.metadata;
|
||||
torrentinfo.info_hash = torrent.infoHash();
|
||||
torrentinfo.filename = req.file.filename;
|
||||
@@ -555,10 +553,8 @@ exports.download = function (req, res) {
|
||||
message = 'Read torrent file faild';
|
||||
reject(message);
|
||||
} else {
|
||||
if (config.meanTorrentConfig.announce.privateTorrentCmsMode) {
|
||||
var announce = config.meanTorrentConfig.announce.url + '/' + user.passkey;
|
||||
torrent.metadata.announce = announce;
|
||||
}
|
||||
var announce = config.meanTorrentConfig.announce.url + '/' + user.passkey;
|
||||
torrent.metadata.announce = announce;
|
||||
torrent_data = torrent.metadata;
|
||||
resolve();
|
||||
}
|
||||
@@ -707,15 +703,6 @@ exports.create = function (req, res) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//scrape torrent status info in public cms mode
|
||||
if (!config.meanTorrentConfig.announce.privateTorrentCmsMode && config.meanTorrentConfig.scrapeTorrentStatus.onTorrentUpload) {
|
||||
scrape.doScrape(torrent, function (err, result) {
|
||||
if (err) {
|
||||
mtDebug.debugRed(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -805,32 +792,6 @@ exports.update = function (req, res) {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* scrape
|
||||
* scrape torrent status info in public cms mode
|
||||
* @param req
|
||||
* @param res
|
||||
*/
|
||||
exports.scrape = function (req, res) {
|
||||
if (!config.meanTorrentConfig.announce.privateTorrentCmsMode) {
|
||||
scrape.doScrape(req.torrent, function (err, result) {
|
||||
if (err) {
|
||||
mtDebug.debugRed(err);
|
||||
return res.status(422).send({
|
||||
message: err
|
||||
});
|
||||
}
|
||||
if (result && result.length === 1) {
|
||||
res.json(result[0]);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return res.status(422).send({
|
||||
message: 'privateTorrentCmsMode do not support scrape method'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* toggleHnRStatus
|
||||
* @param req
|
||||
|
||||
@@ -125,10 +125,6 @@ var TorrentSchema = new Schema({
|
||||
ref: 'Peer'
|
||||
}],
|
||||
_replies: [CommonSchema.CommentSchema],
|
||||
last_scrape: {
|
||||
type: Date,
|
||||
default: Date.now
|
||||
},
|
||||
_thumbs: [CommonSchema.ThumbSchema],
|
||||
_ratings: [CommonSchema.RatingSchema],
|
||||
_other_torrents: [],
|
||||
|
||||
@@ -32,7 +32,6 @@ exports.invokeRolesPolicies = function () {
|
||||
{resources: '/api/torrents/:torrentId', permissions: '*'},
|
||||
{resources: '/api/torrents/:torrentId/thumbsUp', permissions: '*'},
|
||||
{resources: '/api/torrents/:torrentId/rating', permissions: '*'},
|
||||
{resources: '/api/torrents/:torrentId/scrape', permissions: '*'},
|
||||
{resources: '/api/torrents/:torrentId/seederUsers', permissions: '*'},
|
||||
{resources: '/api/torrents/:torrentId/leecherUsers', permissions: '*'},
|
||||
{resources: '/api/torrents/:torrentId/toggleHnRStatus', permissions: '*'},
|
||||
@@ -74,7 +73,6 @@ exports.invokeRolesPolicies = function () {
|
||||
{resources: '/api/torrents/:torrentId', permissions: ['get', 'put']},
|
||||
{resources: '/api/torrents/:torrentId/thumbsUp', permissions: ['put']},
|
||||
{resources: '/api/torrents/:torrentId/rating', permissions: ['put']},
|
||||
{resources: '/api/torrents/:torrentId/scrape', permissions: ['get']},
|
||||
{resources: '/api/torrents/:torrentId/seederUsers', permissions: ['get']},
|
||||
{resources: '/api/torrents/:torrentId/leecherUsers', permissions: ['get']},
|
||||
|
||||
|
||||
@@ -56,9 +56,6 @@ module.exports = function (app) {
|
||||
app.route('/api/torrents/:torrentId/rating').all(torrentsPolicy.isAllowed)
|
||||
.put(torrents.rating);
|
||||
|
||||
app.route('/api/torrents/:torrentId/scrape').all(torrentsPolicy.isAllowed)
|
||||
.get(torrents.scrape);
|
||||
|
||||
app.route('/api/torrents/:torrentId/seederUsers').all(torrentsPolicy.isAllowed)
|
||||
.get(torrents.getSeederUsers);
|
||||
|
||||
|
||||
@@ -153,109 +153,105 @@
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<div ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.LEECHED_IP' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<div class="list-all-ips">
|
||||
<span class="ip-item" ng-repeat="t in vm.user.leeched_ip">{{t}}</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.LEECHED_IP' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<div class="list-all-ips">
|
||||
<span class="ip-item" ng-repeat="t in vm.user.leeched_ip">{{t}}</span>
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.BT_CLIENT' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<div class="list-all-clients">
|
||||
<span class="client-item" ng-repeat="t in vm.user.client_agent">{{t}}</span>
|
||||
</div>
|
||||
</dd>
|
||||
</div>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.BT_CLIENT' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<div class="list-all-clients">
|
||||
<span class="client-item" ng-repeat="t in vm.user.client_agent">{{t}}</span>
|
||||
</div>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.FOLLOWERS' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.followers.length }}
|
||||
<a class="pull-right" ui-sref="follow.userFollowers({userId: vm.user._id})" ng-if="vm.user.followers.length>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
|
||||
<a class="pull-right" ui-sref="follow.userFollowers({userId: vm.user._id})"
|
||||
ng-if="vm.user.followers.length>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.FOLLOWING' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.following.length }}
|
||||
<a class="pull-right" ui-sref="follow.userFollowing({userId: vm.user._id})" ng-if="vm.user.following.length>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
|
||||
<a class="pull-right" ui-sref="follow.userFollowing({userId: vm.user._id})"
|
||||
ng-if="vm.user.following.length>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
|
||||
</dd>
|
||||
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<div ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPLOADED' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>
|
||||
<span>{{ vm.user.uploaded | bytes:2 }}</span>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPLOADED' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>
|
||||
<span>{{ vm.user.uploaded | bytes:2 }}</span>
|
||||
|
||||
<div class="pull-right" ng-if="vm.authentication.user.isAdmin">
|
||||
<button class="btn btn-default btn-xs btn-width-100"
|
||||
uib-popover-template="vm.setUserUploadedPopover.templateUrl"
|
||||
popover-title="{{vm.setUserUploadedPopover.title | translate}}"
|
||||
popover-trigger="'outsideClick'"
|
||||
popover-placement="top-right"
|
||||
popover-is-open="vm.setUserUploadedPopover.isOpen"
|
||||
popover-class="set-uploaded-popover"
|
||||
ng-click="vm.setUserUploadedPopover.number = undefined;">
|
||||
+/-
|
||||
</button>
|
||||
</div>
|
||||
</dd>
|
||||
<div class="pull-right" ng-if="vm.authentication.user.isAdmin">
|
||||
<button class="btn btn-default btn-xs btn-width-100"
|
||||
uib-popover-template="vm.setUserUploadedPopover.templateUrl"
|
||||
popover-title="{{vm.setUserUploadedPopover.title | translate}}"
|
||||
popover-trigger="'outsideClick'"
|
||||
popover-placement="top-right"
|
||||
popover-is-open="vm.setUserUploadedPopover.isOpen"
|
||||
popover-class="set-uploaded-popover"
|
||||
ng-click="vm.setUserUploadedPopover.number = undefined;">
|
||||
+/-
|
||||
</button>
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.DOWNLOADED' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>
|
||||
<span>{{ vm.user.downloaded | bytes:2 }}</span>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.DOWNLOADED' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>
|
||||
<span>{{ vm.user.downloaded | bytes:2 }}</span>
|
||||
|
||||
<div class="pull-right" ng-if="vm.authentication.user.isAdmin">
|
||||
<button class="btn btn-default btn-xs btn-width-100"
|
||||
uib-popover-template="vm.setUserDownloadedPopover.templateUrl"
|
||||
popover-title="{{vm.setUserDownloadedPopover.title | translate}}"
|
||||
popover-trigger="'outsideClick'"
|
||||
popover-placement="top-right"
|
||||
popover-is-open="vm.setUserDownloadedPopover.isOpen"
|
||||
popover-class="set-downloaded-popover"
|
||||
ng-click="vm.setUserDownloadedPopover.number = undefined;">
|
||||
+/-
|
||||
</button>
|
||||
</div>
|
||||
</dd>
|
||||
<div class="pull-right" ng-if="vm.authentication.user.isAdmin">
|
||||
<button class="btn btn-default btn-xs btn-width-100"
|
||||
uib-popover-template="vm.setUserDownloadedPopover.templateUrl"
|
||||
popover-title="{{vm.setUserDownloadedPopover.title | translate}}"
|
||||
popover-trigger="'outsideClick'"
|
||||
popover-placement="top-right"
|
||||
popover-is-open="vm.setUserDownloadedPopover.isOpen"
|
||||
popover-class="set-downloaded-popover"
|
||||
ng-click="vm.setUserDownloadedPopover.number = undefined;">
|
||||
+/-
|
||||
</button>
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.RATIO' | translate}}:</dt>
|
||||
<dd class="h-line"><span ng-class="vm.user.ratio == 0 ? 'ratio-warning' : 'ratio-normal' ">{{ vm.user.ratio | ratio}}</span></dd>
|
||||
</div>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.RATIO' | translate}}:</dt>
|
||||
<dd class="h-line"><span ng-class="vm.user.ratio == 0 ? 'ratio-warning' : 'ratio-normal' ">{{ vm.user.ratio | ratio}}</span></dd>
|
||||
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<div ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPTOTAL' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.uptotal }} <a class="pull-right" ui-sref="admin.user-uplist({userId: vm.user._id})"
|
||||
ng-if="vm.user.uptotal>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.SEEDED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.seeded }} <a class="pull-right" ui-sref="admin.user-seeding({userId: vm.user._id})"
|
||||
ng-if="vm.user.seeded>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPTOTAL' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.uptotal }} <a class="pull-right" ui-sref="admin.user-uplist({userId: vm.user._id})"
|
||||
ng-if="vm.user.uptotal>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.SEEDED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.seeded }} <a class="pull-right" ui-sref="admin.user-seeding({userId: vm.user._id})"
|
||||
ng-if="vm.user.seeded>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.LEECHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.leeched }} <a class="pull-right" ui-sref="admin.user-leeching({userId: vm.user._id})"
|
||||
ng-if="vm.user.leeched>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.LEECHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.leeched }} <a class="pull-right" ui-sref="admin.user-leeching({userId: vm.user._id})"
|
||||
ng-if="vm.user.leeched>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.FINISHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.finished }}</dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.FINISHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.finished }}</dd>
|
||||
|
||||
<div ng-if="vm.user.hnr_warning>0">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.HNR_WARNING' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="badge badge_danger">{{vm.user.hnr_warning}}</span>
|
||||
<a class="pull-right" ui-sref="admin.user-warning({userId: vm.user._id})"
|
||||
ng-if="vm.user.hnr_warning>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<li class="status-divider"></li>
|
||||
<div ng-if="vm.user.hnr_warning>0">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.HNR_WARNING' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="badge badge_danger">{{vm.user.hnr_warning}}</span>
|
||||
<a class="pull-right" ui-sref="admin.user-warning({userId: vm.user._id})"
|
||||
ng-if="vm.user.hnr_warning>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.FORUM_TOPICS' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.topics }}</dd>
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<p><span user-info="item" info-class="follow-name" info-name></span><span message-to="item" to-class="message-to-icon"></span></p>
|
||||
<span vip-flag="item" vip-class="follow-vip"></span>
|
||||
<span score-level-curr="item" class="follow-level"></span>
|
||||
<span class="user-ud-text" ng-if="vm.announceConfig.privateTorrentCmsMode">
|
||||
<span class="user-ud-text">
|
||||
<span up-down-flag="item" up-down-class="follow-up-down"></span>
|
||||
</span>
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<p><span user-info="item" info-class="follow-name" info-name></span><span message-to="item" to-class="message-to-icon"></span></p>
|
||||
<span vip-flag="item" vip-class="follow-vip"></span>
|
||||
<span score-level-curr="item" class="follow-level"></span>
|
||||
<span class="user-ud-text" ng-if="vm.announceConfig.privateTorrentCmsMode">
|
||||
<span class="user-ud-text">
|
||||
<span up-down-flag="item" up-down-class="follow-up-down"></span>
|
||||
</span>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
to-class="message-to-icon"></span></p>
|
||||
<span vip-flag="item" vip-class="follow-vip"></span>
|
||||
<span score-level-curr="item" class="follow-level"></span>
|
||||
<span class="user-ud-text" ng-if="vm.announceConfig.privateTorrentCmsMode">
|
||||
<span class="user-ud-text">
|
||||
<span up-down-flag="item" up-down-class="follow-up-down"></span>
|
||||
</span>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
to-class="message-to-icon"></span></p>
|
||||
<span vip-flag="item" vip-class="follow-vip"></span>
|
||||
<span score-level-curr="item" class="follow-level"></span>
|
||||
<span class="user-ud-text" ng-if="vm.announceConfig.privateTorrentCmsMode">
|
||||
<span class="user-ud-text">
|
||||
<span up-down-flag="item" up-down-class="follow-up-down"></span>
|
||||
</span>
|
||||
|
||||
|
||||
@@ -112,22 +112,20 @@
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<div ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.LEECHED_IP' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<div class="list-all-ips">
|
||||
<span class="ip-item" ng-repeat="t in vm.user.leeched_ip">{{t}}</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.LEECHED_IP' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<div class="list-all-ips">
|
||||
<span class="ip-item" ng-repeat="t in vm.user.leeched_ip">{{t}}</span>
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.BT_CLIENT' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<div class="list-all-clients">
|
||||
<span class="client-item" ng-repeat="t in vm.user.client_agent">{{t}}</span>
|
||||
</div>
|
||||
</dd>
|
||||
<li class="status-divider"></li>
|
||||
</div>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.BT_CLIENT' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<div class="list-all-clients">
|
||||
<span class="client-item" ng-repeat="t in vm.user.client_agent">{{t}}</span>
|
||||
</div>
|
||||
</dd>
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.MY_FOLLOWERS' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.followers.length }}
|
||||
@@ -141,51 +139,48 @@
|
||||
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<div ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPLOADED' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>
|
||||
{{ vm.user.uploaded | bytes:2 }}
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPLOADED' | translate}}:</dt>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.DOWNLOADED' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>
|
||||
{{ vm.user.downloaded | bytes:2 }}
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.RATIO' | translate}}:</dt>
|
||||
<dd class="h-line"><span ng-class="vm.user.ratio == 0 ? 'ratio-warning' : 'ratio-normal' ">{{ vm.user.ratio | ratio}}</span></dd>
|
||||
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPTOTAL' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.uptotal }} <a class="pull-right" ui-sref="status.uploaded"
|
||||
ng-if="vm.user.uptotal>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.SEEDED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.seeded }} <a class="pull-right" ui-sref="status.seeding"
|
||||
ng-if="vm.user.seeded>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.LEECHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.leeched }} <a class="pull-right" ui-sref="status.downloading"
|
||||
ng-if="vm.user.leeched>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.FINISHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.finished }}</dd>
|
||||
|
||||
<div ng-if="vm.user.hnr_warning>0">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.HNR_WARNING' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>
|
||||
{{ vm.user.uploaded | bytes:2 }}
|
||||
<span class="badge badge_danger">{{vm.user.hnr_warning}}</span>
|
||||
<a class="pull-right" ui-sref="status.warning" ng-if="vm.user.hnr_warning>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.DOWNLOADED' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>
|
||||
{{ vm.user.downloaded | bytes:2 }}
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.RATIO' | translate}}:</dt>
|
||||
<dd class="h-line"><span ng-class="vm.user.ratio == 0 ? 'ratio-warning' : 'ratio-normal' ">{{ vm.user.ratio | ratio}}</span></dd>
|
||||
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPTOTAL' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.uptotal }} <a class="pull-right" ui-sref="status.uploaded"
|
||||
ng-if="vm.user.uptotal>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.SEEDED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.seeded }} <a class="pull-right" ui-sref="status.seeding"
|
||||
ng-if="vm.user.seeded>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.LEECHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.leeched }} <a class="pull-right" ui-sref="status.downloading"
|
||||
ng-if="vm.user.leeched>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a></dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.FINISHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.finished }}</dd>
|
||||
|
||||
<div ng-if="vm.user.hnr_warning>0">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.HNR_WARNING' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="badge badge_danger">{{vm.user.hnr_warning}}</span>
|
||||
<a class="pull-right" ui-sref="status.warning" ng-if="vm.user.hnr_warning>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<li class="status-divider"></li>
|
||||
</div>
|
||||
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.FORUM_TOPICS' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.topics }}</a></dd>
|
||||
|
||||
|
||||
@@ -6,22 +6,18 @@
|
||||
<li ui-sref="status.account" ui-sref-active="active" title="{{'STATUS_ACCOUNT' | translate}}">
|
||||
<a><i class="fa fa-user-circle-o fa-2x" aria-hidden="true"></i><span class="tab-title">{{'STATUS_ACCOUNT' | translate}}</span></a>
|
||||
</li>
|
||||
<li ui-sref="status.uploaded" ui-sref-active="active" title="{{'STATUS_UPLOADED' | translate}}"
|
||||
ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<li ui-sref="status.uploaded" ui-sref-active="active" title="{{'STATUS_UPLOADED' | translate}}">
|
||||
<a><i class="fa fa-arrow-circle-o-up fa-2x" aria-hidden="true"></i><span
|
||||
class="tab-title">{{'STATUS_UPLOADED' | translate}}</span></a>
|
||||
</li>
|
||||
<li ui-sref="status.seeding" ui-sref-active="active" title="{{'STATUS_SEEDING' | translate}}"
|
||||
ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<li ui-sref="status.seeding" ui-sref-active="active" title="{{'STATUS_SEEDING' | translate}}">
|
||||
<a><i class="fa fa-arrow-up fa-2x" aria-hidden="true"></i><span class="tab-title">{{'STATUS_SEEDING' | translate}}</span></a>
|
||||
</li>
|
||||
<li ui-sref="status.downloading" ui-sref-active="active" title="{{'STATUS_DOWNLOADING' | translate}}"
|
||||
ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<li ui-sref="status.downloading" ui-sref-active="active" title="{{'STATUS_DOWNLOADING' | translate}}">
|
||||
<a><i class="fa fa-arrow-down fa-2x" aria-hidden="true"></i><span
|
||||
class="tab-title">{{'STATUS_DOWNLOADING' | translate}}</span></a>
|
||||
</li>
|
||||
<li ui-sref="status.warning" ui-sref-active="active" title="{{'STATUS_WARNING' | translate}}"
|
||||
ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<li ui-sref="status.warning" ui-sref-active="active" title="{{'STATUS_WARNING' | translate}}">
|
||||
<a><i class="fa fa-warning fa-2x" aria-hidden="true"></i><span class="tab-title">{{'STATUS_WARNING' | translate}}</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -131,43 +131,39 @@
|
||||
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<div ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPLOADED' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>
|
||||
<span>{{ vm.user.uploaded | bytes:2 }}</span>
|
||||
</dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPLOADED' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>
|
||||
<span>{{ vm.user.uploaded | bytes:2 }}</span>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.DOWNLOADED' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>
|
||||
<span>{{ vm.user.downloaded | bytes:2 }}</span>
|
||||
</dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.DOWNLOADED' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>
|
||||
<span>{{ vm.user.downloaded | bytes:2 }}</span>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.RATIO' | translate}}:</dt>
|
||||
<dd class="h-line"><span ng-class="vm.user.ratio == 0 ? 'ratio-warning' : 'ratio-normal' ">{{ vm.user.ratio | ratio}}</span>
|
||||
</dd>
|
||||
</div>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.RATIO' | translate}}:</dt>
|
||||
<dd class="h-line"><span ng-class="vm.user.ratio == 0 ? 'ratio-warning' : 'ratio-normal' ">{{ vm.user.ratio | ratio}}</span>
|
||||
</dd>
|
||||
|
||||
<div ng-if="vm.announce.privateTorrentCmsMode">
|
||||
<li class="status-divider"></li>
|
||||
<li class="status-divider"></li>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPTOTAL' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.uptotal }}</dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.UPTOTAL' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.uptotal }}</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.SEEDED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.seeded }}</dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.SEEDED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.seeded }}</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.LEECHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.leeched }}</dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.LEECHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.leeched }}</dd>
|
||||
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.FINISHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.finished }}</span></dd>
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.FINISHED' | translate}}:</dt>
|
||||
<dd class="h-line">{{ vm.user.finished }}</span></dd>
|
||||
|
||||
<div ng-if="vm.user.hnr_warning>0">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.HNR_WARNING' | translate}}:</dt>
|
||||
<dd class="h-line"><span class="badge badge_danger">{{vm.user.hnr_warning}}</span></dd>
|
||||
</div>
|
||||
<div ng-if="vm.user.hnr_warning>0">
|
||||
<dt class="h-line">{{ 'STATUS_FIELD.HNR_WARNING' | translate}}:</dt>
|
||||
<dd class="h-line"><span class="badge badge_danger">{{vm.user.hnr_warning}}</span></dd>
|
||||
</div>
|
||||
|
||||
<li class="status-divider"></li>
|
||||
|
||||
Reference in New Issue
Block a user