feat(webp): add partial success to conversion

So we only keep images that couldn't be optimized and return the chapter
This commit is contained in:
Antoine Aflalo
2024-08-28 13:49:14 -04:00
parent d7f55fa886
commit ad35e2655f
6 changed files with 117 additions and 30 deletions

View File

@@ -12,6 +12,9 @@ import (
type Converter interface {
// Format of the converter
Format() (format constant.ConversionFormat)
// ConvertChapter converts a manga chapter to the specified format.
//
// Returns partial success where some pages are converted and some are not.
ConvertChapter(chapter *manga.Chapter, quality uint8, split bool, progress func(message string, current uint32, total uint32)) (*manga.Chapter, error)
PrepareConverter() error
}