Skip to content

Commit

Permalink
Only download cover images that are actually needed
Browse files Browse the repository at this point in the history
  • Loading branch information
leotaku committed Oct 27, 2023
1 parent 64a1d8c commit 3375edf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/formats/download/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}()
Expand Down

0 comments on commit 3375edf

Please sign in to comment.