Skip to content

Commit

Permalink
STOP以外で0の場合はnilにしないようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
p1ass committed Jul 23, 2020
1 parent 07bcb9b commit 5f10906
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web/handler/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ func (h *SessionHandler) toSessionRes(session *entity.SessionWithUser, info *ent
if session.StateType != entity.Stop && info != nil {
progress := info.Progress.Milliseconds()
state.Progress = &progress
var zero int64 = 0
state.Length = &zero
state.Remaining = &zero
if info.Track != nil {
length := info.Track.Duration.Milliseconds()
remaining := info.Remain().Milliseconds()
Expand Down

0 comments on commit 5f10906

Please sign in to comment.