mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-25 00:02:37 +02:00
fix duplicate blank page if last page is double
This commit is contained in:
parent
42eba9cb3b
commit
06cc6d2788
@ -292,8 +292,9 @@ func (e *ePub) Write() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Double Page or Last Image
|
||||
if img.Image.DoublePage || (i+1 == len(part.LoadedImages)) {
|
||||
// Double Page or Last Image that is not a double page
|
||||
if img.Image.DoublePage ||
|
||||
(img.Image.Part == 0 && i+1 == len(part.LoadedImages)) {
|
||||
if err := e.writeBlank(wz, img.Image); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -150,7 +150,10 @@ func getManifest(o *ContentOptions) []tag {
|
||||
}
|
||||
items = append(items, itag(img), htag(img))
|
||||
}
|
||||
items = append(items, stag(o.Images[len(o.Images)-1]))
|
||||
lastImage := o.Images[len(o.Images)-1]
|
||||
if lastImage.Part == 0 {
|
||||
items = append(items, stag(lastImage))
|
||||
}
|
||||
|
||||
return items
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user