Added support for custom download location
Optimization improvements and bug fixespull/9/head
							parent
							
								
									1c7907d80a
								
							
						
					
					
						commit
						071855f9af
					
				@ -0,0 +1,24 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
<head>
 | 
			
		||||
    <meta charset="UTF-8">
 | 
			
		||||
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
			
		||||
    <title>About</title>
 | 
			
		||||
    <link rel="stylesheet" href="extra.css">
 | 
			
		||||
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    <a href="/" 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>
 | 
			
		||||
 | 
			
		||||
    <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>Source Code is available <a target="_blank" href="https://github.com/aandrew-me/ytDownloader">here</a></p>
 | 
			
		||||
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
@ -0,0 +1,49 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
<head>
 | 
			
		||||
    <meta charset="UTF-8">
 | 
			
		||||
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
			
		||||
    <title>Preferences</title>
 | 
			
		||||
    <link rel="stylesheet" href="extra.css">
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    <a href="/" id="back">Home</a>
 | 
			
		||||
    <h1>Preferences</h1>
 | 
			
		||||
    <p>1. Download location (Full path without quotation marks)</p>
 | 
			
		||||
    <input type="text" id="savePath" placeholder="Full path without quotation marks">
 | 
			
		||||
 | 
			
		||||
    <button id="save">Save</button>
 | 
			
		||||
 | 
			
		||||
    <p id="msg"></pid>
 | 
			
		||||
 | 
			
		||||
    <script src="/socket.io/socket.io.js"></script>
 | 
			
		||||
    <script>
 | 
			
		||||
        function getId(id){
 | 
			
		||||
            return document.getElementById(id)
 | 
			
		||||
        }
 | 
			
		||||
        let socket = io()
 | 
			
		||||
 | 
			
		||||
        socket.emit("downloadPath")
 | 
			
		||||
 | 
			
		||||
        socket.on("downloadPath", (message)=>{
 | 
			
		||||
            const path = message
 | 
			
		||||
            getId("savePath").value = message
 | 
			
		||||
        })
 | 
			
		||||
 | 
			
		||||
        getId("save").addEventListener("click", ()=>{
 | 
			
		||||
            const newPath = getId("savePath").value 
 | 
			
		||||
            socket.emit("newPath", newPath)
 | 
			
		||||
        })
 | 
			
		||||
 | 
			
		||||
        socket.on("pathSaved", (saved)=>{
 | 
			
		||||
            if (saved){
 | 
			
		||||
                getId("msg").textContent = "Location Saved successfully"
 | 
			
		||||
            }
 | 
			
		||||
            else{
 | 
			
		||||
                getId("msg").textContent = "Not saved, some error has occured."
 | 
			
		||||
            }
 | 
			
		||||
        })
 | 
			
		||||
    </script>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
@ -0,0 +1,44 @@
 | 
			
		||||
body{
 | 
			
		||||
    background-color: rgb(50,50,50);
 | 
			
		||||
    color:whitesmoke;
 | 
			
		||||
    padding:20px;
 | 
			
		||||
    font-size: x-large;
 | 
			
		||||
    text-align: left;
 | 
			
		||||
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
h1{
 | 
			
		||||
    margin-top:0;
 | 
			
		||||
}
 | 
			
		||||
input[type="text"]{
 | 
			
		||||
    padding:10px;
 | 
			
		||||
    border-radius: 5px;
 | 
			
		||||
    outline: none;
 | 
			
		||||
    border:none;
 | 
			
		||||
    width:60%;
 | 
			
		||||
}
 | 
			
		||||
#save{
 | 
			
		||||
    padding:10px;
 | 
			
		||||
    border-radius: 8px;
 | 
			
		||||
    border:none;
 | 
			
		||||
    color:rgb(255, 255, 255);
 | 
			
		||||
    background-color: rgb(56, 209, 56);
 | 
			
		||||
    cursor: pointer;
 | 
			
		||||
}
 | 
			
		||||
#save:active{
 | 
			
		||||
    background-color: rgb(41, 155, 41);
 | 
			
		||||
}
 | 
			
		||||
#back{
 | 
			
		||||
    text-decoration: none;
 | 
			
		||||
    padding:8px;
 | 
			
		||||
    border-radius: 8px;
 | 
			
		||||
    background-color: rgb(51, 177, 219);
 | 
			
		||||
    color:white;
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    top:15px;
 | 
			
		||||
    right:15px;
 | 
			
		||||
    font-size: large;
 | 
			
		||||
}
 | 
			
		||||
a{
 | 
			
		||||
    color:rgb(34, 136, 199);
 | 
			
		||||
}
 | 
			
		||||
											
												Binary file not shown.
											
										
									
								| 
		 After Width: | Height: | Size: 11 KiB  | 
					Loading…
					
					
				
		Reference in New Issue