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">
|
<div class="col-md-4 col-lg-6 thumbparent">
|
||||||
<a class="videoLink" href="/watch?q=${result.id}">
|
<a class="videoLink" href="/watch?q=${result.id}">
|
||||||
<img class="thumbnail" src="${result.thumbnail}; /Images/UnknownVideo.jpg">
|
<img class="thumbnail" src="${result.thumbnail}; /Images/UnknownVideo.jpg">
|
||||||
|
<p style="display: block; text-align: left;">${result.durationString}</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8 col-lg-6">
|
<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>
|
<p class="resultDescription">${result.description.substring(0, 75) + "..." || "No Description"}</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</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}">
|
<a style="color: white; margin: 10px; display: inline-block;" href="${result.channel.link}">
|
||||||
<img src="${result.channel.thumbnail}; /Images/UnknownPFP.jpg" class="minipfp">
|
<img src="${result.channel.thumbnail}; /Images/UnknownPFP.jpg" class="minipfp">
|
||||||
${result.channel.name}
|
${result.channel.name}
|
||||||
|
@ -142,7 +144,7 @@ app.get("/video", async (req, res) => {
|
||||||
var dp = 0
|
var dp = 0
|
||||||
ytdl(id, { filter: 'videoandaudio', quality: "highest", format: 'mp4' })
|
ytdl(id, { filter: 'videoandaudio', quality: "highest", format: 'mp4' })
|
||||||
.on("progress", (chunk, ct, et) => {
|
.on("progress", (chunk, ct, et) => {
|
||||||
if (debounce && ct > Math.min(et, 5000000)) {
|
if (debounce && (ct / et) > 0.05) {
|
||||||
debounce = false
|
debounce = false
|
||||||
videoCache[id] = {
|
videoCache[id] = {
|
||||||
"path": vidpath,
|
"path": vidpath,
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="titleBar" class="row container-fluid">
|
<div id="titleBar" class="row container-fluid">
|
||||||
<div class="col-sm-5">
|
<div class="col-6">
|
||||||
<h1><a href="/">Simpletube</a></h1>
|
<h1><a href="/">Simpletube</a></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-7">
|
<div class="col-6">
|
||||||
<form action="/search">
|
<form action="/search">
|
||||||
<input type="text" placeholder="Search" name="q">
|
<input type="text" placeholder="Search" name="q">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="titleBar" class="row container-fluid">
|
<div id="titleBar" class="row container-fluid">
|
||||||
<div class="col-5">
|
<div class="col-6">
|
||||||
<h1><a href="/">Simpletube</a></h1>
|
<h1><a href="/">Simpletube</a></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-7">
|
<div class="col-6">
|
||||||
<form action="/search">
|
<form action="/search">
|
||||||
<input type="text" placeholder="Search" name="q" value="{SEARCH}">
|
<input type="text" placeholder="Search" name="q" value="{SEARCH}">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="titleBar" class="row container-fluid">
|
<div id="titleBar" class="row container-fluid">
|
||||||
<div class="col-sm-5">
|
<div class="col-6">
|
||||||
<h1><a href="/">Simpletube</a></h1>
|
<h1><a href="/">Simpletube</a></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-7">
|
<div class="col-6">
|
||||||
<form action="/search">
|
<form action="/search">
|
||||||
<input type="text" placeholder="Search" name="q">
|
<input type="text" placeholder="Search" name="q">
|
||||||
</form>
|
</form>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<h2>More about the project: <br></h2>
|
<h2>More about the project: <br></h2>
|
||||||
<p>
|
<p>
|
||||||
<a href="https://github.com/Violets-puragtory/SimpleTube">Github</a>
|
<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>
|
</p>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -121,7 +121,7 @@ p {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
|
|
Loading…
Reference in a new issue