generate correct audio title
This commit is contained in:
parent
e3953dbc75
commit
a1c1a08ff7
|
@ -35,6 +35,10 @@ var funcs = map[string]interface{}{
|
|||
return time.Now().Local().Format("2006-01-02T15:04:05")
|
||||
},
|
||||
|
||||
"monthname": func(month int) string {
|
||||
return monthWords[month]
|
||||
},
|
||||
|
||||
"filesize": func(file string) (int64, error) {
|
||||
fi, err := os.Stat(file)
|
||||
if err != nil {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<resource size="{{ filesize (onlymp3 .AudioFileNames) }}"
|
||||
type="{{ mimetype (onlymp3 .AudioFileNames) }}"
|
||||
url="https://ftp.c3d2.de/pentaradio/{{ onlymp3 .AudioFileNames }}"
|
||||
title="pentaradio24 vom 22. März 2022">
|
||||
title="pentaradio24 vom {{ .Day }}. {{ monthname .Month }} {{ .Year }}">
|
||||
{{- range (exceptmp3 .AudioFileNames) }}
|
||||
<alternative size="{{ filesize . }}" type="{{ mimetype . }}" url="https://ftp.c3d2.de/pentaradio/{{ . }}"/>
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in New Issue