mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-25 08:12:36 +02:00
include title for epubpart
This commit is contained in:
parent
5960c56938
commit
82aa66c363
@ -160,8 +160,11 @@ func (e *ePub) getParts() ([]*epubPart, error) {
|
|||||||
maxSize := uint64(e.LimitMb * 1024 * 1024)
|
maxSize := uint64(e.LimitMb * 1024 * 1024)
|
||||||
|
|
||||||
xhtmlSize := uint64(1024)
|
xhtmlSize := uint64(1024)
|
||||||
// descriptor files + image
|
// descriptor files + title
|
||||||
baseSize := uint64(16*1024) + cover.Data.CompressedSize()
|
baseSize := uint64(16*1024) + cover.Data.CompressedSize()
|
||||||
|
if e.HasCover {
|
||||||
|
baseSize += cover.Data.CompressedSize()
|
||||||
|
}
|
||||||
|
|
||||||
currentSize := baseSize
|
currentSize := baseSize
|
||||||
currentImages := make([]*Image, 0)
|
currentImages := make([]*Image, 0)
|
||||||
@ -176,6 +179,9 @@ func (e *ePub) getParts() ([]*epubPart, error) {
|
|||||||
})
|
})
|
||||||
part += 1
|
part += 1
|
||||||
currentSize = baseSize
|
currentSize = baseSize
|
||||||
|
if !e.HasCover {
|
||||||
|
currentSize += cover.Data.CompressedSize()
|
||||||
|
}
|
||||||
currentImages = make([]*Image, 0)
|
currentImages = make([]*Image, 0)
|
||||||
}
|
}
|
||||||
currentSize += imgSize
|
currentSize += imgSize
|
||||||
|
Loading…
x
Reference in New Issue
Block a user