1
0

In Song.DurationString() updated format.

This commit is contained in:
Alexander Andreev 2023-10-02 18:08:57 +04:00
parent 64c2868fcf
commit 0bf81f93c8
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -22,9 +22,9 @@ func (s *Song) ArtistTitle() string {
func (s *Song) DurationString() string { func (s *Song) DurationString() string {
if s.Duration.Hours() >= 1 { if s.Duration.Hours() >= 1 {
return time.UnixMilli(s.Duration.Milliseconds()).Format("15:04:05") return time.UnixMilli(s.Duration.Milliseconds()).Format("3:4:05")
} }
return time.UnixMilli(s.Duration.Milliseconds()).Format("04:05") return time.UnixMilli(s.Duration.Milliseconds()).Format("4:05")
} }
func (s *Song) MarshalJSON() ([]byte, error) { func (s *Song) MarshalJSON() ([]byte, error) {