refactor: change package name

This commit is contained in:
Antoine Aflalo
2024-08-27 13:27:50 -04:00
parent 9083ec599a
commit 634f13582e
13 changed files with 122 additions and 49 deletions

View File

@@ -6,13 +6,13 @@ import (
"bytes"
"fmt"
"github.com/araddon/dateparse"
"github.com/belphemur/CBZOptimizer/packer"
"github.com/belphemur/CBZOptimizer/manga"
"io"
"path/filepath"
"strings"
)
func LoadChapter(filePath string) (*packer.Chapter, error) {
func LoadChapter(filePath string) (*manga.Chapter, error) {
// Open the .cbz file
r, err := zip.OpenReader(filePath)
if err != nil {
@@ -20,7 +20,7 @@ func LoadChapter(filePath string) (*packer.Chapter, error) {
}
defer r.Close()
chapter := &packer.Chapter{
chapter := &manga.Chapter{
FilePath: filePath,
}
@@ -71,7 +71,7 @@ func LoadChapter(filePath string) (*packer.Chapter, error) {
}
// Create a new Page object
page := &packer.Page{
page := &manga.Page{
Index: uint16(len(chapter.Pages)), // Simple index based on order
Extension: ext,
Size: uint64(buf.Len()),