some filtering
This commit is contained in:
parent
0768e8d3e0
commit
f90038e73b
@ -1,4 +1,4 @@
|
||||
let XXX_BLOCK_WORDS = ['incestcash', 'asacp', 'xondemand', 'yankscash', 'klixxx', 'cybersitter', 'safesurf',
|
||||
const XXX_BLOCK_WORDS = ['incestcash', 'asacp', 'xondemand', 'yankscash', 'klixxx', 'cybersitter', 'safesurf',
|
||||
'surfwatch', 'netcash', 'watersport', 'fuck', 'threesome', 'tits',
|
||||
'masturbating', 'incest', 'bestiality', 'analintercourse', 'analsex', 'animesex',
|
||||
'anitablonde', 'autosex', 'blackass', 'blackasses', 'boner', 'boobcruise',
|
||||
@ -244,9 +244,16 @@ let XXX_BLOCK_WORDS = ['incestcash', 'asacp', 'xondemand', 'yankscash', 'klixxx'
|
||||
'sleeping', 'speculums', 'spread', 'spreading', 'squirting', 'stripper',
|
||||
'stripping', 'swapping', 'thong', 'topless', 'toying',
|
||||
'trix', 'undressing', 'uniform', 'whipcream', 'brazzers', 'порно',
|
||||
'порн', 'лесб', 'гей', 'геи', 'прон', 'catgoddess', 'gracel', 'fatman', 'falko', 'pthc',
|
||||
'ptsc', 'yukikax', 'ls-models', '3yo', '4yo', '5yo', '6yo', '7yo', '8yo', '9yo',
|
||||
'10yo', '11yo', '12yo', '13yo', '14yo', '15yo', '16yo'
|
||||
'порн', 'лесб', 'гей', 'геи', 'прон'
|
||||
];
|
||||
|
||||
module.exports = XXX_BLOCK_WORDS;
|
||||
const XXX_VERY_BAD_WORDS = [
|
||||
'catgoddess', 'gracel', 'fatman', 'falko', 'pthc',
|
||||
'ptsc', 'yukikax', 'ls-models', '3yo', '4yo', '5yo', '6yo', '7yo', '8yo', '9yo',
|
||||
'10yo', '11yo', '12yo', '13yo', '14yo', '15yo', '16yo'
|
||||
]
|
||||
|
||||
module.exports = {
|
||||
XXX_BLOCK_WORDS,
|
||||
XXX_VERY_BAD_WORDS
|
||||
};
|
||||
|
@ -234,16 +234,22 @@ const ExtesionBase = {
|
||||
const ContentTypeProp = 'contentType';
|
||||
const ContentCategoryProp = 'contentCategory';
|
||||
|
||||
const XXX_BLOCK_WORDS = require('./bad-words');
|
||||
const {
|
||||
XXX_BLOCK_WORDS,
|
||||
XXX_VERY_BAD_WORDS
|
||||
} = require('./bad-words');
|
||||
|
||||
// блокируем порнографию
|
||||
const blockBadName = (torrent, name) => {
|
||||
let splitName = name.split(/[`~!@#$%^&*()\]\[{}.,+?/\\;:\-_' "|]/);
|
||||
splitName.some((word) => {
|
||||
if (XXX_VERY_BAD_WORDS.some(function(v) { return word == v; })) {
|
||||
torrent[ContentTypeProp] = 'bad';
|
||||
} else
|
||||
if (XXX_BLOCK_WORDS.some(function(v) { return word == v; })) {
|
||||
torrent[ContentCategoryProp] = 'xxx';
|
||||
}
|
||||
return torrent[ContentCategoryProp] == 'xxx';
|
||||
return torrent[ContentCategoryProp] == 'xxx' || torrent[ContentTypeProp] == 'bad';
|
||||
})
|
||||
}
|
||||
|
||||
@ -266,7 +272,7 @@ const detectSubCategory = (torrent, files, typesPriority, contentType) => {
|
||||
blockBadName(torrent, fileCheck);
|
||||
if(torrent[ContentCategoryProp] == 'xxx')
|
||||
{
|
||||
console.log('block because file ' + path);
|
||||
console.log('marked torrent xxx because file ' + path);
|
||||
}
|
||||
return torrent[ContentCategoryProp] == 'xxx';
|
||||
})
|
||||
|
@ -387,6 +387,12 @@ const checkTorrent = (torrent) => {
|
||||
}
|
||||
}
|
||||
|
||||
if(torrent.contentType === 'bad')
|
||||
{
|
||||
console.log('ignore torrent', torrent.name, 'because this is a bad thing')
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user