From 3375edffd8cc3d059f3e479e9ec5d469b7254064 Mon Sep 17 00:00:00 2001 From: Leo Gaskin Date: Fri, 27 Oct 2023 19:53:55 +0200 Subject: [PATCH] Only download cover images that are actually needed --- cmd/formats/download/root.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/formats/download/root.go b/cmd/formats/download/root.go index f280ec7..ad0bcb3 100644 --- a/cmd/formats/download/root.go +++ b/cmd/formats/download/root.go @@ -58,8 +58,10 @@ func MangadexCovers(manga *md.Manga, p formats.Progress) (md.ImageList, error) { coverPaths := make(chan md.Path) go func() { for _, path := range covers { - coverPaths <- path - p.Increase(1) + if _, ok := manga.Volumes[path.VolumeIdentifier]; ok { + coverPaths <- path + p.Increase(1) + } } close(coverPaths) }()