Fix umlauts in sound files

This commit is contained in:
Martin Müller 2017-07-17 15:33:15 +02:00
parent a273559f08
commit d6420a743a
2 changed files with 2 additions and 2 deletions

View File

@ -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")

View File

@ -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">