Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aandrew-me committed Aug 23, 2022
1 parent 8b302e5 commit 5eb4e66
Show file tree
Hide file tree
Showing 3 changed files with 2,039 additions and 7 deletions.
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ytdl-core": "^4.11.0"
},
"name": "ytdownloader",
"version": "2.0.2",
"version": "2.0.3",
"main": "main.js",
"scripts": {
"start": "electron .",
Expand All @@ -30,7 +30,7 @@
"license": "MIT",
"description": "Download videos and audios from YouTube",
"devDependencies": {
"electron": "19.0.9",
"electron": "20.0.3",
"electron-builder": "^23.3.3"
},
"build": {
Expand Down Expand Up @@ -75,10 +75,14 @@
"linux": {
"target": [
"Appimage",
"deb"
"deb",
"snap"
],
"category": "Utility"
},
"snap":{
"compression":"lzo"
},
"win": {
"target": "nsis"
},
Expand Down
8 changes: 4 additions & 4 deletions src/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ const { shell, ipcRenderer, clipboard } = require("electron");

// Directories
const homedir = os.homedir();
const appdir = path.join(homedir, ".ytDownloader");
const tempDir = path.join(appdir, "temp");
fs.mkdirSync(path.join(homedir, ".ytDownloader/temp"), { recursive: true });
const appdir = path.join(homedir, "ytDownloader");
const tempDir = path.join(homedir,".ytDownloader", "temp");
fs.mkdirSync(tempDir, { recursive: true });
let config;

// Download directory
Expand All @@ -30,7 +30,7 @@ if (localPath) {
}

// Clearing tempDir
fs.readdirSync(tempDir).forEach((f) => fs.rmdir(`${tempDir}/${f}`, () => {}));
fs.readdirSync(tempDir).forEach((f) => fs.rmdir(`${tempDir}/${f}`, {recursive:true} ,() => {}));

// Collecting info from youtube
async function getVideoInfo(url) {
Expand Down
Loading

0 comments on commit 5eb4e66

Please sign in to comment.