clearer messages between Monitor and Controller
"add" was very generi, and is easy to get confused with other part of the code; uris_enqueue is clearer, more unique, therefore more "greppable"
This commit is contained in:
parent
9b9e0b72a4
commit
7f4fd09a78
2 changed files with 4 additions and 4 deletions
|
@ -154,9 +154,9 @@ class Monitor(ParentedLet):
|
||||||
'registry; this is most likely a bug'.
|
'registry; this is most likely a bug'.
|
||||||
format(timespec.get('nick', timespec.eid)))
|
format(timespec.get('nick', timespec.eid)))
|
||||||
uris = audiogenerate(audiospec)
|
uris = audiogenerate(audiospec)
|
||||||
self.send_to_parent('add', dict(uris=uris,
|
self.send_to_parent('uris_enqueue', dict(uris=uris,
|
||||||
audiospec=audiospec,
|
audiospec=audiospec,
|
||||||
aid=audiospec.eid))
|
aid=audiospec.eid))
|
||||||
|
|
||||||
def _run(self):
|
def _run(self):
|
||||||
self.ticker.start()
|
self.ticker.start()
|
||||||
|
|
|
@ -116,7 +116,7 @@ class Controller(gevent.Greenlet):
|
||||||
gevent.Greenlet.spawn(self.player.check_playlist)
|
gevent.Greenlet.spawn(self.player.check_playlist)
|
||||||
elif kind == 'mpc':
|
elif kind == 'mpc':
|
||||||
pass
|
pass
|
||||||
elif kind == 'add':
|
elif kind == 'uris_enqueue':
|
||||||
try:
|
try:
|
||||||
self.player.enqueue(args[0])
|
self.player.enqueue(args[0])
|
||||||
except AssertionError:
|
except AssertionError:
|
||||||
|
|
Loading…
Reference in a new issue