From 59760bb36c39ce929c24f18c03baac528ff2e70c Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 21 Jun 2014 17:16:41 +0200 Subject: [PATCH 01/11] web: Remove WebSocket demo page --- mopidy/http/data/index.html | 2 +- mopidy/http/data/mopidy.html | 52 ------------------------------------ mopidy/http/handlers.py | 2 +- tests/http/test_server.py | 4 +-- 4 files changed, 4 insertions(+), 56 deletions(-) delete mode 100644 mopidy/http/data/mopidy.html diff --git a/mopidy/http/data/index.html b/mopidy/http/data/index.html index d85251c8..007d4e2a 100644 --- a/mopidy/http/data/index.html +++ b/mopidy/http/data/index.html @@ -23,7 +23,7 @@ HTML/CSS/JavaScript Mopidy client.

If you replace this page with your own content, the Mopidy resources - at /mopidy/ will still be available.

+ and APIs at /mopidy/ will still be available.

diff --git a/mopidy/http/data/mopidy.html b/mopidy/http/data/mopidy.html deleted file mode 100644 index 38ea2036..00000000 --- a/mopidy/http/data/mopidy.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Mopidy HTTP frontend - - - -
-

Mopidy HTTP frontend

- -

This web server is a part of the music server Mopidy. To learn more - about Mopidy, please visit www.mopidy.com.

-
- -
-

WebSocket endpoint

- -

Mopidy has a WebSocket endpoint at /mopidy/ws/. You can use - this end point to access Mopidy's full API, and to get notified about - events happening in Mopidy.

-
- -
-

Example

- -

Here you can see events arriving from Mopidy in real time:

- -

-
-      

Nothing to see? Try playing a track using your MPD client.

-
- -
-

Documentation

- -

For more information, please refer to the Mopidy documentation at - docs.mopidy.com.

