From 4bd1446cea1fe4a86012ed9f8d16f13f9f1b3321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Sat, 12 Nov 2022 19:07:52 +0100 Subject: 11. 11. 2022 --- gromka/keyboard.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gromka/keyboard.py') diff --git a/gromka/keyboard.py b/gromka/keyboard.py index 14276cc..4873636 100755 --- a/gromka/keyboard.py +++ b/gromka/keyboard.py @@ -38,7 +38,10 @@ for key in show.find_all("Input"): if key.has_attr("Universe") and key["Universe"] == "0" and key.has_attr("Channel") and int(key["Channel"]) >= 198 and int(key["Channel"]) <= 198 + 24: if midi[int(key["Channel"]) - 198] != "": midi[int(key["Channel"]) - 198] += ", " - midi[int(key["Channel"]) - 198] += key.parent["Caption"] + " (" + key.parent.name + ")" + caption = "" + if key.parent.has_attr("Caption"): + caption = key.parent["Caption"] + midi[int(key["Channel"]) - 198] += caption + " (" + key.parent.name + ")" for key in range(0, 24): kje = " zgoraj" -- cgit v1.2.3