INNER CODE UNIT · JavaScript

phaseText

LeyckerS/moondownloader · web/app.js:420

function phaseText(m) {
  const parts = [];
  if (m.stage === "idle") parts.push(T("ph_idle"));
  else if (m.stage === "extracting") parts.push(T("ph_extract", m.extract_done, m.extract_total, m.dl_done, m.dl_total, m.active));
  else if (m.stage === "downloading") parts.push(T("ph_download", m.dl_done, m.dl_total, m.active));
  else parts.push(T("ph_done"));
  const gb = (m.bytes_total || 0) / 1e9;
  if (gb >= 0.01) parts.push(`${gb.toFixed(2)} GB`);
  if (m.elapsed_s > 0 && m.stage !== "idle") parts.push(fmtClock(m.elapsed_s));
  return parts.join("  ·  ");
}

/* ── metrics ──────────────────────────────────────────────────────────── */
function renderMetrics(m, relabelOnly = false) {
  ui.lastMetrics = m;
  const speed = m.speed_mbs || 0;
  const [, su] = fmtSpeed(speed);
  const vSpeed = $("#vSpeed");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…