diff --git a/index.js b/index.js index cec4fac..446003c 100644 --- a/index.js +++ b/index.js @@ -9,21 +9,17 @@ const app = express() app.get("/download", (req, res) => { const filename = req.query.filename const url = req.query.url - const format= req.query.format + const format = req.query.format const quality = req.query.quality - - if ((filename === 'string' && url === 'string' && format === 'string' && quality === 'string')) { - res.header('Content-Disposition', `attachment; filename="${filename}.${format}"`); - ytdl(url, {'format': format, 'quality': quality}).pipe(res); - } else { - res.send('Please input proper values in all fields.') - } + + res.header('Content-Disposition', `attachment; filename="${filename}.${format}"`); + ytdl(url, { 'format': format, 'quality': quality }).pipe(res); }); app.use(express.static(path.join(__dirname, 'static'))) -app.listen(PORT, function() { +app.listen(PORT, function () { console.log("Hosted on port " + PORT) }) \ No newline at end of file diff --git a/static/index.html b/static/index.html index ab07d88..d365710 100644 --- a/static/index.html +++ b/static/index.html @@ -6,46 +6,51 @@ - - - + +
v1.0
Thank you, please consider donating so that I may pay for hosting costs! (Or, you may also help me out by + hosting it yourself instead of using this site! (Check github for more details)
Check out the Github page to + learn how to host it yourself, how it works, report bugs, and more.