{{ define "user" }}
stats
artists: {{ .ArtistCount }}
albums: {{ .AlbumCount }}
tracks: {{ .TrackCount }}
last.fm

gonic can scrobble to last.fm for any user (but the admin must set a global api key)

{{ if .CurrentLastFMAPIKey }} current status {{ if .User.LastFMSession }} linked |
{{ else }} unlinked {{ $cbPath := path "/admin/link_lastfm_do" }} {{ $cbURL := printf "%s%s" .RequestRoot $cbPath }} link… {{ end }} {{ else }}

api key not set

{{ if not .User.IsAdmin }}

please ask your admin to set it

{{ end }} {{ end }} {{ if .User.IsAdmin }}

update api key…

{{ end }}
{{ if .User.IsAdmin }} {{/* admin panel to manage all users */}}
users
{{ range $user := .AllUsers }} {{ $user.Name }} {{ $user.CreatedAt | date }} | username… | password… | {{ if $user.IsAdmin }} delete… {{ else }} delete… {{ end }}
{{ end }} create new…
{{ else }} {{/* user panel to manage themselves */}}
your account
change username… | change password…
{{ end }}
recent folders
{{ if eq (len .RecentFolders) 0 }} no folders yet {{ end }} {{ range $folder := .RecentFolders }} {{ end }}
{{ $folder.RightPath }} {{ $folder.ModifiedAt | dateHuman }}
{{- if and (not .IsScanning) (.User.IsAdmin) -}} {{- if not .LastScanTime.IsZero -}}

scanned {{ .LastScanTime | dateHuman }}

{{ end }}

{{ end }}
transcoding device profiles

you can find your device's client name in the gonic logs.

some common client names are DSub, Jamstash, Soundwaves, or use * as fallback rule for any client

{{ range $pref := .TranscodePreferences }} {{ $formSuffix := kebabcase $pref.Client }} {{ end }}
{{ $pref.Client }} {{ $pref.Profile }}
playlists
{{ if eq (len .Playlists) 0 }} no playlists yet {{ end }} {{ range $i, $playlist := .Playlists }} {{ end }}
{{ $playlist.Name }} ({{ $playlist.TrackCount }} tracks) {{ $playlist.CreatedAt | dateHuman }}
{{ end }}