-
- - - - diff --git a/mopidy/http/handlers.py b/mopidy/http/handlers.py index 5911fe09..c9926ecd 100644 --- a/mopidy/http/handlers.py +++ b/mopidy/http/handlers.py @@ -25,7 +25,7 @@ def mopidy_app_factory(config, core): }), (r'/(.*)', StaticFileHandler, { 'path': os.path.join(os.path.dirname(__file__), 'data'), - 'default_filename': 'mopidy.html' + 'default_filename': 'index.html' }), ] diff --git a/tests/http/test_server.py b/tests/http/test_server.py index 5f3495a5..f8e1b74e 100644 --- a/tests/http/test_server.py +++ b/tests/http/test_server.py @@ -39,7 +39,7 @@ class RootAppTest(HttpServerTest): response = self.fetch('/', method='GET') self.assertIn( - 'Static content serving', + 'This web server is a part of the Mopidy music server.', tornado.escape.to_unicode(response.body)) self.assertEqual( response.headers['X-Mopidy-Version'], mopidy.__version__) @@ -59,7 +59,7 @@ class MopidyAppTest(HttpServerTest): response = self.fetch('/mopidy/', method='GET') self.assertIn( - 'Here you can see events arriving from Mopidy in real time:', + 'This web server is a part of the Mopidy music server.', tornado.escape.to_unicode(response.body)) self.assertEqual( response.headers['X-Mopidy-Version'], mopidy.__version__) From 603da5673e1dd26ed643c5a6fecb5369e0e95086 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 21 Jun 2014 14:51:33 +0200 Subject: [PATCH 02/11] web: Make pages fill mobile viewports --- mopidy/http/data/index.html | 1 + mopidy/http/data/mopidy.css | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mopidy/http/data/index.html b/mopidy/http/data/index.html index 007d4e2a..5256e9ae 100644 --- a/mopidy/http/data/index.html +++ b/mopidy/http/data/index.html @@ -2,6 +2,7 @@ + Mopidy HTTP frontend diff --git a/mopidy/http/data/mopidy.css b/mopidy/http/data/mopidy.css index c5042769..a1e329d5 100644 --- a/mopidy/http/data/mopidy.css +++ b/mopidy/http/data/mopidy.css @@ -3,18 +3,17 @@ html { color: #555; font-family: "Droid Serif", "Georgia", "Times New Roman", "Palatino", "Hoefler Text", "Baskerville", serif; - font-size: 150%; line-height: 1.4em; } body { - max-width: 20em; + max-width: 600px; margin: 0 auto; } div.box { background: white; border-radius: 5px; box-shadow: 5px 5px 5px #d8dcdf; - margin: 2em 0; + margin: 1em; padding: 1em; } div.box.focus { From 005cb028e75b7c648151aaa922308338ced63b34 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 21 Jun 2014 14:51:56 +0200 Subject: [PATCH 03/11] web: Use font similar to mopidy.com --- mopidy/http/data/mopidy.css | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/mopidy/http/data/mopidy.css b/mopidy/http/data/mopidy.css index a1e329d5..c5844ebe 100644 --- a/mopidy/http/data/mopidy.css +++ b/mopidy/http/data/mopidy.css @@ -1,8 +1,7 @@ html { background: #e8ecef; color: #555; - font-family: "Droid Serif", "Georgia", "Times New Roman", "Palatino", - "Hoefler Text", "Baskerville", serif; + font-family: Geneva, Tahoma, Verdana, sans-serif; line-height: 1.4em; } body { @@ -23,13 +22,11 @@ div.box.focus { div.icon { float: right; } -h1, h2 { - font-family: "Ubuntu", "Arial", "Helvetica", "Lucida Grande", - "Verdana", "Gill Sans", sans-serif; +h1 { line-height: 1.1em; } -h2 { - margin: 0.2em 0 0; +h1, h2 { + font-weight: 500; } p.next { text-align: right; @@ -43,10 +40,9 @@ img { border: 0; } code, pre { - font-family: "Droid Sans Mono", Menlo, Courier New, Courier, Mono, monospace; - font-size: 9pt; + font-family: monospace; line-height: 1.2em; - padding: 0.5em 1em; + padding: 0.8em 1em; margin: 1em 0; white-space: pre; overflow: auto; From 97efcdc019c357a186e417bd402627fa8b737795 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 21 Jun 2014 23:28:58 +0200 Subject: [PATCH 04/11] web: Remove focus on 'HTTP frontend' --- mopidy/http/data/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mopidy/http/data/index.html b/mopidy/http/data/index.html index 5256e9ae..2376d3aa 100644 --- a/mopidy/http/data/index.html +++ b/mopidy/http/data/index.html @@ -3,14 +3,14 @@ - Mopidy HTTP frontend + Mopidy
-

Mopidy HTTP frontend

+

Mopidy

-

This web server is a part of the music server Mopidy. To learn more +

This web server is a part of the Mopidy music server. To learn more about Mopidy, please visit www.mopidy.com.

From 0e2b396be43228c45348c92b2cafbc26c92b02fa Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 21 Jun 2014 17:38:21 +0200 Subject: [PATCH 05/11] web: Strip down CSS --- mopidy/http/data/mopidy.css | 51 +++++++++---------------------------- 1 file changed, 12 insertions(+), 39 deletions(-) diff --git a/mopidy/http/data/mopidy.css b/mopidy/http/data/mopidy.css index c5844ebe..0bf4522b 100644 --- a/mopidy/http/data/mopidy.css +++ b/mopidy/http/data/mopidy.css @@ -1,5 +1,5 @@ html { - background: #e8ecef; + background: #f8f8f8; color: #555; font-family: Geneva, Tahoma, Verdana, sans-serif; line-height: 1.4em; @@ -8,28 +8,9 @@ body { max-width: 600px; margin: 0 auto; } -div.box { - background: white; - border-radius: 5px; - box-shadow: 5px 5px 5px #d8dcdf; - margin: 1em; - padding: 1em; -} -div.box.focus { - background: #465158; - color: #e8ecef; -} -div.icon { - float: right; -} -h1 { - line-height: 1.1em; -} h1, h2 { font-weight: 500; -} -p.next { - text-align: right; + line-height: 1.1em; } a { color: #555; @@ -39,19 +20,18 @@ a { img { border: 0; } -code, pre { - font-family: monospace; - line-height: 1.2em; - padding: 0.8em 1em; - margin: 1em 0; - white-space: pre; - overflow: auto; + +.box { + background: white; + box-shadow: 0px 5px 5px #f0f0f0; + margin: 1em; + padding: 1em; } -.box code, -.box pre { - background: #e8ecef; - color: #555; +.box.focus { + background: #465158; + color: #e8ecef; } + .box a { color: #465158; } @@ -61,10 +41,3 @@ code, pre { .box.focus a { color: #e8ecef; } -.center { - text-align: center; -} -#ws-console { - height: 200px; - overflow: auto; -} From 3fb225233a735690fb88bdf63819c16b6c2dce91 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 22 Jun 2014 00:29:01 +0200 Subject: [PATCH 06/11] http: Extract helper for setting common response headers --- mopidy/http/handlers.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mopidy/http/handlers.py b/mopidy/http/handlers.py index c9926ecd..5c5d481f 100644 --- a/mopidy/http/handlers.py +++ b/mopidy/http/handlers.py @@ -102,6 +102,12 @@ class WebSocketHandler(tornado.websocket.WebSocketHandler): self.close() +def set_mopidy_headers(request_handler): + request_handler.set_header('Cache-Control', 'no-cache') + request_handler.set_header( + 'X-Mopidy-Version', mopidy.__version__.encode('utf-8')) + + class JsonRpcHandler(tornado.web.RequestHandler): def initialize(self, core): self.jsonrpc = make_jsonrpc_wrapper(core) @@ -131,18 +137,14 @@ class JsonRpcHandler(tornado.web.RequestHandler): self.write_error(500) def set_extra_headers(self): + set_mopidy_headers(self) self.set_header('Accept', 'application/json') - self.set_header('Cache-Control', 'no-cache') - self.set_header( - 'X-Mopidy-Version', mopidy.__version__.encode('utf-8')) self.set_header('Content-Type', 'application/json; utf-8') class StaticFileHandler(tornado.web.StaticFileHandler): def set_extra_headers(self, path): - self.set_header('Cache-Control', 'no-cache') - self.set_header( - 'X-Mopidy-Version', mopidy.__version__.encode('utf-8')) + set_mopidy_headers(self) class AddSlashHandler(tornado.web.RequestHandler): From 5861071bb1d1fb3675e86afd88c30f20b722b84e Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 22 Jun 2014 00:39:54 +0200 Subject: [PATCH 07/11] http: List installed web clients at /mopidy/ --- mopidy/http/__init__.py | 5 ++-- mopidy/http/data/clients.html | 31 ++++++++++++++++++++++ mopidy/http/handlers.py | 49 +++++++++++++++++++++++++---------- tests/http/test_server.py | 11 +++++--- 4 files changed, 78 insertions(+), 18 deletions(-) create mode 100644 mopidy/http/data/clients.html diff --git a/mopidy/http/__init__.py b/mopidy/http/__init__.py index 2e131817..95675386 100644 --- a/mopidy/http/__init__.py +++ b/mopidy/http/__init__.py @@ -35,7 +35,7 @@ class Extension(ext.Extension): def setup(self, registry): from .actor import HttpFrontend - from .handlers import mopidy_app_factory + from .handlers import make_mopidy_app_factory HttpFrontend.apps = registry['http:app'] HttpFrontend.statics = registry['http:static'] @@ -43,5 +43,6 @@ class Extension(ext.Extension): registry.add('frontend', HttpFrontend) registry.add('http:app', { 'name': 'mopidy', - 'factory': mopidy_app_factory, + 'factory': make_mopidy_app_factory( + registry['http:app'], registry['http:static']), }) diff --git a/mopidy/http/data/clients.html b/mopidy/http/data/clients.html new file mode 100644 index 00000000..feff4fee --- /dev/null +++ b/mopidy/http/data/clients.html @@ -0,0 +1,31 @@ + + + + + + Mopidy + + + +
+

Mopidy

+ +

This web server is a part of the Mopidy music server. To learn more + about Mopidy, please visit + www.mopidy.com.

+
+ +
+

Web clients

+ + + +

Web clients which are installed as Mopidy extensions will + automatically appear here.

+
+ + diff --git a/mopidy/http/handlers.py b/mopidy/http/handlers.py index 5c5d481f..00fbf083 100644 --- a/mopidy/http/handlers.py +++ b/mopidy/http/handlers.py @@ -15,19 +15,24 @@ from mopidy.utils import jsonrpc logger = logging.getLogger(__name__) -def mopidy_app_factory(config, core): - return [ - (r'/ws/?', WebSocketHandler, { - 'core': core, - }), - (r'/rpc', JsonRpcHandler, { - 'core': core, - }), - (r'/(.*)', StaticFileHandler, { - 'path': os.path.join(os.path.dirname(__file__), 'data'), - 'default_filename': 'index.html' - }), - ] +def make_mopidy_app_factory(apps, statics): + def mopidy_app_factory(config, core): + return [ + (r'/ws/?', WebSocketHandler, { + 'core': core, + }), + (r'/rpc', JsonRpcHandler, { + 'core': core, + }), + (r'/(.+)', StaticFileHandler, { + 'path': os.path.join(os.path.dirname(__file__), 'data'), + }), + (r'/', ClientListHandler, { + 'apps': apps, + 'statics': statics, + }), + ] + return mopidy_app_factory def make_jsonrpc_wrapper(core_actor): @@ -142,6 +147,24 @@ class JsonRpcHandler(tornado.web.RequestHandler): self.set_header('Content-Type', 'application/json; utf-8') +class ClientListHandler(tornado.web.RequestHandler): + def initialize(self, apps, statics): + self.apps = apps + self.statics = statics + + def get(self): + set_mopidy_headers(self) + + names = set() + for app in self.apps: + names.add(app['name']) + for static in self.statics: + names.add(static['name']) + names.discard('mopidy') + + self.render('data/clients.html', apps=sorted(list(names))) + + class StaticFileHandler(tornado.web.StaticFileHandler): def set_extra_headers(self, path): set_mopidy_headers(self) diff --git a/tests/http/test_server.py b/tests/http/test_server.py index f8e1b74e..a3ef4997 100644 --- a/tests/http/test_server.py +++ b/tests/http/test_server.py @@ -25,10 +25,13 @@ class HttpServerTest(tornado.testing.AsyncHTTPTestCase): core.get_version = mock.MagicMock(name='get_version') core.get_version.return_value = mopidy.__version__ + apps = [dict(name='testapp')] + statics = [dict(name='teststatic')] + http_frontend = actor.HttpFrontend(config=config, core=core) http_frontend.apps = [{ 'name': 'mopidy', - 'factory': handlers.mopidy_app_factory, + 'factory': handlers.make_mopidy_app_factory(apps, statics), }] return tornado.web.Application(http_frontend._get_request_handlers()) @@ -57,10 +60,12 @@ class RootAppTest(HttpServerTest): class MopidyAppTest(HttpServerTest): def test_should_return_index(self): response = self.fetch('/mopidy/', method='GET') + body = tornado.escape.to_unicode(response.body) self.assertIn( - 'This web server is a part of the Mopidy music server.', - tornado.escape.to_unicode(response.body)) + 'This web server is a part of the Mopidy music server.', body) + self.assertIn('testapp', body) + self.assertIn('teststatic', body) self.assertEqual( response.headers['X-Mopidy-Version'], mopidy.__version__) self.assertEqual(response.headers['Cache-Control'], 'no-cache') From 65968719180470f699b59643f0ebbae2f3e9e022 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 22 Jun 2014 01:22:22 +0200 Subject: [PATCH 08/11] http: Test serving og legacy static_dir apps --- tests/http/test_server.py | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/tests/http/test_server.py b/tests/http/test_server.py index a3ef4997..79fb6866 100644 --- a/tests/http/test_server.py +++ b/tests/http/test_server.py @@ -12,8 +12,8 @@ from mopidy.http import actor, handlers class HttpServerTest(tornado.testing.AsyncHTTPTestCase): - def get_app(self): - config = { + def get_config(self): + return { 'http': { 'hostname': '127.0.0.1', 'port': 6680, @@ -21,6 +21,8 @@ class HttpServerTest(tornado.testing.AsyncHTTPTestCase): 'zeroconf': '', } } + + def get_app(self): core = mock.Mock() core.get_version = mock.MagicMock(name='get_version') core.get_version.return_value = mopidy.__version__ @@ -28,7 +30,7 @@ class HttpServerTest(tornado.testing.AsyncHTTPTestCase): apps = [dict(name='testapp')] statics = [dict(name='teststatic')] - http_frontend = actor.HttpFrontend(config=config, core=core) + http_frontend = actor.HttpFrontend(config=self.get_config(), core=core) http_frontend.apps = [{ 'name': 'mopidy', 'factory': handlers.make_mopidy_app_factory(apps, statics), @@ -57,6 +59,28 @@ class RootAppTest(HttpServerTest): self.assertEqual(response.headers['Cache-Control'], 'no-cache') +class LegacyStaticDirAppTest(HttpServerTest): + def get_config(self): + config = super(LegacyStaticDirAppTest, self).get_config() + config['http']['static_dir'] = os.path.dirname(__file__) + return config + + def test_should_return_index(self): + response = self.fetch('/', method='GET', follow_redirects=False) + + self.assertEqual(response.code, 404, 'No index.html in this dir') + + def test_should_return_static_files(self): + response = self.fetch('/test_server.py', method='GET') + + self.assertIn( + 'test_should_return_static_files', + tornado.escape.to_unicode(response.body)) + self.assertEqual( + response.headers['X-Mopidy-Version'], mopidy.__version__) + self.assertEqual(response.headers['Cache-Control'], 'no-cache') + + class MopidyAppTest(HttpServerTest): def test_should_return_index(self): response = self.fetch('/mopidy/', method='GET') From 9f925570d2300246e7f8b44c8794f1c04871780f Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 22 Jun 2014 01:24:57 +0200 Subject: [PATCH 09/11] http: Redirect from root to /mopidy/ if no static_dir app --- mopidy/http/actor.py | 17 ++++++++++------- mopidy/http/data/index.html | 30 ------------------------------ tests/http/test_server.py | 32 +++++++++++++++++++++----------- 3 files changed, 31 insertions(+), 48 deletions(-) delete mode 100644 mopidy/http/data/index.html diff --git a/mopidy/http/actor.py b/mopidy/http/actor.py index 3ab0a480..e834d897 100644 --- a/mopidy/http/actor.py +++ b/mopidy/http/actor.py @@ -68,13 +68,16 @@ class HttpFrontend(pykka.ThreadingActor, CoreListener): request_handlers.extend(self._get_static_request_handlers()) # Either default Mopidy or user defined path to files - static_dir = self.config['http']['static_dir'] - data_dir = os.path.join(os.path.dirname(__file__), 'data') - root_handler = (r'/(.*)', handlers.StaticFileHandler, { - 'path': static_dir if static_dir else data_dir, - 'default_filename': 'index.html' - }) - request_handlers.append(root_handler) + if self.config['http']['static_dir']: + request_handlers.append((r'/(.*)', handlers.StaticFileHandler, { + 'path': self.config['http']['static_dir'], + 'default_filename': 'index.html', + })) + else: + request_handlers.append((r'/', tornado.web.RedirectHandler, { + 'url': '/mopidy/', + 'permanent': False, + })) logger.debug( 'HTTP routes from extensions: %s', diff --git a/mopidy/http/data/index.html b/mopidy/http/data/index.html deleted file mode 100644 index 2376d3aa..00000000 --- a/mopidy/http/data/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Mopidy - - - -
-

Mopidy

- -

This web server is a part of the Mopidy music server. To learn more - about Mopidy, please visit - www.mopidy.com.

-
- -
-

Static content serving

- -

To see your own content instead of this placeholder page, change the - config value http/static_dir to point to the directory - containing your static files. This can be used to host e.g. a pure - HTML/CSS/JavaScript Mopidy client.

- -

If you replace this page with your own content, the Mopidy resources - and APIs at /mopidy/ will still be available.

-
- - diff --git a/tests/http/test_server.py b/tests/http/test_server.py index 79fb6866..bb93785a 100644 --- a/tests/http/test_server.py +++ b/tests/http/test_server.py @@ -39,21 +39,31 @@ class HttpServerTest(tornado.testing.AsyncHTTPTestCase): return tornado.web.Application(http_frontend._get_request_handlers()) -class RootAppTest(HttpServerTest): - def test_should_return_index(self): - response = self.fetch('/', method='GET') +class RootRedirectTest(HttpServerTest): + def test_should_redirect_to_mopidy_app(self): + response = self.fetch('/', method='GET', follow_redirects=False) - self.assertIn( - 'This web server is a part of the Mopidy music server.', - tornado.escape.to_unicode(response.body)) - self.assertEqual( - response.headers['X-Mopidy-Version'], mopidy.__version__) - self.assertEqual(response.headers['Cache-Control'], 'no-cache') + self.assertEqual(response.code, 302) + self.assertEqual(response.headers['Location'], '/mopidy/') + + +class LegacyStaticDirAppTest(HttpServerTest): + def get_config(self): + config = super(LegacyStaticDirAppTest, self).get_config() + config['http']['static_dir'] = os.path.dirname(__file__) + return config + + def test_should_return_index(self): + response = self.fetch('/', method='GET', follow_redirects=False) + + self.assertEqual(response.code, 404, 'No index.html in this dir') def test_should_return_static_files(self): - response = self.fetch('/mopidy.css', method='GET') + response = self.fetch('/test_server.py', method='GET') - self.assertIn('html {', tornado.escape.to_unicode(response.body)) + self.assertIn( + 'test_should_return_static_files', + tornado.escape.to_unicode(response.body)) self.assertEqual( response.headers['X-Mopidy-Version'], mopidy.__version__) self.assertEqual(response.headers['Cache-Control'], 'no-cache') From aed8670797045981e38bdf8b7c3a992568950d77 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 22 Jun 2014 09:53:03 +0200 Subject: [PATCH 10/11] http: Fix flake8 warnings --- mopidy/http/actor.py | 1 - tests/http/test_server.py | 22 ---------------------- 2 files changed, 23 deletions(-) diff --git a/mopidy/http/actor.py b/mopidy/http/actor.py index e834d897..5a11c3aa 100644 --- a/mopidy/http/actor.py +++ b/mopidy/http/actor.py @@ -2,7 +2,6 @@ from __future__ import unicode_literals import json import logging -import os import threading import pykka diff --git a/tests/http/test_server.py b/tests/http/test_server.py index bb93785a..cc20efe0 100644 --- a/tests/http/test_server.py +++ b/tests/http/test_server.py @@ -69,28 +69,6 @@ class LegacyStaticDirAppTest(HttpServerTest): self.assertEqual(response.headers['Cache-Control'], 'no-cache') -class LegacyStaticDirAppTest(HttpServerTest): - def get_config(self): - config = super(LegacyStaticDirAppTest, self).get_config() - config['http']['static_dir'] = os.path.dirname(__file__) - return config - - def test_should_return_index(self): - response = self.fetch('/', method='GET', follow_redirects=False) - - self.assertEqual(response.code, 404, 'No index.html in this dir') - - def test_should_return_static_files(self): - response = self.fetch('/test_server.py', method='GET') - - self.assertIn( - 'test_should_return_static_files', - tornado.escape.to_unicode(response.body)) - self.assertEqual( - response.headers['X-Mopidy-Version'], mopidy.__version__) - self.assertEqual(response.headers['Cache-Control'], 'no-cache') - - class MopidyAppTest(HttpServerTest): def test_should_return_index(self): response = self.fetch('/mopidy/', method='GET') From f850bb8bbcddbe8196fb669fa6ccb9ac37fe24c8 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 22 Jun 2014 09:58:45 +0200 Subject: [PATCH 11/11] docs: Update changelog --- docs/changelog.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 35839916..41ad4ff4 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -67,6 +67,9 @@ Feature release. them using pip. See the :ref:`http-server-api` for details. (Fixes: :issue:`440`) +- Added web page at ``/mopidy/`` which lists all web clients installed as + Mopidy extensions. (Fixes: :issue:`440`) + - Added support for extending the HTTP frontend with additional server side functionality. See :ref:`http-server-api` for details.