docs: Document mopidy.local.translator
This commit is contained in:
parent
c59784c1e8
commit
64b5342c51
@ -6,4 +6,18 @@ For details on how to use Mopidy's local backend, see :ref:`ext-local`.
|
||||
|
||||
.. automodule:: mopidy.local
|
||||
:synopsis: Local backend
|
||||
|
||||
|
||||
Local library API
|
||||
=================
|
||||
|
||||
.. autoclass:: mopidy.local.Library
|
||||
:members:
|
||||
|
||||
|
||||
Translation utils
|
||||
=================
|
||||
|
||||
.. automodule:: mopidy.local.translator
|
||||
:synopsis: Translators for local library extensions
|
||||
:members:
|
||||
|
||||
@ -38,7 +38,8 @@ def path_to_file_uri(abspath):
|
||||
|
||||
|
||||
def path_to_local_track_uri(relpath):
|
||||
"""Convert path relative to media_dir to local track URI."""
|
||||
"""Convert path relative to :confval:`local/media_dir` to local track
|
||||
URI."""
|
||||
if isinstance(relpath, compat.text_type):
|
||||
relpath = relpath.encode('utf-8')
|
||||
return b'local:track:%s' % urllib.quote(relpath)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user