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)
}
})

View file

@ -12,7 +12,7 @@
</head>
<body>
<h1>Univerter <p>v3.2</p>
<h1>Univerter <p>v4.0</p>
<p style="color: lightgray">And still javascript free...</p>
<hr>
</h1>
@ -51,11 +51,11 @@
<input type="submit">
</form>
<br>
<p>Notes: </p>
<p>SD is 720p max, HD supports all qualities (even 4k!)</p>
<p>Univerter was designed for youtube, but if you need something different please consult <a target="_blank" href="https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md">this list</a> to see if your site is there. Be warned, though, they are all untested, so please report issues you encounter!</p>
<hr>
<p><a href="https://ko-fi.com/bingus_violet">Please consider donating</a> or host the website yourself! Anything
<p><a target="_blank" href="https://ko-fi.com/bingus_violet">Please consider donating</a> or host the website yourself! Anything
helps! (Check <a href="https://codeberg.org/Bingus_Violet/Univerter">Codeberg</a> for more info)</p>
<p>Powered by <a target="_blank" href="https://github.com/yt-dlp/yt-dlp/">yt-dlp</a></p>
</body>
</html>

View file

@ -61,4 +61,12 @@ input:hover {
accent-color: var(--primary-color);
width: 1.15rem;
height: 1.15rem;
}
.error {
background-color: rgb(50, 40, 70);
padding: 10px;
border: rgb(150, 50, 50) solid 2px;
border-radius: 15px;
display: inline-block;
}