internal: properly fix beat detector

This commit is contained in:
2 * r + 2 * t 2025-06-15 17:30:33 +10:00
parent 5ca2854681
commit 3df0f7fd26

View file

@ -12,7 +12,11 @@ Singleton {
running: true
command: ["/usr/lib/caelestia/beat_detector", "--no-log", "--no-stats", "--no-visual"]
stdout: SplitParser {
onRead: data => root.bpm = parseFloat(data)
onRead: data => {
const match = data.match(/BPM: ([0-9]+\.[0-9])/);
if (match)
root.bpm = parseFloat(match[1]);
}
}
}
}