Skip to content

Commit

Permalink
Fix bug with newly introduced function in superdirt.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubobubobubobubo committed Jun 16, 2024
1 parent de3bfd0 commit e4a4401
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sardine_core/handlers/superdirt.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,14 @@ def _dirt_panic(self):
self._dirt_play(message=["sound", "superpanic"])

def _handle_sample_number(self, message: dict):
if ":" in message["sound"]:
orig_sp, orig_nb = message["sound"].split(":")
message["sound"] = orig_sp + ":" + str(int(orig_nb) + int(message["n"]))
sound = str(message["sound"])
if ":" in sound:
orig_sp, orig_nb = sound.split(":")
sound = orig_sp + ":" + str(int(orig_nb) + int(message["n"]))
else:
message["sound"] = message["sound"] + ":" + str(message["n"])
sound = sound + ":" + str(message["n"])
del message["n"]
message["sound"] = sound
return message

def _parse_aliases(self, pattern: dict):
Expand Down

0 comments on commit e4a4401

Please sign in to comment.