|
|
|
@@ -18,8 +18,8 @@ import ( |
|
|
|
|
|
|
|
"git.svabi.ch/jan/roadamp/internal/killist" |
|
|
|
"git.svabi.ch/jan/roadamp/internal/resume" |
|
|
|
"git.svabi.ch/jan/roadamp/internal/volume" |
|
|
|
"git.svabi.ch/jan/roadamp/internal/viz" |
|
|
|
"git.svabi.ch/jan/roadamp/internal/volume" |
|
|
|
"git.svabi.ch/jan/roadamp/internal/winamp" |
|
|
|
"github.com/gorilla/websocket" |
|
|
|
"gopkg.in/yaml.v3" |
|
|
|
@@ -278,8 +278,12 @@ func (s *Server) statusMsg() ([]byte, error) { |
|
|
|
// 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 } |
|
|
|
if pos > 86400 { |
|
|
|
pos = 0 |
|
|
|
} // > 24h → garbage value |
|
|
|
if length > 86400 { |
|
|
|
length = 0 |
|
|
|
} |
|
|
|
msg.Position = pos |
|
|
|
msg.Length = length |
|
|
|
msg.PlaylistPos = s.wa.GetPlaylistPosition() |
|
|
|
|