CBR -> CBZ

This commit is contained in:
Felipe M 2021-02-21 22:09:37 +01:00
parent 21c9631483
commit eaa23d67dc
Signed by: fmartingr
GPG Key ID: 716BC147715E716F
4 changed files with 7 additions and 8 deletions

View File

@ -1,3 +1,3 @@
# MangaDex to CBR downloader
# MangaDex to Comic Book downloader
Generate CBR comics from MangaDex releases
Generate CBZ comics from MangaDex releases

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/fmartingr/mangadex2cbr
module github.com/fmartingr/mangadex2cbz
go 1.15

View File

@ -1,7 +1,7 @@
package main
import (
"github.com/fmartingr/mangadex2cbr/pkg/cli"
"github.com/fmartingr/mangadex2cbz/pkg/cli"
)
func main() {

View File

@ -17,7 +17,7 @@ import (
"time"
"github.com/fmartingr/go-mangadex"
"github.com/fmartingr/mangadex2cbr/pkg/tasks"
"github.com/fmartingr/mangadex2cbz/pkg/tasks"
"github.com/sirupsen/logrus"
)
@ -310,7 +310,6 @@ func Start() {
}
}
// TODO: Zip folders into CBR files
logrus.Info("Compressing volumes")
files, errReadVolumes := ioutil.ReadDir(mangaOutputPath)
@ -320,11 +319,11 @@ func Start() {
for file := range files {
if files[file].IsDir() {
destinationPath := filepath.Join(mangaOutputPath, files[file].Name()) + ".cbr"
destinationPath := filepath.Join(mangaOutputPath, files[file].Name()) + ".cbz"
if !fileExists(destinationPath) {
_, errZip := zipVolume(destinationPath)
if errZip != nil {
logrus.Errorf("Error packing CBR file: %s", errZip)
logrus.Errorf("Error packing CB file: %s", errZip)
}
}
}