fix position

This commit is contained in:
Celogeek 2024-06-22 12:21:05 +02:00
parent 7e3f0d4fcc
commit fee8a037dc
Signed by: celogeek
SSH Key Fingerprint: SHA256:njNJLzoLQdbV9PC6ehcruRb0QnEgxABoCYZ+0+aUIYc

View File

@ -227,7 +227,7 @@ func (o Content) getSpineAuto() []tag {
) )
} }
} }
for _, img := range o.Images { for i, img := range o.Images {
if (img.DoublePage || img.Part == 1) && o.ImageOptions.Manga == isOnTheRight { if (img.DoublePage || img.Part == 1) && o.ImageOptions.Manga == isOnTheRight {
spine = append(spine, tag{ spine = append(spine, tag{
"itemref", "itemref",
@ -242,6 +242,8 @@ func (o Content) getSpineAuto() []tag {
tagAttrs{"idref": img.PageKey(), "properties": img.Position}, tagAttrs{"idref": img.PageKey(), "properties": img.Position},
"", "",
}) })
// save position, img is a value type
o.Images[i] = img
} }
if o.ImageOptions.Manga == isOnTheRight { if o.ImageOptions.Manga == isOnTheRight {
spine = append(spine, tag{ spine = append(spine, tag{