Commit Graph

46 Commits

Author SHA1 Message Date
Nick Steel
1d30e73ab0 http: use current Tornado IOLoop when stopping. (Fixes #1715).
This is in response to the breaking change in Tornado v5.0 where
IOLoop.instance is now a deprecated alias for IOLoop.current.
More info at https://www.tornadoweb.org/en/stable/releases/v5.0.0.html
2018-10-22 15:28:39 +01:00
Stein Magnus Jodal
a4f38e2018 zeroconf: Make stype argument required 2015-09-15 11:25:54 +02:00
Stein Magnus Jodal
d8bcd7f273 Rename mopidy.utils to mopidy.internal 2015-05-07 23:15:56 +02:00
Thomas Adamcik
9a2f8a3e4f http: Log errors instead of dying for HTTP startup. 2014-12-20 21:32:08 +01:00
Stein Magnus Jodal
496142c201 py3: Use absolute imports by default 2014-12-07 20:17:10 +01:00
dz0ny
711caa9417 avahi: Service hostname must contain, resolvable fqdn with .local appended to it. 2014-07-26 14:54:21 +02:00
Stein Magnus Jodal
1ebe1151fc http: Make event emitting testable 2014-07-17 01:14:06 +02:00
Stein Magnus Jodal
3fac0cb8de http: Split socket and server creation 2014-07-17 01:13:48 +02:00
Stein Magnus Jodal
215dd777f6 http: Move Mopidy request handlers to helper method 2014-07-17 00:58:10 +02:00
Stein Magnus Jodal
2cf37679a6 Merge branch 'develop' into feature/http-startup
Conflicts:
	mopidy/http/actor.py
2014-07-17 00:27:50 +02:00
Stein Magnus Jodal
ece59f5deb http: Simplify Zeroconf publishing 2014-07-17 00:21:59 +02:00
Stein Magnus Jodal
e9243357ae http: Format "server running" log msg like MPD
By removing the http://... URL in the log output, we hopefully remove the
dubious connection between hostname/port configuration and the URL you'll
actually use to browse the Mopidy web server.

Example log output with this change:

    ...
    INFO     Starting Mopidy frontends: HttpFrontend, MpdFrontend
    INFO     HTTP server running at [::ffff:127.0.0.1]:6680
    INFO     MPD server running at [::ffff:127.0.0.1]:6600
2014-07-16 22:36:03 +02:00
Stein Magnus Jodal
f9755b562c http: Raise FrontendError if socket creation fails
This removes the stacktraces when two Mopidy instances are started with the
same hostname/port configuration.
2014-07-16 22:36:03 +02:00
Stein Magnus Jodal
2177550649 http: Prettify HTTP router list in debug log 2014-07-15 01:42:37 +02:00
Stein Magnus Jodal
8041f921ad http: Style tweaks 2014-07-01 23:22:52 +02:00
Stein Magnus Jodal
b3bd10017a Merge branch 'ZenithDK/fix/check_static_dir' into develop 2014-07-01 23:20:41 +02:00
Lasse Bigum
cca029eb67 Check configured static_dir and fall back to default if non-existing
Signed-off-by: Lasse Bigum <lasse@bigum.org>
2014-06-28 00:51:51 +02:00
Lasse Bigum
20de648f18 Tornado redefines '::' to IPv6 only, so set '::' to None to get expected behaviour
Signed-off-by: Lasse Bigum <lasse@bigum.org>
2014-06-28 00:44:18 +02:00
Stein Magnus Jodal
aed8670797 http: Fix flake8 warnings 2014-06-22 09:53:03 +02:00
Stein Magnus Jodal
9f925570d2 http: Redirect from root to /mopidy/ if no static_dir app 2014-06-22 01:24:57 +02:00
Stein Magnus Jodal
fbcc73004d http: Redirect from /app to /app/ 2014-06-21 16:36:16 +02:00
Stein Magnus Jodal
49644dfd99 http: Use same string interpolation style as elsewhere 2014-06-21 15:13:44 +02:00
dz0ny
7c428ce8d2 Fix http router so it can handle /{ext_name} same as /{ext_name}/ 2014-06-21 15:05:13 +02:00
Stein Magnus Jodal
33228f2528 http: Simplify app registration 2014-06-04 21:32:19 +02:00
Stein Magnus Jodal
eea6138b3d http: Simplify static files serving 2014-06-04 20:47:49 +02:00
Stein Magnus Jodal
5526a500ab http: Rename variable 2014-05-22 21:03:42 +02:00
Stein Magnus Jodal
684a64405d http: Move MopidyHttpRouter into handlers module 2014-05-22 21:03:42 +02:00
Stein Magnus Jodal
252eb4d735 http: Adjust log level 2014-05-22 20:47:49 +02:00
Stein Magnus Jodal
fe9a126a2a http: Enforce router's URL namespace 2014-05-20 23:53:26 +02:00
Stein Magnus Jodal
4b383c1762 http: Move Mopidy request handlers to a MopidyHttpRouter 2014-05-20 23:49:22 +02:00
Stein Magnus Jodal
5d1f8f2203 http: Give routers access to the core API 2014-05-20 23:30:49 +02:00
Stein Magnus Jodal
6d04aaf3e4 http: More consistent use of 'request handler' 2014-05-20 22:50:45 +02:00
Stein Magnus Jodal
b44c9a6f9c http: Simplify extension loading
...and fix breakage I just made myself.
2014-05-20 22:42:32 +02:00
Stein Magnus Jodal
ea5a317b00 http: Avoid tornado import before extension is loaded, group all handlers 2014-05-20 22:36:15 +02:00
Stein Magnus Jodal
acad8ab7a2 http: Use single quotes 2014-05-20 22:35:38 +02:00
Stein Magnus Jodal
a4a417eb37 http: Fix bad merge that reverted PR#725 2014-05-14 23:53:09 +02:00
dz0ny
031c7c8e93 Add: Tornado as required dependency
Fix: Remove draft76
Fix: Remove class attributes for ws handler
Revert: default to /ws/ for for mopidy.html
2014-05-12 16:16:08 +02:00
dz0ny
26833b4093 Fix: Import order for whole PR 2014-05-12 14:54:50 +02:00
dz0ny
f1d1a4713b Squashed commit of the following:
commit dbb7005aa866cdc337bde9c8169e9bf15e5c8042
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Sun May 11 22:12:58 2014 +0200

    Fix: Make PR mergable

commit 5bb27da72c4276a930bf33955e6583f6781d23f6
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Thu May 8 23:31:54 2014 +0200

    Add: helper method for extensin url

commit 8a348b26b65102084a606ff73384a478bb785cf1
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Thu May 8 00:35:50 2014 +0200

    Add: Refactor ws and rpc to handlers, reuse code

commit 677c809d2b39a6c982ab835368fdb8a3ad9d1a92
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Thu May 8 00:18:10 2014 +0200

    Fix: Return proper HTTP headers

commit fe5fea2fc2a0d28a39532d6d4cd2b21013d57d24
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Wed May 7 23:48:19 2014 +0200

    Add: RPC post handler
    Add: tests for http post handler

commit e77e60310853b368758b09b303a96a95ff1b9b93
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Sun May 4 22:15:04 2014 +0200

    Add: Documentation on how to extend http api

commit a3a14fb5d15f095e5bab23a590e0a8360a039f9a
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Sun May 4 19:48:34 2014 +0200

    Add: HTTP tests for default router and static handler

commit 0d9544256bcb8f048eaedb5cdd57b1de027d387b
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Sun May 4 15:44:32 2014 +0200

    Fix: Move StaticFileHandler to main http package

commit c83c9f661e658e4a843dc5c8c6ba5dc3f1ea9c1e
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Sun May 4 15:29:49 2014 +0200

    Add: default Router implementation

commit 258cb7210bdf13833884c04cfb7fb4fa704394a7
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Sun May 4 15:00:46 2014 +0200

    Add: Switch to registry for router registration

commit b7bfe7b814235b030d7ac30de90e2331e3d809d3
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Sat May 3 21:52:58 2014 +0200

    Fix: Private methods
    Fix: Point to mopidy.html instead main.html
    Fix: Less noise in console

commit 232abe3029e93f78ce25db0c1bd44743cc23ed2d
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Sat May 3 21:32:07 2014 +0200

    Fix: Start IOLoop in separate thread, so actor can stop it

commit d686892c2fa993cbedc99c8e8e7f9c961ac6f35a
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Sat May 3 19:30:49 2014 +0200

    Fix: Router load order
    Fix: JS helper library WSS default url
    Add: Handlers from extensions

commit a1b0f5673a6719f229df27feccb284324675e9d1
Author: dz0ny <dz0ny@ubuntu.si>
Date:   Sat May 3 14:53:30 2014 +0200

    Add: Switch to Tornado framework
2014-05-12 14:54:50 +02:00
Stein Magnus Jodal
b754885064 Fix all import order warnings 2014-05-07 20:08:43 +02:00
Stein Magnus Jodal
2979de0f94 http: Polish Mopidy-HTTP Zeroconf service
Builds upon #725 to:

- Remove extra config for Mopidy-HTTP Zeroconf service
- Refactor Zeroconf setup code in the HTTP frontend a bit
- Add documentation
2014-05-06 23:20:14 +02:00
Sam Willcocks
4e8f1c7d54 Add extra zeroconf stuff in http to announce mopidy-http as it's own service
This is intended to help clients using the websocket api discover mopidy
2014-04-27 03:30:16 +01:00
Stein Magnus Jodal
42623fb48f zeroconf: Move all logging to debug level 2014-02-07 09:06:10 +01:00
Stein Magnus Jodal
7c3f7dfcea The harmless Zeroconf warning is confusing users 2014-01-12 12:19:04 +01:00
Stein Magnus Jodal
0fb7c79524 log: Use loggers named after __name__ 2014-01-01 13:31:20 +01:00
Stein Magnus Jodal
621aff22c9 http: Move mopidy.{frontends => }.http 2013-12-31 14:04:25 +01:00