aboutsummaryrefslogtreecommitdiff
path: root/internal/liturgy/store.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-23 13:56:42 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-23 13:56:42 +0200
commite31b6120806240ece82426fe0a4d38c14113e464 (patch)
treec64d5558366ca925cdb1f8d4a8c340105ce5b4d3 /internal/liturgy/store.go
parente34d15605db9bb7fb11cdd342ac34faf4c8e4b90 (diff)
downloadlectio-e31b6120806240ece82426fe0a4d38c14113e464.tar.gz
lectio-e31b6120806240ece82426fe0a4d38c14113e464.zip
liturgy: LoadOffline sets PartID (fix offline gospel-only)
Diffstat (limited to 'internal/liturgy/store.go')
-rw-r--r--internal/liturgy/store.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/liturgy/store.go b/internal/liturgy/store.go
index 0dc8016..6762585 100644
--- a/internal/liturgy/store.go
+++ b/internal/liturgy/store.go
@@ -168,8 +168,13 @@ func LoadOffline(date string) ([]Section, error) {
return nil, fmt.Errorf("%s not harvested; run 'lectio update' while online first", date)
}
secs := make([]Section, 0, len(rows))
+ czytanieCount := 0
for _, r := range rows {
- secs = append(secs, Section{Heading: r.label, Citation: r.citation})
+ secs = append(secs, Section{
+ Heading: r.label,
+ Citation: r.citation,
+ PartID: partID(r.label, &czytanieCount),
+ })
}
return secs, nil
}