fixed issue in string comparison

This commit is contained in:
Erhard 2017-11-11 02:27:17 +01:00
parent a11b74f120
commit 44361ffc76

View File

@ -40,7 +40,7 @@ def index(sound=None, text=None, video=None):
if video is not None: if video is not None:
if video[-4:] is ".mp3": if video[-4:] == ".mp3":
subprocess.Popen(["omxplayer", video], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) subprocess.Popen(["omxplayer", video], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
else: else:
url = subprocess.check_output(["youtube-dl", "-g", "-f", "mp4", video]).decode() url = subprocess.check_output(["youtube-dl", "-g", "-f", "mp4", video]).decode()