Compare commits
2 Commits
647e9bb186
...
c9b774c498
Author | SHA1 | Date |
---|---|---|
|
c9b774c498 | |
|
3e813ca251 |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.167.8",
|
"version": "1.167.9",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.167.8",
|
"version": "1.167.9",
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -504,10 +504,10 @@ async function fetchSource(source, baseMedia) {
|
||||||
const maxAttempts = source.attempts || 3;
|
const maxAttempts = source.attempts || 3;
|
||||||
|
|
||||||
logger.silly(`Fetching media from ${source.src}`);
|
logger.silly(`Fetching media from ${source.src}`);
|
||||||
// attempts
|
|
||||||
|
|
||||||
async function attempt(attempts = 1) {
|
async function attempt(attempts = 1) {
|
||||||
const hasher = new blake2.Hash('blake2b', { digestLength: 24 });
|
const hasher = new blake2.Hash('blake2b', { digestLength: 24 });
|
||||||
|
let hasherReady = true;
|
||||||
hasher.setEncoding('hex');
|
hasher.setEncoding('hex');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -519,7 +519,10 @@ async function fetchSource(source, baseMedia) {
|
||||||
|
|
||||||
hashStream.on('data', (chunk) => {
|
hashStream.on('data', (chunk) => {
|
||||||
size += chunk.length;
|
size += chunk.length;
|
||||||
|
|
||||||
|
if (hasherReady) {
|
||||||
hasher.write(chunk);
|
hasher.write(chunk);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const { mimetype } = source.stream
|
const { mimetype } = source.stream
|
||||||
|
@ -551,6 +554,7 @@ async function fetchSource(source, baseMedia) {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
hasherReady = false;
|
||||||
hasher.end();
|
hasher.end();
|
||||||
|
|
||||||
if (error.code !== 'VERIFY_TYPE') {
|
if (error.code !== 'VERIFY_TYPE') {
|
||||||
|
|
Loading…
Reference in New Issue