Small changes

This commit is contained in:
aandrew-me 2022-07-31 12:28:14 +06:00
parent 69bb361fa7
commit 1dd426025f
10 changed files with 20 additions and 7 deletions

5
app.js
View File

@ -70,6 +70,7 @@ fs.readFile(configPath, (err) => {
});
} else {
downloadDir = homedir + "/Videos/ytDownloader/";
fs.mkdirSync(homedir + "/Videos/ytDownloader/", { recursive: true });
}
});
@ -304,9 +305,9 @@ app.post("/download", async (req, res) => {
Promise.all([arr[0], arr[1]])
.then((response) => {
cp.exec(
`"${ffmpeg}" -i '${tempDir + videoName}' -i '${
`"${ffmpeg}" -i "${tempDir + videoName}" -i "${
tempDir + audioName
}' -c copy '${downloadDir + filename}'`,
}" -c copy "${downloadDir + filename}"`,
(error, stdout, stderr) => {
if (error) {
console.log(error);

View File

@ -150,7 +150,7 @@
})
socket.on("saved", (savedLocation) => {
const notify = new Notification('ytDownloaded', {
const notify = new Notification('ytDownloader', {
body: "File saved successfully.",
icon: 'icon.png'
});

View File

@ -5,7 +5,8 @@ require("./app.js")
function createWindow () {
const win = new BrowserWindow({
show:false
show:false,
icon:__dirname + "/public/icon.png"
})
win.loadURL("http://localhost:59876")
@ -15,12 +16,16 @@ function createWindow () {
app.whenReady().then(() => {
createWindow()
autoUpdater.checkForUpdatesAndNotify()
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
autoUpdater.checkForUpdatesAndNotify()
}
})
if (process.platform === 'win32')
{
app.setAppUserModelId(app.name);
}
})
app.on('window-all-closed', () => {

View File

@ -9,7 +9,7 @@
"ytdl-core": "^4.11.0"
},
"name": "ytdownloader",
"version": "1.5.4",
"version": "1.5.5",
"main": "main.js",
"scripts": {
"start": "electron .",
@ -32,6 +32,13 @@
"build": {
"productName": "YTDownloader",
"appId": "org.andrew.ytdownloader",
"files": [
"./resources/**/*",
"*.js",
"./html/**/*",
"./resources/**/*",
"./public/**/*"
],
"mac": {
"category": "Utility",
"target": [

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -100,7 +100,7 @@ function getInfo() {
const itag = format.itag;
if (pattern.test(format.audioCodec)) {
audioCodec = "m4a";
audioCodec = "mp4a";
} else {
audioCodec = format.audioCodec;
}

Binary file not shown.

BIN
resources/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
resources/icons/64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB