forked from Shinonome/dots-hyprland
add interval to settings, update the script (it was not working as intented)
This commit is contained in:
@@ -378,6 +378,7 @@ Singleton {
|
||||
|
||||
property JsonObject musicRecognition: JsonObject {
|
||||
property int timeout: 16
|
||||
property int interval: 4
|
||||
}
|
||||
|
||||
property JsonObject search: JsonObject {
|
||||
|
||||
@@ -63,15 +63,26 @@ ContentPage {
|
||||
|
||||
ConfigSpinBox {
|
||||
icon: "timer_off"
|
||||
text: Translation.tr("Music recognition timeout (s)")
|
||||
text: Translation.tr("Total duration timeout (s)")
|
||||
value: Config.options.musicRecognition.timeout
|
||||
from: 2
|
||||
from: 10
|
||||
to: 100
|
||||
stepSize: 2
|
||||
onValueChanged: {
|
||||
Config.options.musicRecognition.timeout = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
icon: "av_timer"
|
||||
text: Translation.tr("Polling interval (s)")
|
||||
value: Config.options.musicRecognition.interval
|
||||
from: 2
|
||||
to: 10
|
||||
stepSize: 1
|
||||
onValueChanged: {
|
||||
Config.options.musicRecognition.interval = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
|
||||
+2
-1
@@ -10,9 +10,10 @@ import qs.services
|
||||
AndroidQuickToggleButton {
|
||||
id: root
|
||||
|
||||
property int timeoutInterval: 5
|
||||
property int timeoutInterval: Config.options.musicRecognition.interval
|
||||
property int timeoutDuration: Config.options.musicRecognition.timeout
|
||||
|
||||
|
||||
property string monitorSource: "monitor" // "monitor" (system sound) , "input" (microphone)
|
||||
|
||||
name: Translation.tr("Identify Music")
|
||||
|
||||
Reference in New Issue
Block a user