add -seek-by CLI arg

This commit is contained in:
Drew Weymouth
2024-06-23 16:09:50 -07:00
parent 46b7e386f4
commit 17dfa1132f
7 changed files with 44 additions and 10 deletions
+1 -2
View File
@@ -184,8 +184,7 @@ func (m *MPRISHandler) Play() error {
func (m *MPRISHandler) Seek(offset types.Microseconds) error {
// MPRIS seek command is relative to current position
pos := m.pm.PlayerStatus().TimePos + microsecondsToSeconds(offset)
return m.pm.SeekSeconds(pos)
return m.pm.SeekBySeconds(microsecondsToSeconds(offset))
}
func (m *MPRISHandler) SetPosition(trackId string, position types.Microseconds) error {