diff --git a/scripts/dvd.video.read.sh b/scripts/dvd.video.read.sh index f39bd09..f11138f 100755 --- a/scripts/dvd.video.read.sh +++ b/scripts/dvd.video.read.sh @@ -2,8 +2,6 @@ . $(dirname $0)/common.sh -setenv status "scanning" - log "Scanning for DVD title" title=$(dvdbackup -I | awk -F \" '/DVD with title/ {print $2}') setenv title "$title" diff --git a/www/index.html b/www/index.html index 59474a9..1074198 100644 --- a/www/index.html +++ b/www/index.html @@ -17,16 +17,18 @@
- Reader: - unknown - -
-- Encoder: - unknown - -
++ unknown + +
++ + +
+ --filename-- diff --git a/www/status.json b/www/status.json index ba1b9e3..6d6c039 100644 --- a/www/status.json +++ b/www/status.json @@ -1,5 +1,11 @@ { "comment": "This file will be overwritten during runtime. It's only here for testing.", + "queue": [ + { + "title": "The Fluffet Movie", + "complete": "47" + } + ], "finished": { "video": [ "Video 1.mkv", diff --git a/www/sucker.mjs b/www/sucker.mjs index d04907c..069ddb8 100644 --- a/www/sucker.mjs +++ b/www/sucker.mjs @@ -5,7 +5,7 @@ async function update() { let resp = await fetch("status.json", {cache: "no-store"}) let s = await resp.json() - for (let activity of ["reader", "encoder"]) { + for (let activity of ["reader"]) { let val = s.status[activity] let e = document.querySelector(`.status .${activity}`) let txt = e.querySelector(".text") @@ -19,6 +19,16 @@ async function update() { } } + let qtmpl = document.querySelector("template.encoder-item").content + let qelem = document.querySelector(".encoder") + while (qelem.firstChild) qelem.firstChild.remove() + for (let qitem of s.queue) { + let e = qtmpl.cloneNode(true) + e.querySelector(".encoder-title").textContent = qitem.title + e.querySelector("progress").value = qitem.complete + qelem.append(e) + } + let fileItem = document.querySelector("template.panel-file-item").content for (let section of ["video", "audio"]) {