fix: tv episode ordering

This commit is contained in:
Ben Goldsworthy 2023-12-12 22:41:58 +00:00
parent 53cc987467
commit b9d7e65451

View file

@ -4,10 +4,10 @@
{{ .Scratch.Set "filterDir" "desc" }} {{ .Scratch.Set "filterDir" "desc" }}
{{ end }} {{ end }}
{{ range ( sort ( sort ( index $.Site.Data.tv ( .Scratch.Get "listMode" ) ) "Episode Title" "asc" ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }} {{ range ( sort ( index $.Site.Data.tv ( .Scratch.Get "listMode" ) ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
<tr> <tr>
<td> <td>
{{- partial "cite" ( dict "c" . "schemaType" "Book" "title" ( index . "Series Title" ) ) -}} {{- partial "cite" ( dict "c" . "schemaType" "TVSeries" "title" ( index . "Series Title" ) ) -}}
</td> </td>
<td> <td>
{{- partial "cite" ( dict "c" . "schemaType" "TVEpisode" "title" ( index . "Episode Title" ) ) -}} {{- partial "cite" ( dict "c" . "schemaType" "TVEpisode" "title" ( index . "Episode Title" ) ) -}}
@ -16,6 +16,7 @@
<td> <td>
{{- if ( index . "Date Watched" ) -}} {{- if ( index . "Date Watched" ) -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Watched" ) -}} {{- time.Format "Jan 2, 2006" ( index . "Date Watched" ) -}}
{{- if .Rewatch }} &#x21BB;{{ end -}}
{{- else -}} {{- else -}}
n/a n/a
{{- end -}} {{- end -}}