Update piplayer4.py

This commit is contained in:
2018-12-12 22:19:30 +00:00
parent fea202b0d4
commit 0c5961ae41
+4 -3
View File
@@ -27,8 +27,8 @@ PIN_LED = 22
# Buttons on PINs 9, 10 and 11 # Buttons on PINs 9, 10 and 11
PIN_PREV = 9 PIN_PREV = 9
PIN_PLAY = 10 PIN_NEXT = 10
PIN_NEXT = 11 PIN_PLAY = 11
GPIO.setmode(GPIO.BCM) GPIO.setmode(GPIO.BCM)
@@ -51,6 +51,7 @@ def play(uri, service = 'mpd'):
def prev_callback(channel): def prev_callback(channel):
logging.info("PREV") logging.info("PREV")
socketIO.emit('prev') socketIO.emit('prev')
## TODO implement jump to beginning for first x seconds (or if first track)
## TODO implement seek ## TODO implement seek
def play_callback(channel): def play_callback(channel):
@@ -127,7 +128,7 @@ try:
qr_code = qr_code[1:] qr_code = qr_code[1:]
full_path = MUSIC_BASE_DIRECTORY + qr_code full_path = MUSIC_BASE_DIRECTORY + qr_code
logging.info("full_path: " + full_path) logging.info("full_path: " + full_path)
play(full_path) play(full_path, 'mpd')
else: else:
logging.warning('Timeout on zbarcam') logging.warning('Timeout on zbarcam')