write tests for SoundStat

This commit is contained in:
bkfox
2023-06-26 13:44:24 +02:00
parent b2f4bce717
commit 8fcfdcc74f
5 changed files with 65 additions and 47 deletions

View File

@@ -103,10 +103,8 @@ class MoveTask(Task):
log_msg = "Sound file moved: {event.src_path} -> {event.dest_path}"
def __call__(self, event, **kw):
print("event", event.src_path, event.dest_path, Sound.objects.all())
sound = Sound.objects.filter(file=event.src_path).first()
if sound:
print("got sound", event.src_path)
kw["sound"] = sound
kw["path"] = event.src_path
else: