77 lines
3.5 KiB
HTML
77 lines
3.5 KiB
HTML
{{define "admin_settings"}}{{template "header" .}}
|
|
<div class="card" style="max-width: 600px;">
|
|
<div class="card-body">
|
|
<form method="post" action="/admin/settings">
|
|
{{template "csrf_field" .CSRFToken}}
|
|
<div class="mb-3">
|
|
<label class="form-label">Scan interval</label>
|
|
<input type="text" class="form-control" name="scan_interval" value="{{.Data.ScanInterval}}" placeholder="1h">
|
|
<div class="form-text">Go duration syntax, e.g. 30m, 1h, 6h.</div>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="form-label">ffmpeg path</label>
|
|
<input type="text" class="form-control" name="ffmpeg_path" value="{{.Data.FFmpegPath}}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="form-label">ffprobe path</label>
|
|
<input type="text" class="form-control" name="ffprobe_path" value="{{.Data.FFprobePath}}">
|
|
</div>
|
|
<button type="submit" class="btn btn-primary btn-sm">Save</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card mt-3" style="max-width: 600px;">
|
|
<div class="card-body">
|
|
<h2 class="h6">Artist photos</h2>
|
|
{{if .Data.ArtistPhotosEnabled}}
|
|
<p class="text-secondary small mb-2">
|
|
Fetch a photo (fanart.tv when an artist has a tagged MusicBrainz ID and a key is configured, otherwise a direct name search against Wikidata/Wikimedia Commons) for every artist with no manually-set photo. This never calls MusicBrainz itself, so it isn't affected by its rate limits — matching by name alone is less precise, though. This bypasses any previously-cached "not found" result, so it's a good way to retry after fixing a config or network issue.
|
|
</p>
|
|
{{else}}
|
|
<p class="text-secondary small mb-2">
|
|
Automatic background fetching is disabled (<code>VIBESONIC_ENABLE_ARTIST_PHOTOS=false</code>), but this button still runs a one-off fetch — useful for checking why photos aren't showing up.
|
|
</p>
|
|
{{end}}
|
|
<form method="post" action="/admin/settings/artist-photos/refresh">
|
|
{{template "csrf_field" .CSRFToken}}
|
|
<button type="submit" class="btn btn-sm btn-outline-primary">Fetch all artist photos now</button>
|
|
</form>
|
|
{{if .Data.ArtistPhotoResults}}
|
|
<table class="table table-sm vs-table mt-3 mb-0">
|
|
<thead><tr><th>Artist</th><th>Status</th><th>Error</th></tr></thead>
|
|
<tbody>
|
|
{{range .Data.ArtistPhotoResults}}
|
|
<tr>
|
|
<td>{{.ArtistName}}</td>
|
|
<td>
|
|
{{if .Error}}<span class="text-danger">{{.Status}}</span>
|
|
{{else if eq .Status "fetched"}}<span class="text-success">{{.Status}}</span>
|
|
{{else}}<span class="text-secondary">{{.Status}}</span>{{end}}
|
|
</td>
|
|
<td class="text-danger small">{{.Error}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card mt-3" style="max-width: 600px;">
|
|
<div class="card-body">
|
|
<h2 class="h6">External authentication</h2>
|
|
<p class="text-secondary small mb-2">
|
|
Configured via <code>VIBESONIC_EXTAUTH_*</code> environment variables (restart required to change).
|
|
</p>
|
|
<table class="table table-sm vs-table mb-0">
|
|
<tbody>
|
|
<tr><td>Enabled</td><td>{{if .Data.ExtAuthEnabled}}Yes{{else}}No{{end}}</td></tr>
|
|
<tr><td>Trusted sources</td><td>{{if .Data.ExtAuthTrustedSources}}{{.Data.ExtAuthTrustedSources}}{{else}}<span class="text-secondary">none configured</span>{{end}}</td></tr>
|
|
<tr><td>Header</td><td>{{.Data.ExtAuthHeader}}</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{{template "footer" .}}{{end}}
|