diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-15 17:30:33 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-15 17:30:33 +1000 |
| commit | 3df0f7fd26377fe30c3542fc34d7dc8d6fbf2ffa (patch) | |
| tree | 93569a72f6798476e40b47ee7381fb89929ebf59 /services | |
| parent | internal: fix beat detector (diff) | |
| download | caelestia-shell-3df0f7fd26377fe30c3542fc34d7dc8d6fbf2ffa.tar.gz caelestia-shell-3df0f7fd26377fe30c3542fc34d7dc8d6fbf2ffa.tar.bz2 caelestia-shell-3df0f7fd26377fe30c3542fc34d7dc8d6fbf2ffa.zip | |
internal: properly fix beat detector
Diffstat (limited to 'services')
| -rw-r--r-- | services/BeatDetector.qml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/BeatDetector.qml b/services/BeatDetector.qml index b210801..65dd88e 100644 --- a/services/BeatDetector.qml +++ b/services/BeatDetector.qml @@ -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]); + } } } } |