Skip to content

Commit

Permalink
Merge pull request #39 from Go-phie/bugfix/fzmovies-size-fix
Browse files Browse the repository at this point in the history
FzMovies: size display fix
  • Loading branch information
MeNsaaH authored Nov 1, 2020
2 parents 5b7410c + 7e12e7a commit eefc65b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion engine/fzmovies.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,13 @@ func (engine *FzEngine) updateDownloadProps(downloadCollector *colly.Collector,
stringsub := re.FindStringSubmatch(e.ChildText("dcounter"))
if len(stringsub) > 0 {
dl := strings.TrimPrefix(stringsub[0], "(")
movie.Size = dl
dlRe := regexp.MustCompile(`(.*MB)\)`)
dlSize := dlRe.FindStringSubmatch(dl)
if len(dlSize) > 1 {
movie.Size = dlSize[1]
} else {
movie.Size = dl
}
}
if strings.HasSuffix(movie.Title, "Tags") {
movie.Title = strings.TrimSuffix(movie.Title, "Tags")
Expand Down

0 comments on commit eefc65b

Please sign in to comment.