audio: Move PlaybackState from core to audio so audio can use it
This commit is contained in:
parent
76b1fa8e1b
commit
f9bd0d00b3
@ -3,3 +3,4 @@ from __future__ import unicode_literals
|
||||
# flake8: noqa
|
||||
from .actor import Audio
|
||||
from .listener import AudioListener
|
||||
from .constants import PlaybackState
|
||||
|
||||
16
mopidy/audio/constants.py
Normal file
16
mopidy/audio/constants.py
Normal file
@ -0,0 +1,16 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
class PlaybackState(object):
|
||||
"""
|
||||
Enum of playback states.
|
||||
"""
|
||||
|
||||
#: Constant representing the paused state.
|
||||
PAUSED = 'paused'
|
||||
|
||||
#: Constant representing the playing state.
|
||||
PLAYING = 'playing'
|
||||
|
||||
#: Constant representing the stopped state.
|
||||
STOPPED = 'stopped'
|
||||
@ -4,6 +4,8 @@ import logging
|
||||
import random
|
||||
import urlparse
|
||||
|
||||
from mopidy.audio import PlaybackState
|
||||
|
||||
from . import listener
|
||||
|
||||
|
||||
@ -24,21 +26,6 @@ def option_wrapper(name, default):
|
||||
return property(get_option, set_option)
|
||||
|
||||
|
||||
class PlaybackState(object):
|
||||
"""
|
||||
Enum of playback states.
|
||||
"""
|
||||
|
||||
#: Constant representing the paused state.
|
||||
PAUSED = 'paused'
|
||||
|
||||
#: Constant representing the playing state.
|
||||
PLAYING = 'playing'
|
||||
|
||||
#: Constant representing the stopped state.
|
||||
STOPPED = 'stopped'
|
||||
|
||||
|
||||
class PlaybackController(object):
|
||||
# pylint: disable = R0902
|
||||
# Too many instance attributes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user