feat(filters): content type filters #49

This commit is contained in:
Alexey Kasyanchuk
2018-07-18 10:23:32 +03:00
parent a752a67370
commit 8792da82d5
5 changed files with 68 additions and 6 deletions

View File

@ -433,6 +433,12 @@ app.get('*', function(req, res)
return false
}
if(config.filters.contentType && Array.isArray(config.filters.contentType) && !config.filters.contentType.includes(torrent.contentType))
{
console.log('ignore torrent', torrent.name, 'because type', torrent.contentType, 'not in:', config.filters.contentType)
return false
}
return true
}