Ver Fonte

fuckthis

axcwg há 3 meses atrás
pai
commit
7de8f05230
1 ficheiros alterados com 0 adições e 16 exclusões
  1. 0 16
      main.js

+ 0 - 16
main.js

@@ -423,25 +423,9 @@ app.get("/getSingle", function (req, res) {
                 res.contentType("application/json");
                 res.header("Access-Control-Allow-Origin", "*");
                 res.header("Access-Control-Allow-Headers", "Content-Type");
-                if (rows[0] !== undefined) {
-                    if (rows[0].albumcover !== null) {
-                        if (!fs.existsSync("tmp")) {
-                            fs.mkdirSync("tmp")
-                        }
-                        fs.writeFileSync("tmp/" + uuid, rows[0].albumcover);
-                        await webp.cwebp("tmp/" + uuid, "tmp/" + uuid + ".webp", "-q 50 -mt", "-v")
-                        rows[0].albumcover = fs.readFileSync("tmp/" + uuid + ".webp")
-
-                    }
-                }
 
                 res.end(JSON.stringify(rows[0]));
-                try {
-                    fs.rmSync("tmp/" + uuid)
-                    fs.rmSync("tmp/" + uuid + ".webp")
-                } catch (err) {
 
-                }
 
             })
         } else