не воспринимаем расширения
This commit is contained in:
@ -258,7 +258,12 @@ const detectSubCategory = (torrent, files, typesPriority, contentType) => {
|
|||||||
if(torrent[ContentCategoryProp] != 'xxx')
|
if(torrent[ContentCategoryProp] != 'xxx')
|
||||||
{
|
{
|
||||||
files.some(({path}) => {
|
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')
|
if(torrent[ContentCategoryProp] == 'xxx')
|
||||||
{
|
{
|
||||||
console.log('block because file ' + path);
|
console.log('block because file ' + path);
|
||||||
|
Reference in New Issue
Block a user