internal: properly fix beat detector
This commit is contained in:
parent
5ca2854681
commit
3df0f7fd26
1 changed files with 5 additions and 1 deletions
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue