def path_to_local_directory_uri(relpath):
    """Convert path relative to :confval:`local/media_dir` to directory URI."""
    if isinstance(relpath, compat.text_type):
        relpath = relpath.encode('utf-8')
    return urllib.quote(relpath) % 'local:directory:%s'
dataset/ETHPy150Open mopidy/mopidy/mopidy/local/translator.py/path_to_local_directory_uri/swapped operands of `%`