Compare commits

..

No commits in common. "5afd86a932e3dd9c3cbbd9815a9f96d1f17cd5f4" and "06fa428790fa3a8e34215734d56826920f01142b" have entirely different histories.

3 changed files with 4 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.99.1",
"version": "1.99.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.99.1",
"version": "1.99.0",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -231,7 +231,7 @@ function groupItems(items) {
});
}
async function storeMedia(sources, domain, role, { entropyFilter = 2.5 } = {}) {
async function storeMedia(sources, domain, role) {
const presentSources = sources.filter(Boolean);
if (presentSources.length === 0) {
@ -250,7 +250,7 @@ async function storeMedia(sources, domain, role, { entropyFilter = 2.5 } = {}) {
const { hash: fetchedItemsByHash } = groupItems(fetchedItems);
// find hash duplicates that don't need to be re-saved
const uniqueFetchedItems = Object.values(fetchedItemsByHash).filter(item => !entropyFilter || item.entropy >= entropyFilter);
const uniqueFetchedItems = Object.values(fetchedItemsByHash);
const existingHashItems = await knex('media').whereIn('hash', uniqueFetchedItems.map(item => item.hash));
const { hash: existingHashItemsByHash } = groupItems(existingHashItems);