/mopidy/settings.py

https://github.com/lann/mopidy · Python · 273 lines · 42 code · 33 blank · 198 comment · 0 complexity · 1fe8e184ee267e1193999ed807df77af MD5 · raw file

  1. """
  2. Available settings and their default values.
  3. .. warning::
  4. Do *not* change settings directly in :mod:`mopidy.settings`. Instead, add a
  5. file called ``~/.config/mopidy/settings.py`` and redefine settings there.
  6. """
  7. #: List of playback backends to use. See :mod:`mopidy.backends` for all
  8. #: available backends.
  9. #:
  10. #: Default::
  11. #:
  12. #: BACKENDS = (u'mopidy.backends.spotify.SpotifyBackend',)
  13. #:
  14. #: .. note::
  15. #: Currently only the first backend in the list is used.
  16. BACKENDS = (
  17. u'mopidy.backends.spotify.SpotifyBackend',
  18. )
  19. #: The log format used for informational logging.
  20. #:
  21. #: See http://docs.python.org/library/logging.html#formatter-objects for
  22. #: details on the format.
  23. CONSOLE_LOG_FORMAT = u'%(levelname)-8s %(message)s'
  24. #: Which GStreamer bin description to use in
  25. #: :class:`mopidy.outputs.custom.CustomOutput`.
  26. #:
  27. #: Default::
  28. #:
  29. #: CUSTOM_OUTPUT = u'fakesink'
  30. CUSTOM_OUTPUT = u'fakesink'
  31. #: The log format used for debug logging.
  32. #:
  33. #: See http://docs.python.org/library/logging.html#formatter-objects for
  34. #: details on the format.
  35. DEBUG_LOG_FORMAT = u'%(levelname)-8s %(asctime)s' + \
  36. ' [%(process)d:%(threadName)s] %(name)s\n %(message)s'
  37. #: The file to dump debug log data to when Mopidy is run with the
  38. #: :option:`--save-debug-log` option.
  39. #:
  40. #: Default::
  41. #:
  42. #: DEBUG_LOG_FILENAME = u'mopidy.log'
  43. DEBUG_LOG_FILENAME = u'mopidy.log'
  44. #: Location of the Mopidy .desktop file.
  45. #:
  46. #: Used by :mod:`mopidy.frontends.mpris`.
  47. #:
  48. #: Default::
  49. #:
  50. #: DESKTOP_FILE = u'/usr/share/applications/mopidy.desktop'
  51. DESKTOP_FILE = u'/usr/share/applications/mopidy.desktop'
  52. #: List of server frontends to use.
  53. #:
  54. #: Default::
  55. #:
  56. #: FRONTENDS = (
  57. #: u'mopidy.frontends.mpd.MpdFrontend',
  58. #: u'mopidy.frontends.lastfm.LastfmFrontend',
  59. #: u'mopidy.frontends.mpris.MprisFrontend',
  60. #: )
  61. FRONTENDS = (
  62. u'mopidy.frontends.mpd.MpdFrontend',
  63. u'mopidy.frontends.lastfm.LastfmFrontend',
  64. u'mopidy.frontends.mpris.MprisFrontend',
  65. )
  66. #: Your `Last.fm <http://www.last.fm/>`_ username.
  67. #:
  68. #: Used by :mod:`mopidy.frontends.lastfm`.
  69. LASTFM_USERNAME = u''
  70. #: Your `Last.fm <http://www.last.fm/>`_ password.
  71. #:
  72. #: Used by :mod:`mopidy.frontends.lastfm`.
  73. LASTFM_PASSWORD = u''
  74. #: Path to folder with local music.
  75. #:
  76. #: Used by :mod:`mopidy.backends.local`.
  77. #:
  78. #: Default::
  79. #:
  80. #: # Defaults to asking glib where music is stored, fallback is ~/music
  81. #: LOCAL_MUSIC_PATH = None
  82. LOCAL_MUSIC_PATH = None
  83. #: Path to playlist folder with m3u files for local music.
  84. #:
  85. #: Used by :mod:`mopidy.backends.local`.
  86. #:
  87. #: Default::
  88. #:
  89. #: LOCAL_PLAYLIST_PATH = None # Implies $XDG_DATA_DIR/mopidy/playlists
  90. LOCAL_PLAYLIST_PATH = None
  91. #: Path to tag cache for local music.
  92. #:
  93. #: Used by :mod:`mopidy.backends.local`.
  94. #:
  95. #: Default::
  96. #:
  97. #: LOCAL_TAG_CACHE_FILE = None # Implies $XDG_DATA_DIR/mopidy/tag_cache
  98. LOCAL_TAG_CACHE_FILE = None
  99. #: Sound mixer to use. See :mod:`mopidy.mixers` for all available mixers.
  100. #:
  101. #: Default::
  102. #:
  103. #: MIXER = u'mopidy.mixers.gstreamer_software.GStreamerSoftwareMixer'
  104. MIXER = u'mopidy.mixers.gstreamer_software.GStreamerSoftwareMixer'
  105. #: ALSA mixer only. What mixer control to use. If set to :class:`False`, first
  106. #: ``Master`` and then ``PCM`` will be tried.
  107. #:
  108. #: Example: ``Master Front``. Default: :class:`False`
  109. MIXER_ALSA_CONTROL = False
  110. #: External mixers only. Which port the mixer is connected to.
  111. #:
  112. #: This must point to the device port like ``/dev/ttyUSB0``.
  113. #:
  114. #: Default: :class:`None`
  115. MIXER_EXT_PORT = None
  116. #: External mixers only. What input source the external mixer should use.
  117. #:
  118. #: Example: ``Aux``. Default: :class:`None`
  119. MIXER_EXT_SOURCE = None
  120. #: External mixers only. What state Speakers A should be in.
  121. #:
  122. #: Default: :class:`None`.
  123. MIXER_EXT_SPEAKERS_A = None
  124. #: External mixers only. What state Speakers B should be in.
  125. #:
  126. #: Default: :class:`None`.
  127. MIXER_EXT_SPEAKERS_B = None
  128. #: The maximum volume. Integer in the range 0 to 100.
  129. #:
  130. #: If this settings is set to 80, the mixer will set the actual volume to 80
  131. #: when asked to set it to 100.
  132. #:
  133. #: Default::
  134. #:
  135. #: MIXER_MAX_VOLUME = 100
  136. MIXER_MAX_VOLUME = 100
  137. #: Which address Mopidy's MPD server should bind to.
  138. #:
  139. #:Examples:
  140. #:
  141. #: ``127.0.0.1``
  142. #: Listens only on the IPv4 loopback interface. Default.
  143. #: ``::1``
  144. #: Listens only on the IPv6 loopback interface.
  145. #: ``0.0.0.0``
  146. #: Listens on all IPv4 interfaces.
  147. #: ``::``
  148. #: Listens on all interfaces, both IPv4 and IPv6.
  149. MPD_SERVER_HOSTNAME = u'127.0.0.1'
  150. #: Which TCP port Mopidy's MPD server should listen to.
  151. #:
  152. #: Default: 6600
  153. MPD_SERVER_PORT = 6600
  154. #: The password required for connecting to the MPD server.
  155. #:
  156. #: Default: :class:`None`, which means no password required.
  157. MPD_SERVER_PASSWORD = None
  158. #: List of outputs to use. See :mod:`mopidy.outputs` for all available
  159. #: backends
  160. #:
  161. #: Default::
  162. #:
  163. #: OUTPUTS = (
  164. #: u'mopidy.outputs.local.LocalOutput',
  165. #: )
  166. OUTPUTS = (
  167. u'mopidy.outputs.local.LocalOutput',
  168. )
  169. #: Hostname of the SHOUTcast server which Mopidy should stream audio to.
  170. #:
  171. #: Used by :mod:`mopidy.outputs.shoutcast`.
  172. #:
  173. #: Default::
  174. #:
  175. #: SHOUTCAST_OUTPUT_HOSTNAME = u'127.0.0.1'
  176. SHOUTCAST_OUTPUT_HOSTNAME = u'127.0.0.1'
  177. #: Port of the SHOUTcast server.
  178. #:
  179. #: Used by :mod:`mopidy.outputs.shoutcast`.
  180. #:
  181. #: Default::
  182. #:
  183. #: SHOUTCAST_OUTPUT_PORT = 8000
  184. SHOUTCAST_OUTPUT_PORT = 8000
  185. #: User to authenticate as against SHOUTcast server.
  186. #:
  187. #: Used by :mod:`mopidy.outputs.shoutcast`.
  188. #:
  189. #: Default::
  190. #:
  191. #: SHOUTCAST_OUTPUT_USERNAME = u'source'
  192. SHOUTCAST_OUTPUT_USERNAME = u'source'
  193. #: Password to authenticate with against SHOUTcast server.
  194. #:
  195. #: Used by :mod:`mopidy.outputs.shoutcast`.
  196. #:
  197. #: Default::
  198. #:
  199. #: SHOUTCAST_OUTPUT_PASSWORD = u'hackme'
  200. SHOUTCAST_OUTPUT_PASSWORD = u'hackme'
  201. #: Mountpoint to use for the stream on the SHOUTcast server.
  202. #:
  203. #: Used by :mod:`mopidy.outputs.shoutcast`.
  204. #:
  205. #: Default::
  206. #:
  207. #: SHOUTCAST_OUTPUT_MOUNT = u'/stream'
  208. SHOUTCAST_OUTPUT_MOUNT = u'/stream'
  209. #: Encoder to use to process audio data before streaming to SHOUTcast server.
  210. #:
  211. #: Used by :mod:`mopidy.outputs.shoutcast`.
  212. #:
  213. #: Default::
  214. #:
  215. #: SHOUTCAST_OUTPUT_ENCODER = u'lame mode=stereo bitrate=320'
  216. SHOUTCAST_OUTPUT_ENCODER = u'lame mode=stereo bitrate=320'
  217. #: Path to the Spotify cache.
  218. #:
  219. #: Used by :mod:`mopidy.backends.spotify`.
  220. SPOTIFY_CACHE_PATH = None
  221. #: Your Spotify Premium username.
  222. #:
  223. #: Used by :mod:`mopidy.backends.spotify`.
  224. SPOTIFY_USERNAME = u''
  225. #: Your Spotify Premium password.
  226. #:
  227. #: Used by :mod:`mopidy.backends.spotify`.
  228. SPOTIFY_PASSWORD = u''
  229. #: Spotify preferred bitrate.
  230. #:
  231. #: Available values are 96, 160, and 320.
  232. #:
  233. #: Used by :mod:`mopidy.backends.spotify`.
  234. #
  235. #: Default::
  236. #:
  237. #: SPOTIFY_BITRATE = 160
  238. SPOTIFY_BITRATE = 160