Fixed links and loading times and saerch bar!

This commit is contained in:
Violet 2023-10-29 00:21:22 -05:00
parent 9126a9f1c3
commit 1aa6748c3b
5 changed files with 12 additions and 10 deletions

View file

@ -59,6 +59,7 @@ app.get("/search", async (req, res) => {
<div class="col-md-4 col-lg-6 thumbparent">
<a class="videoLink" href="/watch?q=${result.id}">
<img class="thumbnail" src="${result.thumbnail}; /Images/UnknownVideo.jpg">
<p style="display: block; text-align: left;">${result.durationString}</p>
</a>
</div>
<div class="col-md-8 col-lg-6">
@ -67,7 +68,8 @@ app.get("/search", async (req, res) => {
<p class="resultDescription">${result.description.substring(0, 75) + "..." || "No Description"}</p>
</a>
</div>
<div style="display: block; width: 100%; ">
<div style="display: inline-block; width: 100%; ">
<a style="color: white; margin: 10px; display: inline-block;" href="${result.channel.link}">
<img src="${result.channel.thumbnail}; /Images/UnknownPFP.jpg" class="minipfp">
${result.channel.name}
@ -142,7 +144,7 @@ app.get("/video", async (req, res) => {
var dp = 0
ytdl(id, { filter: 'videoandaudio', quality: "highest", format: 'mp4' })
.on("progress", (chunk, ct, et) => {
if (debounce && ct > Math.min(et, 5000000)) {
if (debounce && (ct / et) > 0.05) {
debounce = false
videoCache[id] = {
"path": vidpath,

View file

@ -15,10 +15,10 @@
<body>
<div id="titleBar" class="row container-fluid">
<div class="col-sm-5">
<div class="col-6">
<h1><a href="/">Simpletube</a></h1>
</div>
<div class="col-sm-7">
<div class="col-6">
<form action="/search">
<input type="text" placeholder="Search" name="q">
</form>

View file

@ -14,10 +14,10 @@
<body>
<div id="titleBar" class="row container-fluid">
<div class="col-5">
<div class="col-6">
<h1><a href="/">Simpletube</a></h1>
</div>
<div class="col-7">
<div class="col-6">
<form action="/search">
<input type="text" placeholder="Search" name="q" value="{SEARCH}">
</form>

View file

@ -14,10 +14,10 @@
<body>
<div id="titleBar" class="row container-fluid">
<div class="col-sm-5">
<div class="col-6">
<h1><a href="/">Simpletube</a></h1>
</div>
<div class="col-sm-7">
<div class="col-6">
<form action="/search">
<input type="text" placeholder="Search" name="q">
</form>
@ -33,7 +33,7 @@
<h2>More about the project: <br></h2>
<p>
<a href="https://github.com/Violets-puragtory/SimpleTube">Github</a>
<a href="violets-purgatory.dev">The developer</a>
<a href="https://violets-purgatory.dev">The developer</a>
</p>
</main>

View file

@ -121,7 +121,7 @@ p {
margin: auto;
text-align: left;
height: 100%;
overflow: hidden;
}
@media (max-width: 768px) {