Lightweight node app to use in place of plex to self host your video and movie collections. Running on just under 50MB of ram this is ideal for people looking to host videos on minimal hardware.
您最多能選擇 25 個主題 主題必須以字母或數字為開頭,可包含連接號 ('-') 且最長為 35 個字。
 
 
 
 

52 行
1.4 KiB

<h1 class="text-center">Videos</h1>
<input id="videoFilter" class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<table class="table table-striped">
<thead class="thead-dark">
<tr>
<td>Name</td>
<td>Icon</td>
<td>Watch</td>
</tr>
</thead>
<tbody id="movieTable">
{for video in videos}
<tr class="table_row">
<td>{video.name}</td>
<td><img src="/icon?v={video.name}" alt="Icon for {video.name}" height = 60px/></td>
<td>
<a href="/watch?v={video.name}" class="btn btn-secondary active" role="button" aria-pressed="true">View</a>
</td>
</tr>
{/for}
</tbody>
</table>
<script>
function filterTable()
{
var input = $("input#videoFilter").val().toLowerCase();
$(".table_row").css({"display": "none"});
$(".table_row").each(function(index)
{
if($(this).text().toLowerCase().includes(input))
{
$(this).toggle(true);
//$(this).css({"display": "none"});
}
});
if(input.toString().split(" ").join("") === "")
{
$(".satellite_row").toggle(true);
}
}
$(document).ready(function()
{
$("input#videoFilter").bind("keyup", filterTable);
});
</script>