Skip to content

Commit

Permalink
Fixed a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SebiWrn committed Apr 29, 2024
1 parent d30dd13 commit c5e06dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (r progressRoutes) saveProgress(c *gin.Context) {
duration += int32(dur.Seconds()) + int32(dur.Minutes())*60 + int32(dur.Minutes())*60*60
}
// logger.Debug("Duration", "duration", duration)
if duration != 0 {
if duration != 0 && len(stream.Silences) > 0 {
lastSilence := slices.MaxFunc(stream.Silences, func(silence model.Silence, other model.Silence) int {
return int(silence.End) - int(other.End)
})
Expand Down

0 comments on commit c5e06dc

Please sign in to comment.