Small changes
This commit is contained in:
parent
69bb361fa7
commit
1dd426025f
5
app.js
5
app.js
@ -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);
|
||||
|
@ -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'
|
||||
});
|
||||
|
9
main.js
9
main.js
@ -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', () => {
|
||||
|
@ -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": [
|
||||
|
BIN
public/icon.png
BIN
public/icon.png
Binary file not shown.
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 20 KiB |
@ -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
BIN
resources/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
BIN
resources/icons/64x64.png
Normal file
BIN
resources/icons/64x64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Loading…
x
Reference in New Issue
Block a user