fix(cbz): make pages be the first in the cbz by only be number

This commit is contained in:
Antoine Aflalo
2024-08-28 09:16:09 -04:00
parent c8879349e1
commit 839ad9ed9d
3 changed files with 12 additions and 12 deletions

View File

@@ -30,10 +30,10 @@ func WriteChapterToCBZ(chapter *manga.Chapter, outputFilePath string) error {
var fileName string
if page.IsSplitted {
// Use the format page%03d-%02d for split pages
fileName = fmt.Sprintf("page_%04d-%02d%s", page.Index, page.SplitPartIndex, page.Extension)
fileName = fmt.Sprintf("%04d-%02d%s", page.Index, page.SplitPartIndex, page.Extension)
} else {
// Use the format page%03d for non-split pages
fileName = fmt.Sprintf("page_%04d%s", page.Index, page.Extension)
fileName = fmt.Sprintf("%04d%s", page.Index, page.Extension)
}
// Create a new file in the ZIP archive