Skip to content

Commit

Permalink
refactor: omit test for 0.0 score
Browse files Browse the repository at this point in the history
  • Loading branch information
tympanix committed Jun 28, 2018
1 parent e418289 commit cd81d6e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions app/app_subtitle.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,8 @@ func (a *Application) downloadBestSubtitle(ctx notify.Context, m types.Video, l
return nil, ctx.Error(err.Error())
}

var strscore string
if sub.Score() == 0.0 {
strscore = "N/A"
} else {
strscore = fmt.Sprintf("%.0f%%", sub.Score()*100.0)
}

c <- ctx.WithField("score", strscore).Info("Subtitle downloaded")
score := fmt.Sprintf("%.0f%%", sub.Score()*100.0)
c <- ctx.WithField("score", score).Info("Subtitle downloaded")

if err := a.execPluginsOnSubtitle(ctx, saved, c); err != nil {
return nil, err
Expand Down

0 comments on commit cd81d6e

Please sign in to comment.