mpd: Move mopidy.{frontends => }.mpd
This commit is contained in:
parent
621aff22c9
commit
1ee534126e
@ -8,8 +8,8 @@ Core API
|
||||
:synopsis: Core API for use by frontends
|
||||
|
||||
The core API is the interface that is used by frontends like
|
||||
:mod:`mopidy.frontends.mpd`. The core layer is inbetween the frontends and the
|
||||
backends.
|
||||
:mod:`mopidy.http` and :mod:`mopidy.mpd`. The core layer is inbetween the
|
||||
frontends and the backends.
|
||||
|
||||
.. autoclass:: mopidy.core.Core
|
||||
:members:
|
||||
|
||||
@ -48,4 +48,4 @@ Frontend implementations
|
||||
========================
|
||||
|
||||
* :mod:`mopidy.http`
|
||||
* :mod:`mopidy.frontends.mpd`
|
||||
* :mod:`mopidy.mpd`
|
||||
|
||||
@ -12,8 +12,7 @@ server project <http://mpd.wikia.com/>`_. Mopidy does not depend on the
|
||||
original MPD server, but implements the MPD protocol itself, and is thus
|
||||
compatible with clients for the original MPD server.
|
||||
|
||||
For more details on our MPD server implementation, see
|
||||
:mod:`mopidy.frontends.mpd`.
|
||||
For more details on our MPD server implementation, see :mod:`mopidy.mpd`.
|
||||
|
||||
|
||||
Known issues
|
||||
@ -54,7 +53,7 @@ None. The extension just needs Mopidy.
|
||||
Default configuration
|
||||
=====================
|
||||
|
||||
.. literalinclude:: ../../mopidy/frontends/mpd/ext.conf
|
||||
.. literalinclude:: ../../mopidy/mpd/ext.conf
|
||||
:language: ini
|
||||
|
||||
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
*****************************************
|
||||
:mod:`mopidy.frontends.mpd` -- MPD server
|
||||
:mod:`mopidy.mpd` -- MPD server
|
||||
*****************************************
|
||||
|
||||
For details on how to use Mopidy's MPD server, see :ref:`ext-mpd`.
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd
|
||||
.. automodule:: mopidy.mpd
|
||||
:synopsis: MPD server frontend
|
||||
|
||||
|
||||
MPD dispatcher
|
||||
==============
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.dispatcher
|
||||
.. automodule:: mopidy.mpd.dispatcher
|
||||
:synopsis: MPD request dispatcher
|
||||
:members:
|
||||
|
||||
@ -19,7 +19,7 @@ MPD dispatcher
|
||||
MPD protocol
|
||||
============
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol
|
||||
.. automodule:: mopidy.mpd.protocol
|
||||
:synopsis: MPD protocol
|
||||
:members:
|
||||
|
||||
@ -27,7 +27,7 @@ MPD protocol
|
||||
Audio output
|
||||
------------
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol.audio_output
|
||||
.. automodule:: mopidy.mpd.protocol.audio_output
|
||||
:synopsis: MPD protocol: audio output
|
||||
:members:
|
||||
|
||||
@ -35,7 +35,7 @@ Audio output
|
||||
Channels
|
||||
--------
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol.channels
|
||||
.. automodule:: mopidy.mpd.protocol.channels
|
||||
:synopsis: MPD protocol: channels -- client to client communication
|
||||
:members:
|
||||
|
||||
@ -43,7 +43,7 @@ Channels
|
||||
Command list
|
||||
------------
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol.command_list
|
||||
.. automodule:: mopidy.mpd.protocol.command_list
|
||||
:synopsis: MPD protocol: command list
|
||||
:members:
|
||||
|
||||
@ -51,7 +51,7 @@ Command list
|
||||
Connection
|
||||
----------
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol.connection
|
||||
.. automodule:: mopidy.mpd.protocol.connection
|
||||
:synopsis: MPD protocol: connection
|
||||
:members:
|
||||
|
||||
@ -59,7 +59,7 @@ Connection
|
||||
Current playlist
|
||||
----------------
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol.current_playlist
|
||||
.. automodule:: mopidy.mpd.protocol.current_playlist
|
||||
:synopsis: MPD protocol: current playlist
|
||||
:members:
|
||||
|
||||
@ -67,7 +67,7 @@ Current playlist
|
||||
Music database
|
||||
--------------
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol.music_db
|
||||
.. automodule:: mopidy.mpd.protocol.music_db
|
||||
:synopsis: MPD protocol: music database
|
||||
:members:
|
||||
|
||||
@ -75,7 +75,7 @@ Music database
|
||||
Playback
|
||||
--------
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol.playback
|
||||
.. automodule:: mopidy.mpd.protocol.playback
|
||||
:synopsis: MPD protocol: playback
|
||||
:members:
|
||||
|
||||
@ -83,7 +83,7 @@ Playback
|
||||
Reflection
|
||||
----------
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol.reflection
|
||||
.. automodule:: mopidy.mpd.protocol.reflection
|
||||
:synopsis: MPD protocol: reflection
|
||||
:members:
|
||||
|
||||
@ -91,7 +91,7 @@ Reflection
|
||||
Status
|
||||
------
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol.status
|
||||
.. automodule:: mopidy.mpd.protocol.status
|
||||
:synopsis: MPD protocol: status
|
||||
:members:
|
||||
|
||||
@ -99,7 +99,7 @@ Status
|
||||
Stickers
|
||||
--------
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol.stickers
|
||||
.. automodule:: mopidy.mpd.protocol.stickers
|
||||
:synopsis: MPD protocol: stickers
|
||||
:members:
|
||||
|
||||
@ -107,6 +107,6 @@ Stickers
|
||||
Stored playlists
|
||||
----------------
|
||||
|
||||
.. automodule:: mopidy.frontends.mpd.protocol.stored_playlists
|
||||
.. automodule:: mopidy.mpd.protocol.stored_playlists
|
||||
:synopsis: MPD protocol: stored playlists
|
||||
:members:
|
||||
@ -7,10 +7,10 @@ import pykka
|
||||
|
||||
from mopidy import zeroconf
|
||||
from mopidy.core import CoreListener
|
||||
from mopidy.frontends.mpd import session
|
||||
from mopidy.mpd import session
|
||||
from mopidy.utils import encoding, network, process
|
||||
|
||||
logger = logging.getLogger('mopidy.frontends.mpd')
|
||||
logger = logging.getLogger('mopidy.mpd')
|
||||
|
||||
|
||||
class MpdFrontend(pykka.ThreadingActor, CoreListener):
|
||||
@ -5,9 +5,9 @@ import re
|
||||
|
||||
import pykka
|
||||
|
||||
from mopidy.frontends.mpd import exceptions, protocol
|
||||
from mopidy.mpd import exceptions, protocol
|
||||
|
||||
logger = logging.getLogger('mopidy.frontends.mpd.dispatcher')
|
||||
logger = logging.getLogger('mopidy.mpd.dispatcher')
|
||||
|
||||
protocol.load_protocol_modules()
|
||||
|
||||
@ -221,7 +221,7 @@ class MpdContext(object):
|
||||
#: The current :class:`MpdDispatcher`.
|
||||
dispatcher = None
|
||||
|
||||
#: The current :class:`mopidy.frontends.mpd.MpdSession`.
|
||||
#: The current :class:`mopidy.mpd.MpdSession`.
|
||||
session = None
|
||||
|
||||
#: The Mopidy configuration.
|
||||
@ -1,7 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mopidy.frontends.mpd.exceptions import MpdNoExistError
|
||||
from mopidy.frontends.mpd.protocol import handle_request
|
||||
from mopidy.mpd.exceptions import MpdNoExistError
|
||||
from mopidy.mpd.protocol import handle_request
|
||||
|
||||
|
||||
@handle_request(r'disableoutput\ "(?P<outputid>\d+)"$')
|
||||
@ -1,7 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mopidy.frontends.mpd.protocol import handle_request
|
||||
from mopidy.frontends.mpd.exceptions import MpdNotImplemented
|
||||
from mopidy.mpd.protocol import handle_request
|
||||
from mopidy.mpd.exceptions import MpdNotImplemented
|
||||
|
||||
|
||||
@handle_request(r'subscribe\ "(?P<channel>[A-Za-z0-9:._-]+)"$')
|
||||
@ -1,7 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mopidy.frontends.mpd.protocol import handle_request
|
||||
from mopidy.frontends.mpd.exceptions import MpdUnknownCommand
|
||||
from mopidy.mpd.protocol import handle_request
|
||||
from mopidy.mpd.exceptions import MpdUnknownCommand
|
||||
|
||||
|
||||
@handle_request(r'command_list_begin$')
|
||||
@ -1,7 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mopidy.frontends.mpd.protocol import handle_request
|
||||
from mopidy.frontends.mpd.exceptions import (
|
||||
from mopidy.mpd.protocol import handle_request
|
||||
from mopidy.mpd.exceptions import (
|
||||
MpdPasswordError, MpdPermissionError)
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mopidy.frontends.mpd import translator
|
||||
from mopidy.frontends.mpd.exceptions import (
|
||||
from mopidy.mpd import translator
|
||||
from mopidy.mpd.exceptions import (
|
||||
MpdArgError, MpdNoExistError, MpdNotImplemented)
|
||||
from mopidy.frontends.mpd.protocol import handle_request
|
||||
from mopidy.mpd.protocol import handle_request
|
||||
|
||||
|
||||
@handle_request(r'add\ "(?P<uri>[^"]*)"$')
|
||||
@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mopidy.frontends.mpd.protocol import handle_request
|
||||
from mopidy.mpd.protocol import handle_request
|
||||
|
||||
|
||||
@handle_request(r'[\ ]*$')
|
||||
@ -5,9 +5,9 @@ import itertools
|
||||
import re
|
||||
|
||||
from mopidy.models import Track
|
||||
from mopidy.frontends.mpd import translator
|
||||
from mopidy.frontends.mpd.exceptions import MpdArgError, MpdNotImplemented
|
||||
from mopidy.frontends.mpd.protocol import handle_request, stored_playlists
|
||||
from mopidy.mpd import translator
|
||||
from mopidy.mpd.exceptions import MpdArgError, MpdNotImplemented
|
||||
from mopidy.mpd.protocol import handle_request, stored_playlists
|
||||
|
||||
|
||||
LIST_QUERY = r"""
|
||||
@ -1,8 +1,8 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mopidy.core import PlaybackState
|
||||
from mopidy.frontends.mpd.protocol import handle_request
|
||||
from mopidy.frontends.mpd.exceptions import (
|
||||
from mopidy.mpd.protocol import handle_request
|
||||
from mopidy.mpd.exceptions import (
|
||||
MpdArgError, MpdNoExistError, MpdNotImplemented)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mopidy.frontends.mpd.exceptions import MpdPermissionError
|
||||
from mopidy.frontends.mpd.protocol import handle_request, mpd_commands
|
||||
from mopidy.mpd.exceptions import MpdPermissionError
|
||||
from mopidy.mpd.protocol import handle_request, mpd_commands
|
||||
|
||||
|
||||
@handle_request(r'config$', auth_required=False)
|
||||
@ -3,9 +3,9 @@ from __future__ import unicode_literals
|
||||
import pykka
|
||||
|
||||
from mopidy.core import PlaybackState
|
||||
from mopidy.frontends.mpd.exceptions import MpdNotImplemented
|
||||
from mopidy.frontends.mpd.protocol import handle_request
|
||||
from mopidy.frontends.mpd.translator import track_to_mpd_format
|
||||
from mopidy.mpd.exceptions import MpdNotImplemented
|
||||
from mopidy.mpd.protocol import handle_request
|
||||
from mopidy.mpd.translator import track_to_mpd_format
|
||||
|
||||
#: Subsystems that can be registered with idle command.
|
||||
SUBSYSTEMS = [
|
||||
@ -1,7 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mopidy.frontends.mpd.protocol import handle_request
|
||||
from mopidy.frontends.mpd.exceptions import MpdNotImplemented
|
||||
from mopidy.mpd.protocol import handle_request
|
||||
from mopidy.mpd.exceptions import MpdNotImplemented
|
||||
|
||||
|
||||
@handle_request(
|
||||
@ -2,9 +2,9 @@ from __future__ import unicode_literals
|
||||
|
||||
import datetime as dt
|
||||
|
||||
from mopidy.frontends.mpd.exceptions import MpdNoExistError, MpdNotImplemented
|
||||
from mopidy.frontends.mpd.protocol import handle_request
|
||||
from mopidy.frontends.mpd.translator import playlist_to_mpd_format
|
||||
from mopidy.mpd.exceptions import MpdNoExistError, MpdNotImplemented
|
||||
from mopidy.mpd.protocol import handle_request
|
||||
from mopidy.mpd.translator import playlist_to_mpd_format
|
||||
|
||||
|
||||
@handle_request(r'listplaylist\ ("?)(?P<name>[^"]+)\1$')
|
||||
@ -2,10 +2,10 @@ from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from mopidy.frontends.mpd import dispatcher, protocol
|
||||
from mopidy.mpd import dispatcher, protocol
|
||||
from mopidy.utils import formatting, network
|
||||
|
||||
logger = logging.getLogger('mopidy.frontends.mpd')
|
||||
logger = logging.getLogger('mopidy.mpd')
|
||||
|
||||
|
||||
class MpdSession(network.LineProtocol):
|
||||
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
import shlex
|
||||
|
||||
from mopidy.frontends.mpd.exceptions import MpdArgError
|
||||
from mopidy.mpd.exceptions import MpdArgError
|
||||
from mopidy.models import TlTrack
|
||||
|
||||
# TODO: special handling of local:// uri scheme
|
||||
2
setup.py
2
setup.py
@ -44,7 +44,7 @@ setup(
|
||||
'http = mopidy.http:Extension [http]',
|
||||
'local = mopidy.backends.local:Extension',
|
||||
'local-json = mopidy.backends.local.json:Extension',
|
||||
'mpd = mopidy.frontends.mpd:Extension',
|
||||
'mpd = mopidy.mpd:Extension',
|
||||
'stream = mopidy.backends.stream:Extension',
|
||||
],
|
||||
},
|
||||
|
||||
@ -6,9 +6,9 @@ import pykka
|
||||
|
||||
from mopidy import core
|
||||
from mopidy.backends import dummy
|
||||
from mopidy.frontends.mpd.dispatcher import MpdDispatcher
|
||||
from mopidy.frontends.mpd.exceptions import MpdAckError
|
||||
from mopidy.frontends.mpd.protocol import request_handlers, handle_request
|
||||
from mopidy.mpd.dispatcher import MpdDispatcher
|
||||
from mopidy.mpd.exceptions import MpdAckError
|
||||
from mopidy.mpd.protocol import request_handlers, handle_request
|
||||
|
||||
|
||||
class MpdDispatcherTest(unittest.TestCase):
|
||||
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
from mopidy.frontends.mpd.exceptions import (
|
||||
from mopidy.mpd.exceptions import (
|
||||
MpdAckError, MpdPermissionError, MpdUnknownCommand, MpdSystemError,
|
||||
MpdNotImplemented)
|
||||
|
||||
@ -7,7 +7,7 @@ import pykka
|
||||
|
||||
from mopidy import core
|
||||
from mopidy.backends import dummy
|
||||
from mopidy.frontends.mpd import session
|
||||
from mopidy.mpd import session
|
||||
|
||||
|
||||
class MockConnection(mock.Mock):
|
||||
@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class AudioOutputHandlerTest(protocol.BaseTestCase):
|
||||
@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class AuthenticationActiveTest(protocol.BaseTestCase):
|
||||
@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class ChannelsHandlerTest(protocol.BaseTestCase):
|
||||
@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class CommandListsTest(protocol.BaseTestCase):
|
||||
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from mock import patch
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class ConnectionHandlerTest(protocol.BaseTestCase):
|
||||
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from mopidy.models import Track
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class CurrentPlaylistHandlerTest(protocol.BaseTestCase):
|
||||
@ -2,9 +2,9 @@ from __future__ import unicode_literals
|
||||
|
||||
from mock import patch
|
||||
|
||||
from mopidy.frontends.mpd.protocol.status import SUBSYSTEMS
|
||||
from mopidy.mpd.protocol.status import SUBSYSTEMS
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class IdleHandlerTest(protocol.BaseTestCase):
|
||||
@ -2,10 +2,10 @@ from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
from mopidy.frontends.mpd.protocol import music_db
|
||||
from mopidy.mpd.protocol import music_db
|
||||
from mopidy.models import Album, Artist, SearchResult, Track
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class QueryFromMpdSearchFormatTest(unittest.TestCase):
|
||||
@ -5,7 +5,7 @@ import unittest
|
||||
from mopidy.core import PlaybackState
|
||||
from mopidy.models import Track
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
PAUSED = PlaybackState.PAUSED
|
||||
@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class ReflectionHandlerTest(protocol.BaseTestCase):
|
||||
@ -4,7 +4,7 @@ import random
|
||||
|
||||
from mopidy.models import Track
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class IssueGH17RegressionTest(protocol.BaseTestCase):
|
||||
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from mopidy.models import Track
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class StatusHandlerTest(protocol.BaseTestCase):
|
||||
@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class StickersHandlerTest(protocol.BaseTestCase):
|
||||
@ -4,7 +4,7 @@ import datetime
|
||||
|
||||
from mopidy.models import Track, Playlist
|
||||
|
||||
from tests.frontends.mpd import protocol
|
||||
from tests.mpd import protocol
|
||||
|
||||
|
||||
class PlaylistsHandlerTest(protocol.BaseTestCase):
|
||||
@ -7,8 +7,8 @@ import pykka
|
||||
from mopidy import core
|
||||
from mopidy.backends import dummy
|
||||
from mopidy.core import PlaybackState
|
||||
from mopidy.frontends.mpd import dispatcher
|
||||
from mopidy.frontends.mpd.protocol import status
|
||||
from mopidy.mpd import dispatcher
|
||||
from mopidy.mpd.protocol import status
|
||||
from mopidy.models import Track
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import datetime
|
||||
import unittest
|
||||
|
||||
from mopidy.utils.path import mtime
|
||||
from mopidy.frontends.mpd import translator
|
||||
from mopidy.mpd import translator
|
||||
from mopidy.models import Album, Artist, TlTrack, Playlist, Track
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user