Sort tags alphabetically

This commit is contained in:
Martin Müller 2017-07-19 11:33:12 +02:00
parent 35e6337d20
commit eb549417db

View File

@ -44,7 +44,7 @@ def index(sound=None, text=None, video=None):
sounds = [os.fsencode(file).decode() for file in os.listdir(config.path)]
sounds = sorted(sounds)
tags = queryDB("SELECT name FROM tag")
tags = queryDB("SELECT name FROM tag ORDER BY name COLLATE NOCASE")
if sound is not None and sound in sounds:
subprocess.Popen(["omxplayer", os.path.join(config.path, sound).encode("utf-8")], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)