Updated the client
This commit is contained in:
@@ -5,6 +5,11 @@ let Socket = io();
|
|||||||
console.log('Starting up');
|
console.log('Starting up');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
function DownloadButtonPressed(format, id)
|
||||||
|
{
|
||||||
|
alert(`${format} ${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
const VideoInput = document.getElementById('VideosToRecord');
|
const VideoInput = document.getElementById('VideosToRecord');
|
||||||
|
|
||||||
VideoInput.oninput = () =>
|
VideoInput.oninput = () =>
|
||||||
|
|||||||
@@ -34,19 +34,42 @@ h {
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
#VideoContainer {
|
.table {
|
||||||
padding: 30px, 0px, 30px, 0px;
|
width: 60%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#VideoBox {
|
.thumbnail {
|
||||||
padding-top: 10px;
|
max-width: 150%;
|
||||||
font-weight: lighter;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Updater {
|
.videotitle {
|
||||||
position: absolute;
|
font-size: 1rem;
|
||||||
top: 5px;
|
}
|
||||||
right: 10px;}
|
|
||||||
|
.channel {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.views {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desc {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
display: inline-block;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow: hidden;
|
||||||
|
line-height: 1.2em;
|
||||||
|
max-height: 2.4em;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.downloadbuttons {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#copyright {
|
#copyright {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -43,20 +43,32 @@ function ResolvedBasic(BasicResolution)
|
|||||||
|
|
||||||
function VideoElement(id, title, desc, views, thumbnail, channel, runtime)
|
function VideoElement(id, title, desc, views, thumbnail, channel, runtime)
|
||||||
{
|
{
|
||||||
// assumes the div has already been created
|
|
||||||
|
|
||||||
|
// format views so theres commas
|
||||||
|
// in it ennit - Will is a stupid
|
||||||
|
// "Fuck you, of course it's a string" - b_boy_ww 2020
|
||||||
|
views = parseInt(views);
|
||||||
|
views = views.toLocaleString('en-US');
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<table>
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="3"><a href="https://www.youtube.com/watch?v=${id}"><img src="${thumbnail}"></a></td>
|
<td rowspan="4" class="thumbnail"><a href="https://www.youtube.com/watch?v=${id}"><img src="${thumbnail}"></a></td>
|
||||||
<td colspan="3">${title}</td>
|
<td colspan="4" class="videotitle">${title}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>${channel}</td>
|
<td class="channel">${channel}</td>
|
||||||
<td>${views}</td>
|
<td class="views">${views} views</td>
|
||||||
<td>${runtime}</td>
|
<td></td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3">${desc}</td>
|
<td colspan="4" class="desc">${desc}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="downloadbuttons"><button onclick="DownloadButtonPressed('MP4(MAX)', ${id})">Download Video</button> </td>
|
||||||
|
<td colspan="2" class="downloadbuttons"><button onclick="DownloadButtonPressed('MP3(MAX)', ${id})">Download Audio</button> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ module.exports.Load = () =>
|
|||||||
ListenPort: 8080,
|
ListenPort: 8080,
|
||||||
PublicDirectory: 'public',
|
PublicDirectory: 'public',
|
||||||
StorageDirectory: './tmp/',
|
StorageDirectory: './tmp/',
|
||||||
CacheCleanInterval: 30000, // 5 mins
|
CacheCleanInterval: 300000, // 5 mins
|
||||||
CacheTimeToUse: 60000, // 10 mins
|
CacheTimeToUse: 600000, // 10 mins
|
||||||
}
|
}
|
||||||
Logger.Log('Configuration loaded');
|
Logger.Log('Configuration loaded');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user