From 1ee534126ed85f3d0f98f546a3a6add764b06d54 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Tue, 31 Dec 2013 14:11:16 +0100 Subject: [PATCH] mpd: Move mopidy.{frontends => }.mpd --- docs/api/core.rst | 4 +-- docs/api/frontends.rst | 2 +- docs/ext/mpd.rst | 5 ++-- docs/modules/{frontends => }/mpd.rst | 30 +++++++++---------- mopidy/{frontends => }/mpd/__init__.py | 0 mopidy/{frontends => }/mpd/actor.py | 4 +-- mopidy/{frontends => }/mpd/dispatcher.py | 6 ++-- mopidy/{frontends => }/mpd/exceptions.py | 0 mopidy/{frontends => }/mpd/ext.conf | 0 .../{frontends => }/mpd/protocol/__init__.py | 0 .../mpd/protocol/audio_output.py | 4 +-- .../{frontends => }/mpd/protocol/channels.py | 4 +-- .../mpd/protocol/command_list.py | 4 +-- .../mpd/protocol/connection.py | 4 +-- .../mpd/protocol/current_playlist.py | 6 ++-- mopidy/{frontends => }/mpd/protocol/empty.py | 2 +- .../{frontends => }/mpd/protocol/music_db.py | 6 ++-- .../{frontends => }/mpd/protocol/playback.py | 4 +-- .../mpd/protocol/reflection.py | 4 +-- mopidy/{frontends => }/mpd/protocol/status.py | 6 ++-- .../{frontends => }/mpd/protocol/stickers.py | 4 +-- .../mpd/protocol/stored_playlists.py | 6 ++-- mopidy/{frontends => }/mpd/session.py | 4 +-- mopidy/{frontends => }/mpd/translator.py | 2 +- setup.py | 2 +- tests/{frontends => }/mpd/__init__.py | 0 tests/{frontends => }/mpd/dispatcher_test.py | 6 ++-- tests/{frontends => }/mpd/exception_test.py | 2 +- .../{frontends => }/mpd/protocol/__init__.py | 2 +- .../mpd/protocol/audio_output_test.py | 2 +- .../mpd/protocol/authentication_test.py | 2 +- .../mpd/protocol/channels_test.py | 2 +- .../mpd/protocol/command_list_test.py | 2 +- .../mpd/protocol/connection_test.py | 2 +- .../mpd/protocol/current_playlist_test.py | 2 +- .../{frontends => }/mpd/protocol/idle_test.py | 4 +-- .../mpd/protocol/music_db_test.py | 4 +-- .../mpd/protocol/playback_test.py | 2 +- .../mpd/protocol/reflection_test.py | 2 +- .../mpd/protocol/regression_test.py | 2 +- .../mpd/protocol/status_test.py | 2 +- .../mpd/protocol/stickers_test.py | 2 +- .../mpd/protocol/stored_playlists_test.py | 2 +- tests/{frontends => }/mpd/status_test.py | 4 +-- tests/{frontends => }/mpd/translator_test.py | 2 +- 45 files changed, 80 insertions(+), 81 deletions(-) rename docs/modules/{frontends => }/mpd.rst (61%) rename mopidy/{frontends => }/mpd/__init__.py (100%) rename mopidy/{frontends => }/mpd/actor.py (96%) rename mopidy/{frontends => }/mpd/dispatcher.py (98%) rename mopidy/{frontends => }/mpd/exceptions.py (100%) rename mopidy/{frontends => }/mpd/ext.conf (100%) rename mopidy/{frontends => }/mpd/protocol/__init__.py (100%) rename mopidy/{frontends => }/mpd/protocol/audio_output.py (90%) rename mopidy/{frontends => }/mpd/protocol/channels.py (93%) rename mopidy/{frontends => }/mpd/protocol/command_list.py (95%) rename mopidy/{frontends => }/mpd/protocol/connection.py (91%) rename mopidy/{frontends => }/mpd/protocol/current_playlist.py (98%) rename mopidy/{frontends => }/mpd/protocol/empty.py (74%) rename mopidy/{frontends => }/mpd/protocol/music_db.py (98%) rename mopidy/{frontends => }/mpd/protocol/playback.py (99%) rename mopidy/{frontends => }/mpd/protocol/reflection.py (95%) rename mopidy/{frontends => }/mpd/protocol/status.py (98%) rename mopidy/{frontends => }/mpd/protocol/stickers.py (94%) rename mopidy/{frontends => }/mpd/protocol/stored_playlists.py (96%) rename mopidy/{frontends => }/mpd/session.py (93%) rename mopidy/{frontends => }/mpd/translator.py (99%) rename tests/{frontends => }/mpd/__init__.py (100%) rename tests/{frontends => }/mpd/dispatcher_test.py (91%) rename tests/{frontends => }/mpd/exception_test.py (97%) rename tests/{frontends => }/mpd/protocol/__init__.py (98%) rename tests/{frontends => }/mpd/protocol/audio_output_test.py (97%) rename tests/{frontends => }/mpd/protocol/authentication_test.py (98%) rename tests/{frontends => }/mpd/protocol/channels_test.py (95%) rename tests/{frontends => }/mpd/protocol/command_list_test.py (98%) rename tests/{frontends => }/mpd/protocol/connection_test.py (95%) rename tests/{frontends => }/mpd/protocol/current_playlist_test.py (99%) rename tests/{frontends => }/mpd/protocol/idle_test.py (98%) rename tests/{frontends => }/mpd/protocol/music_db_test.py (99%) rename tests/{frontends => }/mpd/protocol/playback_test.py (99%) rename tests/{frontends => }/mpd/protocol/reflection_test.py (98%) rename tests/{frontends => }/mpd/protocol/regression_test.py (99%) rename tests/{frontends => }/mpd/protocol/status_test.py (96%) rename tests/{frontends => }/mpd/protocol/stickers_test.py (96%) rename tests/{frontends => }/mpd/protocol/stored_playlists_test.py (99%) rename tests/{frontends => }/mpd/status_test.py (98%) rename tests/{frontends => }/mpd/translator_test.py (99%) diff --git a/docs/api/core.rst b/docs/api/core.rst index 0fd3e0c8..38cc0f0a 100644 --- a/docs/api/core.rst +++ b/docs/api/core.rst @@ -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: diff --git a/docs/api/frontends.rst b/docs/api/frontends.rst index add6871a..7afafa74 100644 --- a/docs/api/frontends.rst +++ b/docs/api/frontends.rst @@ -48,4 +48,4 @@ Frontend implementations ======================== * :mod:`mopidy.http` -* :mod:`mopidy.frontends.mpd` +* :mod:`mopidy.mpd` diff --git a/docs/ext/mpd.rst b/docs/ext/mpd.rst index eb502221..46a01715 100644 --- a/docs/ext/mpd.rst +++ b/docs/ext/mpd.rst @@ -12,8 +12,7 @@ server project `_. 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 diff --git a/docs/modules/frontends/mpd.rst b/docs/modules/mpd.rst similarity index 61% rename from docs/modules/frontends/mpd.rst rename to docs/modules/mpd.rst index 750d19bb..85cb2789 100644 --- a/docs/modules/frontends/mpd.rst +++ b/docs/modules/mpd.rst @@ -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: diff --git a/mopidy/frontends/mpd/__init__.py b/mopidy/mpd/__init__.py similarity index 100% rename from mopidy/frontends/mpd/__init__.py rename to mopidy/mpd/__init__.py diff --git a/mopidy/frontends/mpd/actor.py b/mopidy/mpd/actor.py similarity index 96% rename from mopidy/frontends/mpd/actor.py rename to mopidy/mpd/actor.py index fb063f6c..9c33faaa 100644 --- a/mopidy/frontends/mpd/actor.py +++ b/mopidy/mpd/actor.py @@ -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): diff --git a/mopidy/frontends/mpd/dispatcher.py b/mopidy/mpd/dispatcher.py similarity index 98% rename from mopidy/frontends/mpd/dispatcher.py rename to mopidy/mpd/dispatcher.py index ec3b71f8..c3881f6f 100644 --- a/mopidy/frontends/mpd/dispatcher.py +++ b/mopidy/mpd/dispatcher.py @@ -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. diff --git a/mopidy/frontends/mpd/exceptions.py b/mopidy/mpd/exceptions.py similarity index 100% rename from mopidy/frontends/mpd/exceptions.py rename to mopidy/mpd/exceptions.py diff --git a/mopidy/frontends/mpd/ext.conf b/mopidy/mpd/ext.conf similarity index 100% rename from mopidy/frontends/mpd/ext.conf rename to mopidy/mpd/ext.conf diff --git a/mopidy/frontends/mpd/protocol/__init__.py b/mopidy/mpd/protocol/__init__.py similarity index 100% rename from mopidy/frontends/mpd/protocol/__init__.py rename to mopidy/mpd/protocol/__init__.py diff --git a/mopidy/frontends/mpd/protocol/audio_output.py b/mopidy/mpd/protocol/audio_output.py similarity index 90% rename from mopidy/frontends/mpd/protocol/audio_output.py rename to mopidy/mpd/protocol/audio_output.py index ee1782bd..606eb1d3 100644 --- a/mopidy/frontends/mpd/protocol/audio_output.py +++ b/mopidy/mpd/protocol/audio_output.py @@ -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\d+)"$') diff --git a/mopidy/frontends/mpd/protocol/channels.py b/mopidy/mpd/protocol/channels.py similarity index 93% rename from mopidy/frontends/mpd/protocol/channels.py rename to mopidy/mpd/protocol/channels.py index 1f54a41b..e8efd2a0 100644 --- a/mopidy/frontends/mpd/protocol/channels.py +++ b/mopidy/mpd/protocol/channels.py @@ -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[A-Za-z0-9:._-]+)"$') diff --git a/mopidy/frontends/mpd/protocol/command_list.py b/mopidy/mpd/protocol/command_list.py similarity index 95% rename from mopidy/frontends/mpd/protocol/command_list.py rename to mopidy/mpd/protocol/command_list.py index c85a594b..8268c55d 100644 --- a/mopidy/frontends/mpd/protocol/command_list.py +++ b/mopidy/mpd/protocol/command_list.py @@ -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$') diff --git a/mopidy/frontends/mpd/protocol/connection.py b/mopidy/mpd/protocol/connection.py similarity index 91% rename from mopidy/frontends/mpd/protocol/connection.py rename to mopidy/mpd/protocol/connection.py index 734ed37a..2c615e65 100644 --- a/mopidy/frontends/mpd/protocol/connection.py +++ b/mopidy/mpd/protocol/connection.py @@ -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) diff --git a/mopidy/frontends/mpd/protocol/current_playlist.py b/mopidy/mpd/protocol/current_playlist.py similarity index 98% rename from mopidy/frontends/mpd/protocol/current_playlist.py rename to mopidy/mpd/protocol/current_playlist.py index d5bf267a..b4e22a61 100644 --- a/mopidy/frontends/mpd/protocol/current_playlist.py +++ b/mopidy/mpd/protocol/current_playlist.py @@ -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[^"]*)"$') diff --git a/mopidy/frontends/mpd/protocol/empty.py b/mopidy/mpd/protocol/empty.py similarity index 74% rename from mopidy/frontends/mpd/protocol/empty.py rename to mopidy/mpd/protocol/empty.py index b2bb9482..9b3d6883 100644 --- a/mopidy/frontends/mpd/protocol/empty.py +++ b/mopidy/mpd/protocol/empty.py @@ -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'[\ ]*$') diff --git a/mopidy/frontends/mpd/protocol/music_db.py b/mopidy/mpd/protocol/music_db.py similarity index 98% rename from mopidy/frontends/mpd/protocol/music_db.py rename to mopidy/mpd/protocol/music_db.py index e1d718c0..6e7e3956 100644 --- a/mopidy/frontends/mpd/protocol/music_db.py +++ b/mopidy/mpd/protocol/music_db.py @@ -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""" diff --git a/mopidy/frontends/mpd/protocol/playback.py b/mopidy/mpd/protocol/playback.py similarity index 99% rename from mopidy/frontends/mpd/protocol/playback.py rename to mopidy/mpd/protocol/playback.py index 27ee6d4b..c09afde8 100644 --- a/mopidy/frontends/mpd/protocol/playback.py +++ b/mopidy/mpd/protocol/playback.py @@ -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) diff --git a/mopidy/frontends/mpd/protocol/reflection.py b/mopidy/mpd/protocol/reflection.py similarity index 95% rename from mopidy/frontends/mpd/protocol/reflection.py rename to mopidy/mpd/protocol/reflection.py index d5206120..79aa1247 100644 --- a/mopidy/frontends/mpd/protocol/reflection.py +++ b/mopidy/mpd/protocol/reflection.py @@ -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) diff --git a/mopidy/frontends/mpd/protocol/status.py b/mopidy/mpd/protocol/status.py similarity index 98% rename from mopidy/frontends/mpd/protocol/status.py rename to mopidy/mpd/protocol/status.py index 2fe3a402..96bca6d6 100644 --- a/mopidy/frontends/mpd/protocol/status.py +++ b/mopidy/mpd/protocol/status.py @@ -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 = [ diff --git a/mopidy/frontends/mpd/protocol/stickers.py b/mopidy/mpd/protocol/stickers.py similarity index 94% rename from mopidy/frontends/mpd/protocol/stickers.py rename to mopidy/mpd/protocol/stickers.py index 84417e51..1243d7a6 100644 --- a/mopidy/frontends/mpd/protocol/stickers.py +++ b/mopidy/mpd/protocol/stickers.py @@ -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( diff --git a/mopidy/frontends/mpd/protocol/stored_playlists.py b/mopidy/mpd/protocol/stored_playlists.py similarity index 96% rename from mopidy/frontends/mpd/protocol/stored_playlists.py rename to mopidy/mpd/protocol/stored_playlists.py index 974dbc7f..6564236e 100644 --- a/mopidy/frontends/mpd/protocol/stored_playlists.py +++ b/mopidy/mpd/protocol/stored_playlists.py @@ -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[^"]+)\1$') diff --git a/mopidy/frontends/mpd/session.py b/mopidy/mpd/session.py similarity index 93% rename from mopidy/frontends/mpd/session.py rename to mopidy/mpd/session.py index 14173308..5a531a79 100644 --- a/mopidy/frontends/mpd/session.py +++ b/mopidy/mpd/session.py @@ -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): diff --git a/mopidy/frontends/mpd/translator.py b/mopidy/mpd/translator.py similarity index 99% rename from mopidy/frontends/mpd/translator.py rename to mopidy/mpd/translator.py index 671bfae7..49ebce35 100644 --- a/mopidy/frontends/mpd/translator.py +++ b/mopidy/mpd/translator.py @@ -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 diff --git a/setup.py b/setup.py index 5ad9ddf2..b6857d4e 100644 --- a/setup.py +++ b/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', ], }, diff --git a/tests/frontends/mpd/__init__.py b/tests/mpd/__init__.py similarity index 100% rename from tests/frontends/mpd/__init__.py rename to tests/mpd/__init__.py diff --git a/tests/frontends/mpd/dispatcher_test.py b/tests/mpd/dispatcher_test.py similarity index 91% rename from tests/frontends/mpd/dispatcher_test.py rename to tests/mpd/dispatcher_test.py index 9ef88e44..13f2d7a5 100644 --- a/tests/frontends/mpd/dispatcher_test.py +++ b/tests/mpd/dispatcher_test.py @@ -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): diff --git a/tests/frontends/mpd/exception_test.py b/tests/mpd/exception_test.py similarity index 97% rename from tests/frontends/mpd/exception_test.py rename to tests/mpd/exception_test.py index 3b42f1b9..ae59253e 100644 --- a/tests/frontends/mpd/exception_test.py +++ b/tests/mpd/exception_test.py @@ -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) diff --git a/tests/frontends/mpd/protocol/__init__.py b/tests/mpd/protocol/__init__.py similarity index 98% rename from tests/frontends/mpd/protocol/__init__.py rename to tests/mpd/protocol/__init__.py index aa9a5a6d..9f3b58d6 100644 --- a/tests/frontends/mpd/protocol/__init__.py +++ b/tests/mpd/protocol/__init__.py @@ -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): diff --git a/tests/frontends/mpd/protocol/audio_output_test.py b/tests/mpd/protocol/audio_output_test.py similarity index 97% rename from tests/frontends/mpd/protocol/audio_output_test.py rename to tests/mpd/protocol/audio_output_test.py index 4871f169..643682ef 100644 --- a/tests/frontends/mpd/protocol/audio_output_test.py +++ b/tests/mpd/protocol/audio_output_test.py @@ -1,6 +1,6 @@ from __future__ import unicode_literals -from tests.frontends.mpd import protocol +from tests.mpd import protocol class AudioOutputHandlerTest(protocol.BaseTestCase): diff --git a/tests/frontends/mpd/protocol/authentication_test.py b/tests/mpd/protocol/authentication_test.py similarity index 98% rename from tests/frontends/mpd/protocol/authentication_test.py rename to tests/mpd/protocol/authentication_test.py index 2597ddef..6a39ba81 100644 --- a/tests/frontends/mpd/protocol/authentication_test.py +++ b/tests/mpd/protocol/authentication_test.py @@ -1,6 +1,6 @@ from __future__ import unicode_literals -from tests.frontends.mpd import protocol +from tests.mpd import protocol class AuthenticationActiveTest(protocol.BaseTestCase): diff --git a/tests/frontends/mpd/protocol/channels_test.py b/tests/mpd/protocol/channels_test.py similarity index 95% rename from tests/frontends/mpd/protocol/channels_test.py rename to tests/mpd/protocol/channels_test.py index 86cf8197..5d4ee670 100644 --- a/tests/frontends/mpd/protocol/channels_test.py +++ b/tests/mpd/protocol/channels_test.py @@ -1,6 +1,6 @@ from __future__ import unicode_literals -from tests.frontends.mpd import protocol +from tests.mpd import protocol class ChannelsHandlerTest(protocol.BaseTestCase): diff --git a/tests/frontends/mpd/protocol/command_list_test.py b/tests/mpd/protocol/command_list_test.py similarity index 98% rename from tests/frontends/mpd/protocol/command_list_test.py rename to tests/mpd/protocol/command_list_test.py index 222dcb61..9d66bd5d 100644 --- a/tests/frontends/mpd/protocol/command_list_test.py +++ b/tests/mpd/protocol/command_list_test.py @@ -1,6 +1,6 @@ from __future__ import unicode_literals -from tests.frontends.mpd import protocol +from tests.mpd import protocol class CommandListsTest(protocol.BaseTestCase): diff --git a/tests/frontends/mpd/protocol/connection_test.py b/tests/mpd/protocol/connection_test.py similarity index 95% rename from tests/frontends/mpd/protocol/connection_test.py rename to tests/mpd/protocol/connection_test.py index 01deb7a7..452a2147 100644 --- a/tests/frontends/mpd/protocol/connection_test.py +++ b/tests/mpd/protocol/connection_test.py @@ -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): diff --git a/tests/frontends/mpd/protocol/current_playlist_test.py b/tests/mpd/protocol/current_playlist_test.py similarity index 99% rename from tests/frontends/mpd/protocol/current_playlist_test.py rename to tests/mpd/protocol/current_playlist_test.py index fc4640b1..f94ec6a0 100644 --- a/tests/frontends/mpd/protocol/current_playlist_test.py +++ b/tests/mpd/protocol/current_playlist_test.py @@ -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): diff --git a/tests/frontends/mpd/protocol/idle_test.py b/tests/mpd/protocol/idle_test.py similarity index 98% rename from tests/frontends/mpd/protocol/idle_test.py rename to tests/mpd/protocol/idle_test.py index e6910988..cc937119 100644 --- a/tests/frontends/mpd/protocol/idle_test.py +++ b/tests/mpd/protocol/idle_test.py @@ -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): diff --git a/tests/frontends/mpd/protocol/music_db_test.py b/tests/mpd/protocol/music_db_test.py similarity index 99% rename from tests/frontends/mpd/protocol/music_db_test.py rename to tests/mpd/protocol/music_db_test.py index 52a7a390..09db53ae 100644 --- a/tests/frontends/mpd/protocol/music_db_test.py +++ b/tests/mpd/protocol/music_db_test.py @@ -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): diff --git a/tests/frontends/mpd/protocol/playback_test.py b/tests/mpd/protocol/playback_test.py similarity index 99% rename from tests/frontends/mpd/protocol/playback_test.py rename to tests/mpd/protocol/playback_test.py index fc91c09c..a572aabe 100644 --- a/tests/frontends/mpd/protocol/playback_test.py +++ b/tests/mpd/protocol/playback_test.py @@ -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 diff --git a/tests/frontends/mpd/protocol/reflection_test.py b/tests/mpd/protocol/reflection_test.py similarity index 98% rename from tests/frontends/mpd/protocol/reflection_test.py rename to tests/mpd/protocol/reflection_test.py index 16f4579f..160c9876 100644 --- a/tests/frontends/mpd/protocol/reflection_test.py +++ b/tests/mpd/protocol/reflection_test.py @@ -1,6 +1,6 @@ from __future__ import unicode_literals -from tests.frontends.mpd import protocol +from tests.mpd import protocol class ReflectionHandlerTest(protocol.BaseTestCase): diff --git a/tests/frontends/mpd/protocol/regression_test.py b/tests/mpd/protocol/regression_test.py similarity index 99% rename from tests/frontends/mpd/protocol/regression_test.py rename to tests/mpd/protocol/regression_test.py index 0bc488fd..3389573f 100644 --- a/tests/frontends/mpd/protocol/regression_test.py +++ b/tests/mpd/protocol/regression_test.py @@ -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): diff --git a/tests/frontends/mpd/protocol/status_test.py b/tests/mpd/protocol/status_test.py similarity index 96% rename from tests/frontends/mpd/protocol/status_test.py rename to tests/mpd/protocol/status_test.py index 1cf5f253..8ded6938 100644 --- a/tests/frontends/mpd/protocol/status_test.py +++ b/tests/mpd/protocol/status_test.py @@ -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): diff --git a/tests/frontends/mpd/protocol/stickers_test.py b/tests/mpd/protocol/stickers_test.py similarity index 96% rename from tests/frontends/mpd/protocol/stickers_test.py rename to tests/mpd/protocol/stickers_test.py index de610521..31fd5da0 100644 --- a/tests/frontends/mpd/protocol/stickers_test.py +++ b/tests/mpd/protocol/stickers_test.py @@ -1,6 +1,6 @@ from __future__ import unicode_literals -from tests.frontends.mpd import protocol +from tests.mpd import protocol class StickersHandlerTest(protocol.BaseTestCase): diff --git a/tests/frontends/mpd/protocol/stored_playlists_test.py b/tests/mpd/protocol/stored_playlists_test.py similarity index 99% rename from tests/frontends/mpd/protocol/stored_playlists_test.py rename to tests/mpd/protocol/stored_playlists_test.py index d75944c4..a65b3ed7 100644 --- a/tests/frontends/mpd/protocol/stored_playlists_test.py +++ b/tests/mpd/protocol/stored_playlists_test.py @@ -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): diff --git a/tests/frontends/mpd/status_test.py b/tests/mpd/status_test.py similarity index 98% rename from tests/frontends/mpd/status_test.py rename to tests/mpd/status_test.py index d86f7dcd..dea0c479 100644 --- a/tests/frontends/mpd/status_test.py +++ b/tests/mpd/status_test.py @@ -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 diff --git a/tests/frontends/mpd/translator_test.py b/tests/mpd/translator_test.py similarity index 99% rename from tests/frontends/mpd/translator_test.py rename to tests/mpd/translator_test.py index 1db10ab9..c2648311 100644 --- a/tests/frontends/mpd/translator_test.py +++ b/tests/mpd/translator_test.py @@ -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