forked from server/soundboard
Fix umlauts in sound files
This commit is contained in:
parent
a273559f08
commit
d6420a743a
@ -20,7 +20,7 @@ def index(sound=None, text=None, video=None):
|
|||||||
sounds = sorted(sounds)
|
sounds = sorted(sounds)
|
||||||
|
|
||||||
if sound is not None and sound in sounds:
|
if sound is not None and sound in sounds:
|
||||||
subprocess.Popen(["omxplayer", os.path.join(config.path, sound)], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
subprocess.Popen(["omxplayer", os.path.join(config.path, sound).encode("utf-8")], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||||
|
|
||||||
if text is None:
|
if text is None:
|
||||||
text = request.form.get("text")
|
text = request.form.get("text")
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<section id="sounds">
|
<section id="sounds">
|
||||||
<div><input type="text" id="search" /><span id="reset">⨯</span></div>
|
<div><input type="text" id="search" /><span id="reset">⨯</span></div>
|
||||||
{% for sound in sounds %}
|
{% for sound in sounds %}
|
||||||
<div class="sound"><a href="{{ '/play/' + sound }}">{{ sound.split('.', 1)[0] }}</a></div>
|
<div class="sound"><a href="{{ '/play/' + sound | urlencode }}">{{ sound.split('.', 1)[0] }}</a></div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
<section id="youtube">
|
<section id="youtube">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user