Fixed links and loading times and saerch bar!
This commit is contained in:
parent
9126a9f1c3
commit
1aa6748c3b
5 changed files with 12 additions and 10 deletions
6
index.js
6
index.js
|
@ -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,
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -121,7 +121,7 @@ p {
|
|||
margin: auto;
|
||||
text-align: left;
|
||||
height: 100%;
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
|
|
Loading…
Reference in a new issue