ready to test...

This commit is contained in:
Neale Pickett 2022-01-09 17:14:59 -07:00
parent 5d0c35e78c
commit 63114c469a
4 changed files with 35 additions and 13 deletions

View File

@ -2,8 +2,6 @@
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
setenv status "scanning"
log "Scanning for DVD title" log "Scanning for DVD title"
title=$(dvdbackup -I | awk -F \" '/DVD with title/ {print $2}') title=$(dvdbackup -I | awk -F \" '/DVD with title/ {print $2}')
setenv title "$title" setenv title "$title"

View File

@ -17,16 +17,18 @@
<div class="card-header-title">Status</div> <div class="card-header-title">Status</div>
</div> </div>
<div class="card-content"> <div class="card-content">
<p class="reader"> <div class="block">
Reader: <h2 class="subtitle">Reader</h2>
<span class="text">unknown</span> <p class="reader">
<progress class="progress is-primary" max="100" value="0"></progress> <span class="text">unknown</span>
</p> <progress class="progress is-primary" max="100" value="0"></progress>
<p class="encoder"> </p>
Encoder: </div>
<span class="text">unknown</span>
<progress class="progress is-primary" max="100" value="0"></progress> <div class="block">
</p> <h2 class="subtitle">Encoder</h2>
<div class="encoder"></div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -48,6 +50,12 @@
<div> <div>
</div> </div>
</section> </section>
<template class="encoder-item">
<p>
<span class="encoder-title"></span>
<progress class="progress is-primary" max="100" value="0"></progress>
</p>
</template>
<template class="panel-file-item"> <template class="panel-file-item">
<a class="panel-block"> <a class="panel-block">
<span class="filename">--filename--</span> <span class="filename">--filename--</span>

View File

@ -1,5 +1,11 @@
{ {
"comment": "This file will be overwritten during runtime. It's only here for testing.", "comment": "This file will be overwritten during runtime. It's only here for testing.",
"queue": [
{
"title": "The Fluffet Movie",
"complete": "47"
}
],
"finished": { "finished": {
"video": [ "video": [
"Video 1.mkv", "Video 1.mkv",

View File

@ -5,7 +5,7 @@ async function update() {
let resp = await fetch("status.json", {cache: "no-store"}) let resp = await fetch("status.json", {cache: "no-store"})
let s = await resp.json() let s = await resp.json()
for (let activity of ["reader", "encoder"]) { for (let activity of ["reader"]) {
let val = s.status[activity] let val = s.status[activity]
let e = document.querySelector(`.status .${activity}`) let e = document.querySelector(`.status .${activity}`)
let txt = e.querySelector(".text") 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 let fileItem = document.querySelector("template.panel-file-item").content
for (let section of ["video", "audio"]) { for (let section of ["video", "audio"]) {