Further enhancements

pull/9/head
aandrew-me 3 years ago
parent b6e425b5c2
commit d36bba4b0e

@ -83,6 +83,7 @@ body {
text-align: left;
opacity: 1;
font-size: large;
z-index:2;
}
.menuItem {
color: white;
@ -150,6 +151,17 @@ body {
height:15px;
}
#closeHidden{
bottom:5px;
position: absolute;
right:5px;
cursor: pointer;
cursor: pointer;
width:15px;
height:15px;
}
#hidden {
display: none;
/* display: inline-block; */

@ -14,12 +14,10 @@
<a id="back">Home</a>
<h1>ytDownloader</h1>
<p>ytDownloader allows you to download videos of all resolutions provided by YouTube.
They can be downloaded in different encoding formats. The same goes for audio files.
<p>ytDownloader lets you download videos (and sometimes audios) from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on.
</p>
<p>It's a Free and Open Source app built on top of Node.js and Electron. ytdl-core has been used for downloading
from YouTube</p>
<p>It's a Free and Open Source app built on top of Node.js and Electron. yt-dlp has been used for downloading</p>
<p>Source Code is available <a id="sourceLink">here</a></p>

@ -46,7 +46,6 @@
<a id="aboutWin" class="menuItem">About</a>
</div>
<button id="pasteUrl" class="submitBtn">Click to paste video URL or ID [Ctrl + V]</button>
<div id="loadingWrapper">
@ -67,7 +66,7 @@
<p id="incorrectMsg"></p>
<div id="hidden">
<img src="../assets/images/close.png" alt="close" id="closeHidden">
<div id="btnContainer">
<button class="toggleBtn" id="videoToggle">Video</button>
<button class="toggleBtn" id="audioToggle">Audio</button>

@ -10,14 +10,13 @@
<body>
<a id="back">Home</a>
<h1>Preferences</h1>
<strong>Restart app for changes to take place</strong>
<p>1. Download location</p>
<p>Default location: <span id="path"></span></p>
<button id="selectLocation">Select Download Location</button>
<p id="msg"></pid>
<p>2. Enable transparent dark (only Linux) <input type="checkbox" id="enableTransparent"></p>
<p>2. Enable transparent dark (only Linux, needs restart) <input type="checkbox" id="enableTransparent"></p>
<script>
let downloadPath = localStorage.getItem("downloadPath")

File diff suppressed because it is too large Load Diff

@ -5,7 +5,7 @@
"yt-dlp-wrap": "^2.3.11"
},
"name": "ytdownloader",
"version": "2.1.0",
"version": "3.0.0",
"main": "main.js",
"scripts": {
"start": "electron .",

@ -23,15 +23,21 @@ function getId(id) {
return document.getElementById(id);
}
let localPath = localStorage.getItem("downloadPath");
function downloadPathSelection(){
let localPath = localStorage.getItem("downloadPath");
if (localPath) {
downloadDir = localPath;
} else {
downloadDir = appdir;
localStorage.setItem("downloadPath", appdir);
if (localPath) {
downloadDir = localPath;
} else {
downloadDir = appdir;
localStorage.setItem("downloadPath", appdir);
}
fs.mkdir(downloadDir, { recursive: true }, () => {});
}
fs.mkdir(downloadDir, { recursive: true }, () => {});
downloadPathSelection()
// Checking for yt-dlp
let ytDlp;
@ -105,6 +111,11 @@ function pasteUrl() {
getInfo(url);
}
getId("closeHidden").addEventListener("click", ()=>{
getId("hidden").style.display = "none";
getId("loadingWrapper").style.display = "none";
})
document.addEventListener("keydown", (event) => {
if (event.ctrlKey && event.key == "v") {
pasteUrl();
@ -117,6 +128,7 @@ getId("pasteUrl").addEventListener("click", () => {
// Getting video info
async function getInfo(url) {
downloadPathSelection()
getId("videoFormatSelect").innerHTML = "";
getId("audioFormatSelect").innerHTML = "";
let info;

Loading…
Cancel
Save