Skip to content

Commit 3f399d0

Browse files
committed
fix: duplicate
1 parent df612c1 commit 3f399d0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cmd/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
const (
10-
Version string = "0.9.1"
10+
Version string = "0.9.2"
1111
)
1212

1313
var VersionCmd = &cobra.Command{

sources/kemono/types.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,16 @@ func (resp *KemonoPostResp) ToArtwork() (*types.Artwork, error) {
7979
continue
8080
}
8181
fileResp.Body.Close()
82+
isDuplicate := false
8283
for _, picture := range pictures {
8384
if picture.Original == fileURL {
84-
continue
85+
isDuplicate = true
86+
break
8587
}
8688
}
89+
if isDuplicate {
90+
continue
91+
}
8792
pictures = append(pictures, &types.Picture{
8893
Index: uint(i),
8994
Thumbnail: fileURL,

0 commit comments

Comments
 (0)