audio: Move PlaybackState from core to audio so audio can use it

This commit is contained in:
Stein Magnus Jodal 2012-11-14 00:35:17 +01:00
parent 76b1fa8e1b
commit f9bd0d00b3
3 changed files with 19 additions and 15 deletions

View File

@ -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
View 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'

View File

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