forked from server/soundboard
fix errors
This commit is contained in:
parent
3a8822784f
commit
da2e92d950
@ -153,5 +153,5 @@ def sounds(name):
|
||||
@app.route("/random")
|
||||
def play_random():
|
||||
sounds = [os.fsencode(file).decode() for file in os.listdir(config.path)]
|
||||
random_sound = random.sample(sounds, 1)
|
||||
subprocess.Popen(["omxplayer", os.path.join(config.path, random_sound.encode("utf-8")], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
random_sound = random.sample(sounds, 1)[0]
|
||||
subprocess.Popen(["omxplayer", os.path.join(config.path, random_sound).encode("utf-8")], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
Loading…
x
Reference in New Issue
Block a user