This commit is contained in:
alejo committed 2026-04-23 20:02:37 -03:00
1 parent a490152a99
commit 3c29b483c7
5 files changed
+100 -35

No files matched your search

+6 -3
View File
@@ -6,6 +6,9 @@ let currentFetchController = null;
let availableFormats = { audio: [], video: [] };
const TEXT_DOWNLOADING = "Descargando...";
const TEXT_DOWNLOAD = "Descargar";
const TEXT_COMPLETED = "Completed";
// ---------------------------------------------------------------------------
// Only fire /info when the input looks like a real supported URL.
// ---------------------------------------------------------------------------
@@ -134,7 +137,7 @@ async function startDownload() {
document.getElementById('download-btn-wrap').style.display = 'none';
document.getElementById('progress-box').classList.add('visible');
document.getElementById('progress-label').textContent = 'Downloading...';
document.getElementById('progress-label').textContent = TEXT_DOWNLOADING;
document.getElementById('progress-fill').style.width = '0%';
document.getElementById('prog-pct').textContent = '0%';
document.getElementById('prog-speed').textContent = '';
@@ -169,7 +172,7 @@ function pollStatus(jobId) {
if (data.status === 'done') {
clearInterval(pollTimer);
document.getElementById('progress-label').textContent = 'Complete!';
document.getElementById('progress-label').textContent = TEXT_COMPLETED;
document.getElementById('prog-speed').textContent = '';
showStatus('✓ Download ready: ' + (data.title || 'file'), 'success');
document.getElementById('dl-link').href = '/file/' + jobId;
@@ -188,7 +191,7 @@ function pollStatus(jobId) {
function resetBtn() {
const btn = document.getElementById('start-btn');
btn.disabled = false; btn.innerHTML = 'Download';
btn.disabled = false; btn.innerHTML = TEXT_DOWNLOAD;
}
// ---------------------------------------------------------------------------