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:
boyska 2016-09-08 22:46:03 +02:00
parent 9b9e0b72a4
commit 7f4fd09a78
No known key found for this signature in database
GPG key ID: 7395DCAE58289CA9
2 changed files with 4 additions and 4 deletions

View file

@ -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()

View file

@ -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: