|
|
|
@@ -266,8 +266,13 @@ func (s *Server) statusMsg() ([]byte, error) { |
|
|
|
msg.State = "stopped" |
|
|
|
} |
|
|
|
msg.Title = s.wa.GetTitle() |
|
|
|
msg.Position = s.wa.GetPosition() |
|
|
|
msg.Length = s.wa.GetLength() |
|
|
|
// Winamp returns 0xFFFFFFFF when stopped/no track — clamp to 0. |
|
|
|
pos := s.wa.GetPosition() |
|
|
|
length := s.wa.GetLength() |
|
|
|
if pos > 86400 { pos = 0 } // > 24h → garbage value |
|
|
|
if length > 86400 { length = 0 } |
|
|
|
msg.Position = pos |
|
|
|
msg.Length = length |
|
|
|
msg.PlaylistPos = s.wa.GetPlaylistPosition() |
|
|
|
msg.PlaylistLength = s.wa.GetPlaylistLength() |
|
|
|
msg.Version = s.wa.GetVersion() |
|
|
|
|