endspurt
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
MUSIC_BASE_DIRECTORY = "/media/audio/"
|
MUSIC_BASE_DIRECTORY = "/home/pi/audio/"
|
||||||
SOUND_SCANNING = "/home/pi/piplayer2/sounds/scanning.mp3"
|
SOUND_SCANNING = "/home/pi/piplayer2/sounds/scanning.mp3"
|
||||||
SOUND_OK = "/home/pi/piplayer2/sounds/ok.mp3"
|
SOUND_OK = "/home/pi/piplayer2/sounds/ok.mp3"
|
||||||
SOUND_SCAN_FAIL = "/home/pi/piplayer2/sounds/fail.mp3"
|
SOUND_SCAN_FAIL = "/home/pi/piplayer2/sounds/fail.mp3"
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import subprocess
|
||||||
|
|
||||||
|
out, err = subprocess.Popen(['mocp','--info'], stdout=subprocess.PIPE).communicate()
|
||||||
|
out = out.splitlines()
|
||||||
|
|
||||||
|
#ls = subprocess.Popen(['mocp','--info'], stdout=subprocess.PIPE)
|
||||||
|
#out = ls.stdout.readlines()
|
||||||
|
|
||||||
|
for s in out:
|
||||||
|
s = s.decode("utf-8")
|
||||||
|
if s.startswith('CurrentSec'):
|
||||||
|
print(s)
|
||||||
|
print(s.rfind(' '))
|
||||||
|
print(s[s.rfind(' ')+1:])
|
||||||
|
sec = s[s.rfind(' ')+1:]
|
||||||
|
print(int(sec) > 10)
|
||||||
@@ -34,6 +34,11 @@ sudo reboot
|
|||||||
sudo nano /etc/rc.local
|
sudo nano /etc/rc.local
|
||||||
# /usr/bin/tvservice -o
|
# /usr/bin/tvservice -o
|
||||||
|
|
||||||
|
# Disable the ACT LED.
|
||||||
|
sudo nano /boot/config.txt
|
||||||
|
# dtparam=act_led_trigger=none
|
||||||
|
# dtparam=act_led_activelow=off
|
||||||
|
|
||||||
sudo apt install ntp
|
sudo apt install ntp
|
||||||
sudo /etc/init.d/ntp restart
|
sudo /etc/init.d/ntp restart
|
||||||
sudo nano /etc/ntp.conf
|
sudo nano /etc/ntp.conf
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user