diff --git a/.gitignore b/.gitignore index a7476f5..207fee9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ release package-lock.json test.js .directory +todo.txt \ No newline at end of file diff --git a/app.js b/app.js index 666040f..abe856a 100644 --- a/app.js +++ b/app.js @@ -1,8 +1,3 @@ -//! Todo -//! Filename needs to be filtered -//! File size needs to be modified -//! Scrollbar needs to be customized - const express = require("express"); const app = express(); const http = require("http"); @@ -203,6 +198,9 @@ app.post("/download", async (req, res) => { ytdl(url, { quality: itag }) .on("progress", (_, downloaded, size) => { const progress = (downloaded / size) * 100; + if (progress == 100){ + io.to(socketId).emit("saved", `${downloadDir}`); + } io.sockets .to(req.cookies.id) .emit("audioProgress", progress); diff --git a/package.json b/package.json index 2739633..c6c15eb 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,10 @@ "publish-linux":"rm -rf ./node_modules && electron-builder -l --publish=always", "publish-windows":"rm -rf ./node_modules && electron-builder -w --publish=always" }, - "author": "Andrew", + "author": { + "name": "Andrew", + "email": "aandrew.me@pm.me" + }, "license": "MIT", "description": "Download videos and audios from YouTube", "devDependencies": {