{{ component "layout" . }} {{ component "layout_user" . }} {{ component "block" (props . "Icon" "chart-pie" "Name" "stats" "Desc" "total items found in all watched folders" ) }}
artists
{{ .ArtistCount }}
albums
{{ .AlbumCount }}
tracks
{{ .TrackCount }}
{{ end }} {{ component "block" (props . "Icon" "users" "Name" "user management" "Desc" "manage user accounts for subsonic api and web interface access" ) }}
{{ range $user := .AllUsers }}
{{ $user.Name }}
{{ $user.CreatedAt | date }}
{{ component "link" (props . "To" (printf "/admin/change_username?user=%s" $user.Name | path)) }}username{{ end }} {{ component "link" (props . "To" (printf "/admin/change_password?user=%s" $user.Name | path)) }}password{{ end }} {{ component "link" (props . "To" (printf "/admin/change_avatar?user=%s" $user.Name | path)) }}avatar{{ end }} {{ if $user.IsAdmin }}
delete
{{ else }} {{ component "link" (props . "To" (printf "/admin/delete_user?user=%s" $user.Name | path)) }}delete{{ end }} {{ end }} {{ end }} {{ if .User.IsAdmin }}
{{ component "link" (props . "To" (path "/admin/create_user")) }}create new{{ end }}
{{ end }}
{{ end }} {{ component "block" (props . "Icon" "folder-tree" "Name" "recent folders" ) }}
{{ if eq (len .RecentFolders) 0 }}
no folders yet
{{ end }} {{ range $folder := .RecentFolders }}
{{ $folder.RightPath }}
{{ if not $folder.ModifiedAt.IsZero }}
{{ $folder.ModifiedAt | dateHuman }}
{{ else }} {{ end }} {{ end }} {{ if and (not .IsScanning) (.User.IsAdmin) }} {{ if not .LastScanTime.IsZero }}

scanned {{ .LastScanTime | dateHuman }}

{{ end }}
{{ end }} {{ if .IsScanning }}

scan in progress...

{{ end }}
{{ end }} {{ component "block" (props . "Icon" "music" "Name" "transcoding device profiles" "Desc" "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. see the \"transcoding profiles\" page on the wiki for more info" ) }}
{{ range $pref := .TranscodePreferences }} {{ $formSuffix := kebabcase $pref.Client }}
{{ $pref.Client }}
{{ $pref.Profile }}
{{ end }}
{{ end }} {{ component "block" (props . "Icon" "lastfm" "Name" "last.fm" "Desc" "scrobble to last.fm on a per user basis. adding an api key will also help gonic get rich artist info and images for subsonic clients" ) }}
{{ if .CurrentLastFMAPIKey }} {{ if .User.LastFMSession }}

current status linked

{{ else }}

current status unlinked

{{ $cbPath := path "/admin/link_lastfm_do" }} {{ $cbURL := printf "%s%s" .RequestRoot $cbPath }}
{{ component "link" (props . "To" (printf "https://www.last.fm/api/auth/?api_key=%s&cb=%s" .CurrentLastFMAPIKey $cbURL)) }}link{{ end }}
{{ end }} {{ else }}

api key not set

{{ if not .User.IsAdmin }}

please ask your admin to set it

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

{{ component "link" (props . "To" (path "/admin/update_lastfm_api_key" )) }}update api key{{ end }}

{{ end }}
{{ end }} {{ component "block" (props . "Icon" "brain" "Name" "listenbrainz" "Desc" "scrobble to listenbrainz and compatible sites on a per user basis" ) }}
{{ if .User.ListenBrainzToken }}

current status linked

{{ else }}

current status unlinked

{{ end }}
{{ end }} {{ if .User.IsAdmin }} {{ component "block" (props . "Icon" "rss" "Name" "podcasts" "Desc" "you can add podcasts rss feeds here" ) }}
{{ range $pref := .Podcasts }}
{{ $pref.Title }}
{{ end }}
{{ end }} {{ end }} {{ if .User.IsAdmin }} {{ component "block" (props . "Icon" "rss" "Name" "internet radio stations" "Desc" "you can add and update internet radio stations here" ) }}
{{ range $pref := .InternetRadioStations }}
{{ end }}
{{ end }} {{ end }} {{ end }} {{ end }}