diff --git a/lib/content.js b/lib/content.js index 41bff94..c0593dd 100644 --- a/lib/content.js +++ b/lib/content.js @@ -258,7 +258,12 @@ const detectSubCategory = (torrent, files, typesPriority, contentType) => { if(torrent[ContentCategoryProp] != 'xxx') { files.some(({path}) => { - blockBadName(torrent, path.toLowerCase()); + let fileCheck = path.toLowerCase().split('.'); + if(fileCheck.length > 1) + fileCheck.pop(); // убираем расширение на конце + fileCheck = fileCheck.join('.'); + + blockBadName(torrent, fileCheck); if(torrent[ContentCategoryProp] == 'xxx') { console.log('block because file ' + path); @@ -304,4 +309,4 @@ const torrentTypeDetect = (torrent, files) => { detectSubCategory(torrent, files, typesPriority, torrent[ContentTypeProp]); } -module.exports = torrentTypeDetect; \ No newline at end of file +module.exports = torrentTypeDetect;