diff options
Diffstat (limited to 'services/BeatDetector.qml')
| -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]); + } } } } |