summaryrefslogtreecommitdiff
path: root/cli/app/search
diff options
context:
space:
mode:
Diffstat (limited to 'cli/app/search')
-rw-r--r--cli/app/search/live.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/app/search/live.py b/cli/app/search/live.py
index 251a9f5..7dbe98f 100644
--- a/cli/app/search/live.py
+++ b/cli/app/search/live.py
@@ -231,6 +231,7 @@ class InterpolatorVariable:
class Interpolator:
def __init__(self):
+ self.paused = False
self.stopped = False
self.opts = {}
self.sin_params = {}
@@ -374,6 +375,7 @@ class Interpolator:
opt[key] = param.value.tolist()
else:
opt[key] = param.value
+ opt['paused'] = self.paused
return opt
def set_value(self, key, value):
@@ -457,6 +459,12 @@ class Interpolator:
self.set_category(payload)
if cmd == 'setEncoding':
self.set_encoding(json.loads(payload))
+ if cmd == 'play':
+ print("set_opt: paused True")
+ self.paused = False
+ if cmd == 'pause':
+ print("set_opt: paused False")
+ self.paused = True
if cmd == 'stop':
self.stopped = True
pass
@@ -541,6 +549,9 @@ class Listener:
print("Loading network...")
elif i == 1:
print("Processing!")
+ elif interpolator.paused:
+ time.sleep(0.5)
+ continue
elif interpolator.stopped:
print("Stopping...")
return