Merge pull request #623 from jodal/feature/move-frontends
Move MPD and HTTP frontends out of mopidy.frontends
This commit is contained in:
commit
df12cba905
@ -7,6 +7,6 @@ recursive-include docs *
|
|||||||
prune docs/_build
|
prune docs/_build
|
||||||
|
|
||||||
recursive-include mopidy *.conf
|
recursive-include mopidy *.conf
|
||||||
recursive-include mopidy/frontends/http/data *
|
recursive-include mopidy/http/data *
|
||||||
recursive-include tests *.py
|
recursive-include tests *.py
|
||||||
recursive-include tests/data *
|
recursive-include tests/data *
|
||||||
|
|||||||
@ -8,8 +8,8 @@ Core API
|
|||||||
:synopsis: Core API for use by frontends
|
:synopsis: Core API for use by frontends
|
||||||
|
|
||||||
The core API is the interface that is used by frontends like
|
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
|
:mod:`mopidy.http` and :mod:`mopidy.mpd`. The core layer is inbetween the
|
||||||
backends.
|
frontends and the backends.
|
||||||
|
|
||||||
.. autoclass:: mopidy.core.Core
|
.. autoclass:: mopidy.core.Core
|
||||||
:members:
|
:members:
|
||||||
|
|||||||
@ -47,5 +47,5 @@ The following requirements applies to any frontend implementation:
|
|||||||
Frontend implementations
|
Frontend implementations
|
||||||
========================
|
========================
|
||||||
|
|
||||||
* :mod:`mopidy.frontends.http`
|
* :mod:`mopidy.http`
|
||||||
* :mod:`mopidy.frontends.mpd`
|
* :mod:`mopidy.mpd`
|
||||||
|
|||||||
@ -113,8 +113,8 @@ HTML file:
|
|||||||
If you don't use Mopidy to host your web client, you can find the JS files in
|
If you don't use Mopidy to host your web client, you can find the JS files in
|
||||||
the Git repo at:
|
the Git repo at:
|
||||||
|
|
||||||
- ``mopidy/frontends/http/data/mopidy.js``
|
- ``mopidy/http/data/mopidy.js``
|
||||||
- ``mopidy/frontends/http/data/mopidy.min.js``
|
- ``mopidy/http/data/mopidy.min.js``
|
||||||
|
|
||||||
|
|
||||||
Getting the library for Node.js use
|
Getting the library for Node.js use
|
||||||
|
|||||||
@ -9,12 +9,6 @@ from a web based client. See :ref:`http-api` for details on how to integrate
|
|||||||
with Mopidy over HTTP.
|
with Mopidy over HTTP.
|
||||||
|
|
||||||
|
|
||||||
Known issues
|
|
||||||
============
|
|
||||||
|
|
||||||
https://github.com/mopidy/mopidy/issues?labels=HTTP+frontend
|
|
||||||
|
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
============
|
============
|
||||||
|
|
||||||
@ -32,7 +26,7 @@ install Mopidy with the extra dependencies for required for Mopidy-HTTP::
|
|||||||
Default configuration
|
Default configuration
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
.. literalinclude:: ../../mopidy/frontends/http/ext.conf
|
.. literalinclude:: ../../mopidy/http/ext.conf
|
||||||
:language: ini
|
:language: ini
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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
|
original MPD server, but implements the MPD protocol itself, and is thus
|
||||||
compatible with clients for the original MPD server.
|
compatible with clients for the original MPD server.
|
||||||
|
|
||||||
For more details on our MPD server implementation, see
|
For more details on our MPD server implementation, see :mod:`mopidy.mpd`.
|
||||||
:mod:`mopidy.frontends.mpd`.
|
|
||||||
|
|
||||||
|
|
||||||
Known issues
|
Known issues
|
||||||
@ -54,7 +53,7 @@ None. The extension just needs Mopidy.
|
|||||||
Default configuration
|
Default configuration
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
.. literalinclude:: ../../mopidy/frontends/mpd/ext.conf
|
.. literalinclude:: ../../mopidy/mpd/ext.conf
|
||||||
:language: ini
|
: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`.
|
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
|
:synopsis: MPD server frontend
|
||||||
|
|
||||||
|
|
||||||
MPD dispatcher
|
MPD dispatcher
|
||||||
==============
|
==============
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.dispatcher
|
.. automodule:: mopidy.mpd.dispatcher
|
||||||
:synopsis: MPD request dispatcher
|
:synopsis: MPD request dispatcher
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ MPD dispatcher
|
|||||||
MPD protocol
|
MPD protocol
|
||||||
============
|
============
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol
|
.. automodule:: mopidy.mpd.protocol
|
||||||
:synopsis: MPD protocol
|
:synopsis: MPD protocol
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ MPD protocol
|
|||||||
Audio output
|
Audio output
|
||||||
------------
|
------------
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol.audio_output
|
.. automodule:: mopidy.mpd.protocol.audio_output
|
||||||
:synopsis: MPD protocol: audio output
|
:synopsis: MPD protocol: audio output
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ Audio output
|
|||||||
Channels
|
Channels
|
||||||
--------
|
--------
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol.channels
|
.. automodule:: mopidy.mpd.protocol.channels
|
||||||
:synopsis: MPD protocol: channels -- client to client communication
|
:synopsis: MPD protocol: channels -- client to client communication
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ Channels
|
|||||||
Command list
|
Command list
|
||||||
------------
|
------------
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol.command_list
|
.. automodule:: mopidy.mpd.protocol.command_list
|
||||||
:synopsis: MPD protocol: command list
|
:synopsis: MPD protocol: command list
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ Command list
|
|||||||
Connection
|
Connection
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol.connection
|
.. automodule:: mopidy.mpd.protocol.connection
|
||||||
:synopsis: MPD protocol: connection
|
:synopsis: MPD protocol: connection
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ Connection
|
|||||||
Current playlist
|
Current playlist
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol.current_playlist
|
.. automodule:: mopidy.mpd.protocol.current_playlist
|
||||||
:synopsis: MPD protocol: current playlist
|
:synopsis: MPD protocol: current playlist
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ Current playlist
|
|||||||
Music database
|
Music database
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol.music_db
|
.. automodule:: mopidy.mpd.protocol.music_db
|
||||||
:synopsis: MPD protocol: music database
|
:synopsis: MPD protocol: music database
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ Music database
|
|||||||
Playback
|
Playback
|
||||||
--------
|
--------
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol.playback
|
.. automodule:: mopidy.mpd.protocol.playback
|
||||||
:synopsis: MPD protocol: playback
|
:synopsis: MPD protocol: playback
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ Playback
|
|||||||
Reflection
|
Reflection
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol.reflection
|
.. automodule:: mopidy.mpd.protocol.reflection
|
||||||
:synopsis: MPD protocol: reflection
|
:synopsis: MPD protocol: reflection
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ Reflection
|
|||||||
Status
|
Status
|
||||||
------
|
------
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol.status
|
.. automodule:: mopidy.mpd.protocol.status
|
||||||
:synopsis: MPD protocol: status
|
:synopsis: MPD protocol: status
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ Status
|
|||||||
Stickers
|
Stickers
|
||||||
--------
|
--------
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol.stickers
|
.. automodule:: mopidy.mpd.protocol.stickers
|
||||||
:synopsis: MPD protocol: stickers
|
:synopsis: MPD protocol: stickers
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
@ -107,6 +107,6 @@ Stickers
|
|||||||
Stored playlists
|
Stored playlists
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.mpd.protocol.stored_playlists
|
.. automodule:: mopidy.mpd.protocol.stored_playlists
|
||||||
:synopsis: MPD protocol: stored playlists
|
:synopsis: MPD protocol: stored playlists
|
||||||
:members:
|
:members:
|
||||||
@ -11,8 +11,8 @@ module.exports = function (grunt) {
|
|||||||
" * Licensed under the Apache License, Version 2.0 */\n",
|
" * Licensed under the Apache License, Version 2.0 */\n",
|
||||||
files: {
|
files: {
|
||||||
own: ["Gruntfile.js", "src/**/*.js", "test/**/*-test.js"],
|
own: ["Gruntfile.js", "src/**/*.js", "test/**/*-test.js"],
|
||||||
concat: "../mopidy/frontends/http/data/mopidy.js",
|
concat: "../mopidy/http/data/mopidy.js",
|
||||||
minified: "../mopidy/frontends/http/data/mopidy.min.js"
|
minified: "../mopidy/http/data/mopidy.min.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buster: {
|
buster: {
|
||||||
|
|||||||
@ -21,8 +21,8 @@ You may need to adjust hostname and port for your local setup.
|
|||||||
|
|
||||||
In the source repo, you can find the files at:
|
In the source repo, you can find the files at:
|
||||||
|
|
||||||
- `mopidy/frontends/http/data/mopidy.js`
|
- `mopidy/http/data/mopidy.js`
|
||||||
- `mopidy/frontends/http/data/mopidy.min.js`
|
- `mopidy/http/data/mopidy.min.js`
|
||||||
|
|
||||||
|
|
||||||
Getting it for Node.js use
|
Getting it for Node.js use
|
||||||
@ -72,7 +72,7 @@ To run tests automatically when you save a file:
|
|||||||
npm start
|
npm start
|
||||||
|
|
||||||
To run tests, concatenate, minify the source, and update the JavaScript files
|
To run tests, concatenate, minify the source, and update the JavaScript files
|
||||||
in `mopidy/frontends/http/data/`:
|
in `mopidy/http/data/`:
|
||||||
|
|
||||||
npm run-script build
|
npm run-script build
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ from mopidy.core import CoreListener
|
|||||||
from . import ws
|
from . import ws
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('mopidy.frontends.http')
|
logger = logging.getLogger('mopidy.http')
|
||||||
|
|
||||||
|
|
||||||
class HttpFrontend(pykka.ThreadingActor, CoreListener):
|
class HttpFrontend(pykka.ThreadingActor, CoreListener):
|
||||||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
@ -9,7 +9,7 @@ from mopidy import core, models
|
|||||||
from mopidy.utils import jsonrpc
|
from mopidy.utils import jsonrpc
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('mopidy.frontends.http')
|
logger = logging.getLogger('mopidy.http')
|
||||||
|
|
||||||
|
|
||||||
class WebSocketResource(object):
|
class WebSocketResource(object):
|
||||||
@ -7,10 +7,10 @@ import pykka
|
|||||||
|
|
||||||
from mopidy import zeroconf
|
from mopidy import zeroconf
|
||||||
from mopidy.core import CoreListener
|
from mopidy.core import CoreListener
|
||||||
from mopidy.frontends.mpd import session
|
from mopidy.mpd import session
|
||||||
from mopidy.utils import encoding, network, process
|
from mopidy.utils import encoding, network, process
|
||||||
|
|
||||||
logger = logging.getLogger('mopidy.frontends.mpd')
|
logger = logging.getLogger('mopidy.mpd')
|
||||||
|
|
||||||
|
|
||||||
class MpdFrontend(pykka.ThreadingActor, CoreListener):
|
class MpdFrontend(pykka.ThreadingActor, CoreListener):
|
||||||
@ -5,9 +5,9 @@ import re
|
|||||||
|
|
||||||
import pykka
|
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()
|
protocol.load_protocol_modules()
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ class MpdContext(object):
|
|||||||
#: The current :class:`MpdDispatcher`.
|
#: The current :class:`MpdDispatcher`.
|
||||||
dispatcher = None
|
dispatcher = None
|
||||||
|
|
||||||
#: The current :class:`mopidy.frontends.mpd.MpdSession`.
|
#: The current :class:`mopidy.mpd.MpdSession`.
|
||||||
session = None
|
session = None
|
||||||
|
|
||||||
#: The Mopidy configuration.
|
#: The Mopidy configuration.
|
||||||
@ -1,7 +1,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from mopidy.frontends.mpd.exceptions import MpdNoExistError
|
from mopidy.mpd.exceptions import MpdNoExistError
|
||||||
from mopidy.frontends.mpd.protocol import handle_request
|
from mopidy.mpd.protocol import handle_request
|
||||||
|
|
||||||
|
|
||||||
@handle_request(r'disableoutput\ "(?P<outputid>\d+)"$')
|
@handle_request(r'disableoutput\ "(?P<outputid>\d+)"$')
|
||||||
@ -1,7 +1,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from mopidy.frontends.mpd.protocol import handle_request
|
from mopidy.mpd.protocol import handle_request
|
||||||
from mopidy.frontends.mpd.exceptions import MpdNotImplemented
|
from mopidy.mpd.exceptions import MpdNotImplemented
|
||||||
|
|
||||||
|
|
||||||
@handle_request(r'subscribe\ "(?P<channel>[A-Za-z0-9:._-]+)"$')
|
@handle_request(r'subscribe\ "(?P<channel>[A-Za-z0-9:._-]+)"$')
|
||||||
@ -1,7 +1,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from mopidy.frontends.mpd.protocol import handle_request
|
from mopidy.mpd.protocol import handle_request
|
||||||
from mopidy.frontends.mpd.exceptions import MpdUnknownCommand
|
from mopidy.mpd.exceptions import MpdUnknownCommand
|
||||||
|
|
||||||
|
|
||||||
@handle_request(r'command_list_begin$')
|
@handle_request(r'command_list_begin$')
|
||||||
@ -1,7 +1,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from mopidy.frontends.mpd.protocol import handle_request
|
from mopidy.mpd.protocol import handle_request
|
||||||
from mopidy.frontends.mpd.exceptions import (
|
from mopidy.mpd.exceptions import (
|
||||||
MpdPasswordError, MpdPermissionError)
|
MpdPasswordError, MpdPermissionError)
|
||||||
|
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from mopidy.frontends.mpd import translator
|
from mopidy.mpd import translator
|
||||||
from mopidy.frontends.mpd.exceptions import (
|
from mopidy.mpd.exceptions import (
|
||||||
MpdArgError, MpdNoExistError, MpdNotImplemented)
|
MpdArgError, MpdNoExistError, MpdNotImplemented)
|
||||||
from mopidy.frontends.mpd.protocol import handle_request
|
from mopidy.mpd.protocol import handle_request
|
||||||
|
|
||||||
|
|
||||||
@handle_request(r'add\ "(?P<uri>[^"]*)"$')
|
@handle_request(r'add\ "(?P<uri>[^"]*)"$')
|
||||||
@ -1,6 +1,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from mopidy.frontends.mpd.protocol import handle_request
|
from mopidy.mpd.protocol import handle_request
|
||||||
|
|
||||||
|
|
||||||
@handle_request(r'[\ ]*$')
|
@handle_request(r'[\ ]*$')
|
||||||
@ -5,9 +5,9 @@ import itertools
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from mopidy.models import Track
|
from mopidy.models import Track
|
||||||
from mopidy.frontends.mpd import translator
|
from mopidy.mpd import translator
|
||||||
from mopidy.frontends.mpd.exceptions import MpdArgError, MpdNotImplemented
|
from mopidy.mpd.exceptions import MpdArgError, MpdNotImplemented
|
||||||
from mopidy.frontends.mpd.protocol import handle_request, stored_playlists
|
from mopidy.mpd.protocol import handle_request, stored_playlists
|
||||||
|
|
||||||
|
|
||||||
LIST_QUERY = r"""
|
LIST_QUERY = r"""
|
||||||
@ -1,8 +1,8 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from mopidy.core import PlaybackState
|
from mopidy.core import PlaybackState
|
||||||
from mopidy.frontends.mpd.protocol import handle_request
|
from mopidy.mpd.protocol import handle_request
|
||||||
from mopidy.frontends.mpd.exceptions import (
|
from mopidy.mpd.exceptions import (
|
||||||
MpdArgError, MpdNoExistError, MpdNotImplemented)
|
MpdArgError, MpdNoExistError, MpdNotImplemented)
|
||||||
|
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from mopidy.frontends.mpd.exceptions import MpdPermissionError
|
from mopidy.mpd.exceptions import MpdPermissionError
|
||||||
from mopidy.frontends.mpd.protocol import handle_request, mpd_commands
|
from mopidy.mpd.protocol import handle_request, mpd_commands
|
||||||
|
|
||||||
|
|
||||||
@handle_request(r'config$', auth_required=False)
|
@handle_request(r'config$', auth_required=False)
|
||||||
@ -3,9 +3,9 @@ from __future__ import unicode_literals
|
|||||||
import pykka
|
import pykka
|
||||||
|
|
||||||
from mopidy.core import PlaybackState
|
from mopidy.core import PlaybackState
|
||||||
from mopidy.frontends.mpd.exceptions import MpdNotImplemented
|
from mopidy.mpd.exceptions import MpdNotImplemented
|
||||||
from mopidy.frontends.mpd.protocol import handle_request
|
from mopidy.mpd.protocol import handle_request
|
||||||
from mopidy.frontends.mpd.translator import track_to_mpd_format
|
from mopidy.mpd.translator import track_to_mpd_format
|
||||||
|
|
||||||
#: Subsystems that can be registered with idle command.
|
#: Subsystems that can be registered with idle command.
|
||||||
SUBSYSTEMS = [
|
SUBSYSTEMS = [
|
||||||
@ -1,7 +1,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from mopidy.frontends.mpd.protocol import handle_request
|
from mopidy.mpd.protocol import handle_request
|
||||||
from mopidy.frontends.mpd.exceptions import MpdNotImplemented
|
from mopidy.mpd.exceptions import MpdNotImplemented
|
||||||
|
|
||||||
|
|
||||||
@handle_request(
|
@handle_request(
|
||||||
@ -2,9 +2,9 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
|
|
||||||
from mopidy.frontends.mpd.exceptions import MpdNoExistError, MpdNotImplemented
|
from mopidy.mpd.exceptions import MpdNoExistError, MpdNotImplemented
|
||||||
from mopidy.frontends.mpd.protocol import handle_request
|
from mopidy.mpd.protocol import handle_request
|
||||||
from mopidy.frontends.mpd.translator import playlist_to_mpd_format
|
from mopidy.mpd.translator import playlist_to_mpd_format
|
||||||
|
|
||||||
|
|
||||||
@handle_request(r'listplaylist\ ("?)(?P<name>[^"]+)\1$')
|
@handle_request(r'listplaylist\ ("?)(?P<name>[^"]+)\1$')
|
||||||
@ -2,10 +2,10 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from mopidy.frontends.mpd import dispatcher, protocol
|
from mopidy.mpd import dispatcher, protocol
|
||||||
from mopidy.utils import formatting, network
|
from mopidy.utils import formatting, network
|
||||||
|
|
||||||
logger = logging.getLogger('mopidy.frontends.mpd')
|
logger = logging.getLogger('mopidy.mpd')
|
||||||
|
|
||||||
|
|
||||||
class MpdSession(network.LineProtocol):
|
class MpdSession(network.LineProtocol):
|
||||||
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
import shlex
|
import shlex
|
||||||
|
|
||||||
from mopidy.frontends.mpd.exceptions import MpdArgError
|
from mopidy.mpd.exceptions import MpdArgError
|
||||||
from mopidy.models import TlTrack
|
from mopidy.models import TlTrack
|
||||||
|
|
||||||
# TODO: special handling of local:// uri scheme
|
# TODO: special handling of local:// uri scheme
|
||||||
4
setup.py
4
setup.py
@ -41,10 +41,10 @@ setup(
|
|||||||
'mopidy-convert-config = mopidy.config.convert:main',
|
'mopidy-convert-config = mopidy.config.convert:main',
|
||||||
],
|
],
|
||||||
'mopidy.ext': [
|
'mopidy.ext': [
|
||||||
'http = mopidy.frontends.http:Extension [http]',
|
'http = mopidy.http:Extension [http]',
|
||||||
'local = mopidy.backends.local:Extension',
|
'local = mopidy.backends.local:Extension',
|
||||||
'local-json = mopidy.backends.local.json:Extension',
|
'local-json = mopidy.backends.local.json:Extension',
|
||||||
'mpd = mopidy.frontends.mpd:Extension',
|
'mpd = mopidy.mpd:Extension',
|
||||||
'stream = mopidy.backends.stream:Extension',
|
'stream = mopidy.backends.stream:Extension',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
@ -1 +0,0 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
@ -15,7 +15,7 @@ except ImportError:
|
|||||||
ws4py = False
|
ws4py = False
|
||||||
|
|
||||||
if cherrypy and ws4py:
|
if cherrypy and ws4py:
|
||||||
from mopidy.frontends.http import actor
|
from mopidy.http import actor
|
||||||
|
|
||||||
|
|
||||||
@unittest.skipUnless(cherrypy, 'cherrypy not found')
|
@unittest.skipUnless(cherrypy, 'cherrypy not found')
|
||||||
@ -6,9 +6,9 @@ import pykka
|
|||||||
|
|
||||||
from mopidy import core
|
from mopidy import core
|
||||||
from mopidy.backends import dummy
|
from mopidy.backends import dummy
|
||||||
from mopidy.frontends.mpd.dispatcher import MpdDispatcher
|
from mopidy.mpd.dispatcher import MpdDispatcher
|
||||||
from mopidy.frontends.mpd.exceptions import MpdAckError
|
from mopidy.mpd.exceptions import MpdAckError
|
||||||
from mopidy.frontends.mpd.protocol import request_handlers, handle_request
|
from mopidy.mpd.protocol import request_handlers, handle_request
|
||||||
|
|
||||||
|
|
||||||
class MpdDispatcherTest(unittest.TestCase):
|
class MpdDispatcherTest(unittest.TestCase):
|
||||||
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from mopidy.frontends.mpd.exceptions import (
|
from mopidy.mpd.exceptions import (
|
||||||
MpdAckError, MpdPermissionError, MpdUnknownCommand, MpdSystemError,
|
MpdAckError, MpdPermissionError, MpdUnknownCommand, MpdSystemError,
|
||||||
MpdNotImplemented)
|
MpdNotImplemented)
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ import pykka
|
|||||||
|
|
||||||
from mopidy import core
|
from mopidy import core
|
||||||
from mopidy.backends import dummy
|
from mopidy.backends import dummy
|
||||||
from mopidy.frontends.mpd import session
|
from mopidy.mpd import session
|
||||||
|
|
||||||
|
|
||||||
class MockConnection(mock.Mock):
|
class MockConnection(mock.Mock):
|
||||||
@ -1,6 +1,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class AudioOutputHandlerTest(protocol.BaseTestCase):
|
class AudioOutputHandlerTest(protocol.BaseTestCase):
|
||||||
@ -1,6 +1,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class AuthenticationActiveTest(protocol.BaseTestCase):
|
class AuthenticationActiveTest(protocol.BaseTestCase):
|
||||||
@ -1,6 +1,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class ChannelsHandlerTest(protocol.BaseTestCase):
|
class ChannelsHandlerTest(protocol.BaseTestCase):
|
||||||
@ -1,6 +1,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class CommandListsTest(protocol.BaseTestCase):
|
class CommandListsTest(protocol.BaseTestCase):
|
||||||
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
from mock import patch
|
from mock import patch
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class ConnectionHandlerTest(protocol.BaseTestCase):
|
class ConnectionHandlerTest(protocol.BaseTestCase):
|
||||||
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
from mopidy.models import Track
|
from mopidy.models import Track
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class CurrentPlaylistHandlerTest(protocol.BaseTestCase):
|
class CurrentPlaylistHandlerTest(protocol.BaseTestCase):
|
||||||
@ -2,9 +2,9 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
from mock import patch
|
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):
|
class IdleHandlerTest(protocol.BaseTestCase):
|
||||||
@ -2,10 +2,10 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
import unittest
|
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 mopidy.models import Album, Artist, SearchResult, Track
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class QueryFromMpdSearchFormatTest(unittest.TestCase):
|
class QueryFromMpdSearchFormatTest(unittest.TestCase):
|
||||||
@ -5,7 +5,7 @@ import unittest
|
|||||||
from mopidy.core import PlaybackState
|
from mopidy.core import PlaybackState
|
||||||
from mopidy.models import Track
|
from mopidy.models import Track
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
PAUSED = PlaybackState.PAUSED
|
PAUSED = PlaybackState.PAUSED
|
||||||
@ -1,6 +1,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class ReflectionHandlerTest(protocol.BaseTestCase):
|
class ReflectionHandlerTest(protocol.BaseTestCase):
|
||||||
@ -4,7 +4,7 @@ import random
|
|||||||
|
|
||||||
from mopidy.models import Track
|
from mopidy.models import Track
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class IssueGH17RegressionTest(protocol.BaseTestCase):
|
class IssueGH17RegressionTest(protocol.BaseTestCase):
|
||||||
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
from mopidy.models import Track
|
from mopidy.models import Track
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class StatusHandlerTest(protocol.BaseTestCase):
|
class StatusHandlerTest(protocol.BaseTestCase):
|
||||||
@ -1,6 +1,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class StickersHandlerTest(protocol.BaseTestCase):
|
class StickersHandlerTest(protocol.BaseTestCase):
|
||||||
@ -4,7 +4,7 @@ import datetime
|
|||||||
|
|
||||||
from mopidy.models import Track, Playlist
|
from mopidy.models import Track, Playlist
|
||||||
|
|
||||||
from tests.frontends.mpd import protocol
|
from tests.mpd import protocol
|
||||||
|
|
||||||
|
|
||||||
class PlaylistsHandlerTest(protocol.BaseTestCase):
|
class PlaylistsHandlerTest(protocol.BaseTestCase):
|
||||||
@ -7,8 +7,8 @@ import pykka
|
|||||||
from mopidy import core
|
from mopidy import core
|
||||||
from mopidy.backends import dummy
|
from mopidy.backends import dummy
|
||||||
from mopidy.core import PlaybackState
|
from mopidy.core import PlaybackState
|
||||||
from mopidy.frontends.mpd import dispatcher
|
from mopidy.mpd import dispatcher
|
||||||
from mopidy.frontends.mpd.protocol import status
|
from mopidy.mpd.protocol import status
|
||||||
from mopidy.models import Track
|
from mopidy.models import Track
|
||||||
|
|
||||||
|
|
||||||
@ -4,7 +4,7 @@ import datetime
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from mopidy.utils.path import mtime
|
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
|
from mopidy.models import Album, Artist, TlTrack, Playlist, Track
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user