From 86d85f690930dba335478928fec33852b6db3ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 13 Dec 2017 15:42:09 +0100 Subject: [PATCH] Fix mixed indentation in Python files --- soundboard.py | 12 ++++++------ soundboard.wsgi | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/soundboard.py b/soundboard.py index 8c1b380..5002bba 100644 --- a/soundboard.py +++ b/soundboard.py @@ -72,12 +72,12 @@ def index(sound=None, text=None, video=None): video = request.args.get("video") if video is not None: - if video[-4:] == ".mp3": - subprocess.Popen(["omxplayer", video], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - else: - url = subprocess.check_output(["youtube-dl", "-g", "-f", "mp4", video]).decode() - subprocess.Popen(["omxplayer", url.split("\n")[1]]) - subprocess.Popen(["omxplayer", "-b", url.split("\n")[0]]) + if video[-4:] == ".mp3": + subprocess.Popen(["omxplayer", video], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + else: + url = subprocess.check_output(["youtube-dl", "-g", "-f", "mp4", video]).decode() + subprocess.Popen(["omxplayer", url.split("\n")[1]]) + subprocess.Popen(["omxplayer", "-b", url.split("\n")[0]]) killvideo = request.args.get("killvideo") diff --git a/soundboard.wsgi b/soundboard.wsgi index dffa811..b4b35e0 100644 --- a/soundboard.wsgi +++ b/soundboard.wsgi @@ -5,6 +5,6 @@ sys.path.insert(0, '/var/www/soundboard') activate_this = '/var/www/soundboard/py/bin/activate_this.py' with open(activate_this) as file_: - exec(file_.read(), dict(__file__=activate_this)) + exec(file_.read(), dict(__file__=activate_this)) from soundboard import app as application