не воспринимаем расширения
This commit is contained in:
@ -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;
|
||||
module.exports = torrentTypeDetect;
|
||||
|
Reference in New Issue
Block a user