diff --git a/pkg/transmission/transmission.go b/pkg/transmission/transmission.go index 068ddff1..3766590d 100644 --- a/pkg/transmission/transmission.go +++ b/pkg/transmission/transmission.go @@ -92,8 +92,12 @@ func (t *Torrent) Progress() int { if t.getTorrent().IsFinished != nil && *t.getTorrent().IsFinished { return 100 } - if t.getTorrent().PercentDone != nil { - p := int(*t.getTorrent().PercentDone * 100) + if t.getTorrent().PercentComplete != nil && *t.getTorrent().PercentComplete >= 1 { + return 100 + } + + if t.getTorrent().PercentComplete != nil { + p := int(*t.getTorrent().PercentComplete * 100) if p == 100 { p = 99 } diff --git a/server/resources.go b/server/resources.go index 54d24456..ac2536c7 100644 --- a/server/resources.go +++ b/server/resources.go @@ -133,7 +133,7 @@ func (s *Server) searchAndDownload(seriesId, seasonNum, episodeNum int) (*string } s.tasks[history.ID] = torrent - log.Errorf("success add %s to download task", r1.Name) + log.Infof("success add %s to download task", r1.Name) return &r1.Name, nil }