Add Library and Transcode Options

This commit is contained in:
Samuel Lorch 2024-06-22 21:01:20 +02:00
parent cdc94d551d
commit 249a415cee
12 changed files with 134 additions and 20 deletions

View file

@ -3,15 +3,25 @@
<table>
<tr>
<th>ID</th>
<th>Enabled</th>
<th>Name</th>
<th>Path</th>
<th>Enabled</th>
<th>TranscodeReplace</th>
<th>TranscodePath</th>
<th>ScanNewQueueHealth</th>
<th>ScanChangedQueueHealth</th>
<th>ScanNewQueueTranscode</th>
<th>ScanChangedQueueTranscode</th>
<th>HealthOkQueueTranscode</th>
</tr>
{{range $l := .Libraries}}
<tr onclick="window.location='/libraries/{{ $l.ID }}';">
<td>
{{ $l.ID }}
</td>
<td>
{{ $l.Enable }}
</td>
<td>
{{ $l.Name }}
</td>
@ -19,7 +29,25 @@
{{ $l.Path }}
</td>
<td>
{{ $l.Enable }}
{{ $l.TranscodeReplace }}
</td>
<td>
{{ $l.TranscodePath }}
</td>
<td>
{{ $l.ScanNewQueueHealth }}
</td>
<td>
{{ $l.ScanChangedQueueHealth }}
</td>
<td>
{{ $l.ScanNewQueueTranscode }}
</td>
<td>
{{ $l.ScanChangedQueueTranscode }}
</td>
<td>
{{ $l.HealthOkQueueTranscode }}
</td>
</tr>
{{end}}
@ -27,12 +55,26 @@
<h2>New Library</h2>
<form method="POST">
<label>Enable:</label>
<input type="checkbox" name="enable">
<label>Name:</label>
<input type="text" name="name">
<label>Path:</label>
<input type="text" name="path">
<label>Enable:</label>
<input type="checkbox" name="enable">
<label>Transcode Replace:</label>
<input type="checkbox" name="transcode_replace">
<label>Transcode Path:</label>
<input type="text" name="transcode_path">
<label>Queue Heathcheck for new files on Scan:</label>
<input type="checkbox" name="scan_new_queue_health">
<label>Queue Heathcheck for changed files on Scan:</label>
<input type="checkbox" name="scan_changed_queue_health">
<label>Queue Transcode for new files on Scan:</label>
<input type="checkbox" name="scan_new_queue_transcode">
<label>Queue Transcode for changed files on Scan:</label>
<input type="checkbox" name="scan_changed_queue_transcode">
<label>Queue Transcode on Healthcheck Success:</label>
<input type="checkbox" name="health_ok_queue_transcode">
<input type="submit" value="Submit">
</form>
{{template "tail"}}

View file

@ -3,6 +3,8 @@
<p>{{if .Library.Enable}}Enabled{{else}}Disabled{{end}}</p>
<h2>Files</h2>
<form method="POST" action="/scan/{{.Library.ID}}">
<label>Full:</label><br />
<input type="checkbox" name="full"><br />
<input value="Scan" type="submit">
</form>
<div class="file-list">
@ -13,6 +15,7 @@
<th>Size</th>
<th>Status</th>
<th>Health</th>
<th>Transcode</th>
<th>MD5</th>
<th>Updated At</th>
</tr>
@ -33,6 +36,9 @@
<td>
{{ $f.Health }}
</td>
<td>
{{ $f.Transcode }}
</td>
<td>
{{ $f.MD5 }}
</td>

View file

@ -17,6 +17,7 @@
<label for="type">Type</label>
<select id="type" name="type">
<option value="0">Health Check</option>
<option value="1">Transcode</option>
</select>
<input type="submit" value="Submit">
</form>