diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py index 4d57e86e..92abe4bc 100644 --- a/mopidy/audio/actor.py +++ b/mopidy/audio/actor.py @@ -721,7 +721,7 @@ class Audio(pykka.ThreadingActor): gst_logger.debug('State change to %s: result=%s', state.value_name, result.value_name) - if result == Gst.State.CHANGE_FAILURE: + if result == Gst.StateChangeReturn.FAILURE: logger.warning( 'Setting GStreamer state to %s failed', state.value_name) return False diff --git a/mopidy/audio/scan.py b/mopidy/audio/scan.py index 0518da8b..7cc5b1e5 100644 --- a/mopidy/audio/scan.py +++ b/mopidy/audio/scan.py @@ -108,7 +108,8 @@ def _pad_added(element, pad, pipeline): def _start_pipeline(pipeline): - if pipeline.set_state(Gst.State.PAUSED) == Gst.State.CHANGE_NO_PREROLL: + result = pipeline.set_state(Gst.State.PAUSED) + if result == Gst.StateChangeReturn.NO_PREROLL: pipeline.set_state(Gst.State.PLAYING)