Replace CustomOutput with override for LocalOutput
This commit is contained in:
parent
ebe9bba9a9
commit
1c233a3f8a
@ -1,14 +1,12 @@
|
|||||||
from mopidy import settings
|
from mopidy import settings
|
||||||
from mopidy.gstreamer import BaseOutput
|
from mopidy.gstreamer import BaseOutput
|
||||||
|
|
||||||
class LocalAudioOutput(BaseOutput):
|
class LocalOutput(BaseOutput):
|
||||||
def describe_bin(self):
|
def describe_bin(self):
|
||||||
|
if settings.LOCALOUTPUT_OVERRIDE:
|
||||||
|
return settings.LOCALOUTPUT_OVERRIDE
|
||||||
return 'autoaudiosink'
|
return 'autoaudiosink'
|
||||||
|
|
||||||
class CustomOutput(BaseOutput):
|
|
||||||
def describe_bin(self):
|
|
||||||
return settings.CUSTOM_OUTPUT
|
|
||||||
|
|
||||||
class NullOutput(BaseOutput):
|
class NullOutput(BaseOutput):
|
||||||
def describe_bin(self):
|
def describe_bin(self):
|
||||||
return 'fakesink'
|
return 'fakesink'
|
||||||
|
|||||||
@ -70,8 +70,8 @@ FRONTENDS = (
|
|||||||
#:
|
#:
|
||||||
#: Default::
|
#: Default::
|
||||||
#:
|
#:
|
||||||
#: CUSTOM_OUTPUT = None
|
#: LOCALOUTPUT_OVERRIDE = None
|
||||||
CUSTOM_OUTPUT= None
|
LOCALOUTPUT_OVERRIDE = None
|
||||||
|
|
||||||
#: Your `Last.fm <http://www.last.fm/>`_ username.
|
#: Your `Last.fm <http://www.last.fm/>`_ username.
|
||||||
#:
|
#:
|
||||||
|
|||||||
@ -97,7 +97,7 @@ def validate_settings(defaults, settings):
|
|||||||
'DUMP_LOG_FILENAME': 'DEBUG_LOG_FILENAME',
|
'DUMP_LOG_FILENAME': 'DEBUG_LOG_FILENAME',
|
||||||
'DUMP_LOG_FORMAT': 'DEBUG_LOG_FORMAT',
|
'DUMP_LOG_FORMAT': 'DEBUG_LOG_FORMAT',
|
||||||
'FRONTEND': 'FRONTENDS',
|
'FRONTEND': 'FRONTENDS',
|
||||||
'GSTREAMER_AUDIO_SINK': 'CUSTOM_OUTPUT',
|
'GSTREAMER_AUDIO_SINK': 'LOCALOUTPUT_OVERRIDE',
|
||||||
'LOCAL_MUSIC_FOLDER': 'LOCAL_MUSIC_PATH',
|
'LOCAL_MUSIC_FOLDER': 'LOCAL_MUSIC_PATH',
|
||||||
'LOCAL_PLAYLIST_FOLDER': 'LOCAL_PLAYLIST_PATH',
|
'LOCAL_PLAYLIST_FOLDER': 'LOCAL_PLAYLIST_PATH',
|
||||||
'LOCAL_TAG_CACHE': 'LOCAL_TAG_CACHE_FILE',
|
'LOCAL_TAG_CACHE': 'LOCAL_TAG_CACHE_FILE',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user