Require Pykka 0.12 (not released yet)
This commit is contained in:
parent
5d6fc7b092
commit
4452957c10
@ -25,7 +25,7 @@ Otherwise, make sure you got the required dependencies installed.
|
||||
|
||||
- Python >= 2.6, < 3
|
||||
|
||||
- `Pykka <http://jodal.github.com/pykka/>`_ >= 0.11
|
||||
- `Pykka <http://jodal.github.com/pykka/>`_ >= 0.12
|
||||
|
||||
- GStreamer >= 0.10, with Python bindings. See :doc:`gstreamer`.
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ class LocalBackend(ThreadingActor, Backend):
|
||||
|
||||
self.output = None
|
||||
|
||||
def post_start(self):
|
||||
def pre_start(self):
|
||||
output_refs = ActorRegistry.get_by_class(BaseOutput)
|
||||
assert len(output_refs) == 1, 'Expected exactly one running output.'
|
||||
self.output = output_refs[0].proxy()
|
||||
|
||||
@ -66,7 +66,7 @@ class SpotifyBackend(ThreadingActor, Backend):
|
||||
self.output = None
|
||||
self.spotify = None
|
||||
|
||||
def post_start(self):
|
||||
def pre_start(self):
|
||||
output_refs = ActorRegistry.get_by_class(BaseOutput)
|
||||
assert len(output_refs) == 1, 'Expected exactly one running output.'
|
||||
self.output = output_refs[0].proxy()
|
||||
|
||||
@ -40,7 +40,7 @@ class LastfmFrontend(ThreadingActor, BaseFrontend):
|
||||
self.lastfm = None
|
||||
self.last_start_time = None
|
||||
|
||||
def post_start(self):
|
||||
def pre_start(self):
|
||||
try:
|
||||
username = settings.LASTFM_USERNAME
|
||||
password_hash = pylast.md5(settings.LASTFM_PASSWORD)
|
||||
|
||||
@ -23,7 +23,7 @@ class MpdFrontend(ThreadingActor, BaseFrontend):
|
||||
def __init__(self):
|
||||
self._thread = None
|
||||
|
||||
def post_start(self):
|
||||
def pre_start(self):
|
||||
self._thread = MpdThread()
|
||||
self._thread.start()
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ class AlsaMixer(ThreadingActor, BaseMixer):
|
||||
def __init__(self):
|
||||
self._mixer = None
|
||||
|
||||
def post_start(self):
|
||||
def pre_start(self):
|
||||
self._mixer = alsaaudio.Mixer(self._get_mixer_control())
|
||||
assert self._mixer is not None
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ class DenonMixer(ThreadingActor, BaseMixer):
|
||||
self._levels = ['99'] + ["%(#)02d" % {'#': v} for v in range(0, 99)]
|
||||
self._volume = 0
|
||||
|
||||
def post_start(self):
|
||||
def pre_start(self):
|
||||
if self._device is None:
|
||||
from serial import Serial
|
||||
self._device = Serial(port=settings.MIXER_EXT_PORT, timeout=0.2)
|
||||
|
||||
@ -10,7 +10,7 @@ class GStreamerSoftwareMixer(ThreadingActor, BaseMixer):
|
||||
def __init__(self):
|
||||
self.output = None
|
||||
|
||||
def post_start(self):
|
||||
def pre_start(self):
|
||||
output_refs = ActorRegistry.get_by_class(BaseOutput)
|
||||
assert len(output_refs) == 1, 'Expected exactly one running output.'
|
||||
self.output = output_refs[0].proxy()
|
||||
|
||||
@ -73,7 +73,7 @@ class NadTalker(ThreadingActor):
|
||||
def __init__(self):
|
||||
self._device = None
|
||||
|
||||
def post_start(self):
|
||||
def pre_start(self):
|
||||
self._open_connection()
|
||||
self._set_device_to_known_state()
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ class GStreamerOutput(ThreadingActor, BaseOutput):
|
||||
def __init__(self):
|
||||
self.gst_pipeline = None
|
||||
|
||||
def post_start(self):
|
||||
def pre_start(self):
|
||||
self._setup_gstreamer()
|
||||
|
||||
def _setup_gstreamer(self):
|
||||
|
||||
@ -1 +1 @@
|
||||
Pykka >= 0.11
|
||||
Pykka >= 0.12
|
||||
|
||||
@ -19,7 +19,7 @@ class GStreamerOutputTest(unittest.TestCase):
|
||||
settings.BACKENDS = ('mopidy.backends.local.LocalBackend',)
|
||||
self.song_uri = path_to_uri(data_folder('song1.wav'))
|
||||
self.output = GStreamerOutput()
|
||||
self.output.post_start()
|
||||
self.output.pre_start()
|
||||
|
||||
def tearDown(self):
|
||||
settings.runtime.clear()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user