Document settings profiles hack.
This commit is contained in:
parent
9b6c17db96
commit
8ff98195c7
@ -196,8 +196,9 @@ of writing. See ``--help`` for available options. Sample session::
|
||||
+ACK [2@0] {listallinfo} incorrect arguments
|
||||
|
||||
To ensure that Mopidy and MPD have comparable state it is suggested you setup
|
||||
both to use ``tests/data/library_tag_cache`` for their tag cache and
|
||||
``tests/data`` for music/playlist folders.
|
||||
both to use ``tests/data/advanced_tag_cache`` for their tag cache and
|
||||
``tests/data/scanner/advanced/`` for the music folder and ``tests/data`` for
|
||||
playlists.
|
||||
|
||||
|
||||
Writing documentation
|
||||
@ -246,3 +247,32 @@ Creating releases
|
||||
python setup.py sdist upload
|
||||
|
||||
#. Spread the word.
|
||||
|
||||
|
||||
Setting profiles during development
|
||||
===================================
|
||||
|
||||
While developing Mopidy switching settings back and forth can become an all too
|
||||
frequent occurrence. As a quick hack to get around this you can structure your
|
||||
settings file in the following way::
|
||||
|
||||
import os
|
||||
profile = os.environ.get('PROFILE', '').split(',')
|
||||
|
||||
if 'spotify' in profile:
|
||||
BACKENDS = (u'mopidy.backends.spotify.SpotifyBackend',)
|
||||
elif 'local' in profile:
|
||||
BACKENDS = (u'mopidy.backends.local.LocalBackend',)
|
||||
LOCAL_MUSIC_PATH = u'~/music'
|
||||
|
||||
if 'shoutcast' in profile:
|
||||
OUTPUT = u'lame ! shout2send mount="/stream"'
|
||||
elif 'silent' in profile:
|
||||
OUTPUT = 'fakesink'
|
||||
MIXER = None
|
||||
|
||||
SPOTIFY_USERNAME = 'xxxxx'
|
||||
SPOTIFY_PASSWORD = 'xxxxx'
|
||||
|
||||
Using this setup you can now run Mopidy with ``PROFILE=silent,spotify mopidy``
|
||||
if you for instance want to test Spotify without any actual audio output.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user