Skip to content

Commit 7e12e7a

Browse files
committed
size display fix
1 parent ca39399 commit 7e12e7a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

engine/fzmovies.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ func (engine *FzEngine) updateDownloadProps(downloadCollector *colly.Collector,
117117
stringsub := re.FindStringSubmatch(e.ChildText("dcounter"))
118118
if len(stringsub) > 0 {
119119
dl := strings.TrimPrefix(stringsub[0], "(")
120-
movie.Size = dl
120+
dlRe := regexp.MustCompile(`(.*MB)\)`)
121+
dlSize := dlRe.FindStringSubmatch(dl)
122+
if len(dlSize) > 1 {
123+
movie.Size = dlSize[1]
124+
} else {
125+
movie.Size = dl
126+
}
121127
}
122128
if strings.HasSuffix(movie.Title, "Tags") {
123129
movie.Title = strings.TrimSuffix(movie.Title, "Tags")

0 commit comments

Comments
 (0)