Fast Forward Button with .seekcur

Need help with MPD?
Post Reply
Posts: 1
Joined: January 9th, 2019, 9:00 pm

Fast Forward Button with .seekcur

Post by Mordred » January 9th, 2019, 9:20 pm


for a few Days i am trying to build a Fast Forward Button with the .seekcur command.
Neither Google or this Board seems to know my Problem till now ;)

So here it is:
if ( - buttonPressedTime).total_seconds()>=2:
client = connectMPD()
is working fine (Fast Backwards) but if i change client.seekcur(-5) against client.seekcur(+5) it jumps to Second 5 of the playing Track not as expected relative 5 seconds futher.

Am I'm doing something wrong?

Thanks for your Help

Forum team
Posts: 913
Joined: January 15th, 2013, 3:43 pm

Re: Fast Forward Button with .seekcur

Post by max » January 10th, 2019, 7:12 am

It's probably that the client library you use (you didn't say which one) interprets positive integers as absolute position inside the song. Read the library's documentation on how to specify positive relative offsets.

Post Reply