mirror of
https://github.com/Belphemur/CBZOptimizer.git
synced 2025-10-14 12:38:50 +02:00
feat: avoid converting already converted chapters
This commit is contained in:
@@ -71,6 +71,11 @@ func ConvertCbzCommand(cmd *cobra.Command, args []string) error {
|
||||
continue
|
||||
}
|
||||
|
||||
if chapter.IsConverted {
|
||||
fmt.Printf("Chapter already converted: %s\n", path)
|
||||
continue
|
||||
}
|
||||
|
||||
// Convert the chapter
|
||||
convertedChapter, err := chapterConverter.ConvertChapter(chapter, quality, func(msg string) {
|
||||
fmt.Println(msg)
|
||||
@@ -79,6 +84,7 @@ func ConvertCbzCommand(cmd *cobra.Command, args []string) error {
|
||||
fmt.Printf("Failed to convert chapter: %v\n", err)
|
||||
continue
|
||||
}
|
||||
convertedChapter.SetConverted()
|
||||
|
||||
// Write the converted chapter back to a CBZ file
|
||||
outputPath := path
|
||||
|
Reference in New Issue
Block a user