Oh, time.Duration works a little differently...
This commit is contained in:
parent
f1e2eca876
commit
9757f5f748
@ -21,7 +21,7 @@ func (s *Song) ArtistTitle() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Song) DurationString() string {
|
func (s *Song) DurationString() string {
|
||||||
if s.Duration.Hours() > 0 {
|
if s.Duration.Hours() >= 1 {
|
||||||
return time.UnixMilli(s.Duration.Milliseconds()).Format("15:04:05")
|
return time.UnixMilli(s.Duration.Milliseconds()).Format("15:04:05")
|
||||||
}
|
}
|
||||||
return time.UnixMilli(s.Duration.Milliseconds()).Format("04:05")
|
return time.UnixMilli(s.Duration.Milliseconds()).Format("04:05")
|
||||||
|
Loading…
Reference in New Issue
Block a user