This commit is contained in:
DeSqBlocki committed 2025-12-06 13:01:10 +01:00
1 parent b9d2f99c3b
commit ed58376600
18 files changed
+2349 -2

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
<%- include("partials/header") %>
<div class="alert alert-danger mt-4">
<h4>Error</h4>
<p>
<%= message %>
</p>
<% if (details) { %>
<pre class="bg-dark text-white p-3 mt-3"><%= details %></pre>
<% } %>
<a href="/" class="btn btn-danger mt-3">Return to Home</a>
</div>
<%- include("partials/footer") %>
+99
View File
@@ -0,0 +1,99 @@
<%- include("partials/header") %>
<div class="card card-dark p-4">
<div class="d-flex justify-content-center mb-3">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="modeToggle">
<label class="form-check-label text-muted" for="modeToggle" id="modeLabel">Series</label>
</div>
</div>
<form method="POST" action="/queue" id="jobForm">
<input type="hidden" name="mode" id="modeInput" value="series">
<!-- SERIES FIELDS -->
<div id="seriesFields">
<div class="mb-3">
<label class="form-label">Series ID</label>
<input class="form-control" name="id" placeholder="12345">
</div>
<!-- UPDATED: EPISODE RANGE (FROM / TO) -->
<div class="mb-3">
<label class="form-label">Episode Range</label>
<div class="row">
<div class="col">
<input class="form-control" name="episode_from" placeholder="From (e.g. 1)">
</div>
<div class="col">
<input class="form-control" name="episode_to" placeholder="To (e.g. 12)">
</div>
</div>
</div>
<div class="mb-3">
<label class="form-label">Language</label>
<select class="form-select" name="language">
<option value="engsub">engsub</option>
<option value="engdub">engdub</option>
<option value="gersub">gersub</option>
<option value="gerdub">gerdub</option>
</select>
</div>
<div class="mb-3">
<label class="form-label">Name (optional)</label>
<input class="form-control" name="name" placeholder="OnePiece_1_engsub">
</div>
</div>
<!-- VIDEO FIELDS -->
<div id="videoFields" style="display:none">
<div class="mb-3">
<label class="form-label">Video URL</label>
<input class="form-control" name="url" placeholder="https://proxer.me/watch/...">
</div>
<div class="mb-3">
<label class="form-label">Filename (optional)</label>
<input class="form-control" name="filename" placeholder="MyVideo.mp4">
</div>
</div>
<!-- TOKEN -->
<div class="mb-3">
<label class="form-label">Token suffix</label>
<input class="form-control" name="token" placeholder="user-token">
<div class="form-text">Full token = TOKEN_PREFIX + this value</div>
</div>
<div class="d-flex justify-content-between">
<button class="btn btn-danger">Queue Download</button>
<a class="btn btn-outline-light" href="/status">View Queue</a>
</div>
</form>
</div>
<script>
const toggle = document.getElementById('modeToggle');
const modeLabel = document.getElementById('modeLabel');
const modeInput = document.getElementById('modeInput');
const seriesFields = document.getElementById('seriesFields');
const videoFields = document.getElementById('videoFields');
toggle.addEventListener('change', () => {
if (toggle.checked) {
modeLabel.innerText = 'Video';
modeInput.value = 'video';
seriesFields.style.display = 'none';
videoFields.style.display = '';
} else {
modeLabel.innerText = 'Series';
modeInput.value = 'series';
seriesFields.style.display = '';
videoFields.style.display = 'none';
}
});
</script>
<%- include("partials/footer") %>
+5
View File
@@ -0,0 +1,5 @@
<footer class="mt-5 small">Built by DeSqBlocki</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
+18
View File
@@ -0,0 +1,18 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Proxer-Downloader</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="/style.css">
</head>
<body>
<div class="container py-4">
<header class="d-flex justify-content-between align-items-center mb-4">
<h1>Proxer-Downloader</h1>
<nav>
<a class="btn btn-outline-light" href="/">Home</a>
<a class="btn btn-outline-light" href="/status">Status</a>
</nav>
</header>
+91
View File
@@ -0,0 +1,91 @@
<%- include("partials/header") %>
<div class="row">
<!-- ======================= -->
<!-- QUEUED -->
<!-- ======================= -->
<div class="col-md-4">
<h3>Queued</h3>
<ul class="list-group">
<% queued.forEach(job => { %>
<li class="list-group-item">
<strong><%= job.filename %></strong><br>
<small><%= job.url %></small><br>
<small><%= new Date(job.created_at).toLocaleString() %></small>
</li>
<% }) %>
<% if (queued.length === 0) { %>
<li class="list-group-item">No pending downloads</li>
<% } %>
</ul>
</div>
<!-- ======================= -->
<!-- DONE -->
<!-- ======================= -->
<div class="col-md-4">
<h3 class="text-success">Done</h3>
<ul class="list-group">
<% finished.forEach(job => { %>
<li class="list-group-item">
<strong class="text-success"><%= job.filename %></strong><br>
<small><%= new Date(job.finished_at).toLocaleString() %></small><br>
<% if (job.output_log) { %>
<details class="mt-2">
<summary class="text-light">Show Log</summary>
<pre style="background:#222; color:#e0e0e0; padding:10px; border-radius:5px; white-space:pre-wrap;">
<%= job.output_log %>
</pre>
</details>
<% } %>
</li>
<% }) %>
<% if (finished.length === 0) { %>
<li class="list-group-item">No completed downloads</li>
<% } %>
</ul>
</div>
<!-- ======================= -->
<!-- FAILED -->
<!-- ======================= -->
<div class="col-md-4">
<h3 class="text-danger">Failed</h3>
<ul class="list-group">
<% failed && failed.forEach(job => { %>
<li class="list-group-item">
<strong class="text-danger"><%= job.filename %></strong><br>
<small><%= new Date(job.failed_at).toLocaleString() %></small><br>
<% if (job.output_log) { %>
<details class="mt-2">
<summary class="text-danger">Show Error Log</summary>
<pre style="background:#330000; color:#ffb3b3; padding:10px; border-radius:5px; white-space:pre-wrap;">
<%= job.output_log %>
</pre>
</details>
<% } %>
</li>
<% }) %>
<% if (!failed || failed.length === 0) { %>
<li class="list-group-item">No failed jobs</li>
<% } %>
</ul>
</div>
</div>
<%- include("partials/footer") %>