Errors!!!

This commit is contained in:
Bingus_Violet 2024-01-17 20:03:21 -06:00
parent 369cac20e6
commit a0778ef237
3 changed files with 14 additions and 5 deletions

View file

@ -72,6 +72,7 @@ app.get("/download", async (req, res) => {
ytdlpProcess.stderr.setEncoding('utf-8')
ytdlpProcess.stderr.on('data', (data) => {
console.log(data)
res.write(`<div class="error"><p>` + data + `</p></div>`)
})
var debounce = false
@ -98,7 +99,7 @@ app.get("/download", async (req, res) => {
res.write(`<iframe src="/convert?file=${fileName}&format=${format}"></iframe>"`)
res.write(downloadHTML.substring(downloadHTML.indexOf("{CONTENT}") + 9), () => {res.end()})
} else {
res.write("<p>An error has occured!!! We're not exactly sure what the error is, but we cant seem to find the download file.</p>")
res.write("<p>An error has occured!!! We're not exactly sure what the error is, but we cant seem to find the download file. Double check the URL, and if the URL is fine, then file an issue on codeberg. </p>")
console.log(filePath)
}
})