index.js
/*
    It checks if we already have an image saved locally.
    It should query a tracker instead..
*/
It checks if we already have an image saved locally.
It should query a tracker instead
It checks if we already have an image saved locally . It should query a tracker instead
function checkDuplicate(server, id) {
    const fs = require("fs");
    const serverDir = `${outDir}/${server}`;
    return fs.existsSync(`${serverDir}/${id}.jpeg`) ||
    fs.existsSync(`${serverDir}/${id}.jpg`) ||
    fs.existsSync(`${serverDir}/${id}.png`) ||
    fs.existsSync(`${serverDir}/${id}.gif`) || 
    fs.existsSync(`${serverDir}/${id}.flv`);
}
function checkDuplicate ( server , id ) { const fs = require ( "fs" ) ; const serverDir = ` ${ outDir } ${ server } ` ; return fs . existsSync ( ` ${ serverDir } ${ id } ` ) || fs . existsSync ( ` ${ serverDir } ${ id } ` ) || fs . existsSync ( ` ${ serverDir } ${ id } ` ) || fs . existsSync ( ` ${ serverDir } ${ id } ` ) || fs . existsSync ( ` ${ serverDir } ${ id } ` ) ; }
It checks if we already have an image saved locally.
It checks if we already have an image saved locally .