рейтинг
This commit is contained in:
@ -245,7 +245,8 @@ let XXX_BLOCK_WORDS = ['incestcash', 'asacp', 'xondemand', 'yankscash', 'klixxx'
|
||||
'stripping', 'swapping', 'thong', 'topless', 'toying',
|
||||
'trix', 'undressing', 'uniform', 'whipcream', 'brazzers', 'порно',
|
||||
'порн', 'лесб', 'гей', 'геи', 'прон', 'catgoddess', 'gracel', 'fatman', 'falko', 'pthc',
|
||||
'ptsc', 'yukikax', 'ls-models'
|
||||
'ptsc', 'yukikax', 'ls-models', '3yo', '4yo', '5yo', '6yo', '7yo', '8yo', '9yo',
|
||||
'10yo', '11yo', '12yo', '13yo', '14yo', '15yo', '16yo'
|
||||
];
|
||||
|
||||
module.exports = XXX_BLOCK_WORDS;
|
||||
|
@ -251,7 +251,7 @@ const detectSubCategory = (torrent, files, typesPriority, contentType) => {
|
||||
let name = torrent.name.toLowerCase()
|
||||
|
||||
// блокируем порнографию
|
||||
if(contentType == ContentTypes.VIDEO || contentType == ContentTypes.PICTURES)
|
||||
if(contentType == ContentTypes.VIDEO || contentType == ContentTypes.PICTURES || contentType == ContentTypes.ARCHIVE)
|
||||
{
|
||||
blockBadName(torrent, name);
|
||||
// блокируем так по названию файлов
|
||||
|
17
lib/rating.js
Normal file
17
lib/rating.js
Normal file
@ -0,0 +1,17 @@
|
||||
function biasValuation(count, min, avrg, avrg_const)
|
||||
{
|
||||
return ((count / (count + min)) * avrg) + ((min / (min + count)) * avrg_const);
|
||||
}
|
||||
|
||||
const rating = (good, bad) => {
|
||||
if (good + bad > 0)
|
||||
{
|
||||
return biasValuation(good + bad, 9, good / (good + bad), 0.45);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = rating;
|
Reference in New Issue
Block a user