more input handling work

This commit is contained in:
Sundog Jones 2020-08-02 09:03:26 -07:00
parent 0d4c7430b1
commit 3e46566f4d

View File

@ -3,6 +3,7 @@ import RPi.GPIO as GPIO
from SoundslabDisplay import SoundslabDisplay
import time
import musicpd
from math import floor
# connect to mpd
player_client = musicpd.MPDClient()
@ -79,11 +80,17 @@ def DN():
def LF():
# seek back 10s
pass
global player_client
print("seek -10s")
status = player_client.status()
player_client.seekcur(floor(float(status['elapsed']) - 10.0))
def RT():
# seek forward 10s
pass
global player_client
print("seek +10s")
status = player_client.status()
player_client.seekcur(floor(float(status['elapsed']) + 10.0))
def SELECT():
# display lock/unlock