Correct the math we use to perform seek operations via MPRIS, since KDEConnect uses microseconds for seek offsets even though they use milliseconds for position values. (MPRIS uses microseconds everywhere.)
Also, implement SetPosition() directly instead of computing the offset from the current position and calling Seek(), because some players don't respect arbitrary Seek() lengths.
Picking up the currently-playing trackid at the time the SetPosition() call is handled and assuming it's the same track it was intended for is somewhat risky, but picking up the current Position and making the same assumption (which is what the previous code did) carried the exact same amount of risk.
Correct the math we use to perform seek operations via MPRIS, since KDEConnect uses microseconds for seek offsets even though they use milliseconds for position values. (MPRIS uses microseconds everywhere.)
Also, implement
SetPosition()
directly instead of computing the offset from the current position and callingSeek()
, because some players don't respect arbitrarySeek()
lengths.Picking up the currently-playing
trackid
at the time theSetPosition()
call is handled and assuming it's the same track it was intended for is somewhat risky, but picking up the currentPosition
and making the same assumption (which is what the previous code did) carried the exact same amount of risk.Fixes: #1779