Commit Graph

3957 Commits

Author SHA1 Message Date
Stein Magnus Jodal
6e55435aa9 mpd: Enable browsing of empty dirs
This was disabled together with a bunch of other changes without any
explanation in commit f24ca36e5a. I'm
guessing that this wasn't intentional, and no test covered the case.

(cherry picked from commit 4e508cd017)
2014-12-16 23:25:31 +01:00
Thomas Adamcik
671ee5ee6a audio: Switch to using converted taglists instead of raw data. 2014-12-14 22:25:52 +01:00
Thomas Adamcik
f477e9176e audio: Add helper for converting taglists
Goal is simply to avoid leaking gst types to the rest of mopidy. Only part we
will be leaking is the tag keys. Which we can live with.
2014-12-14 22:23:13 +01:00
Thomas Adamcik
541412dbfc mpd: Remove newline escaping code.
This was added for #881, where the correct fix turned out to be to remove
comments from the responses. We should still add some sanity checks for
verifying that our responses at the very least only contain printable chars.
2014-12-14 14:35:13 +01:00
Thomas Adamcik
08a8d5c43b mpd: Remove "Comment" tag type from translator output.
Newer versions of the protocol have removed this tag, so we should as well.
This also works around the issue of #881 which was breaking things with
newlines in comment fields.

The readcomments command seems to replace this, but it seems to only care about
specific extra tagtypes, not the general comment tag we normally collect when
scanning things.
2014-12-14 14:16:37 +01:00
Thomas Adamcik
2c3217685b utils: Switch to exceptions.FindError for errors. 2014-12-14 14:08:45 +01:00
Thomas Adamcik
f99028ce41 Merge pull request #882 from lukasvogel/develop
Escape newline characters when dispatching data
2014-12-14 13:19:21 +01:00
Thomas Adamcik
1404f379ca Merge pull request #904 from tamland/tag_refresh
local: fix modified files not being updated
2014-12-14 13:17:09 +01:00
Stein Magnus Jodal
4e508cd017 mpd: Enable browsing of empty dirs
This was disabled together with a bunch of other changes without any
explanation in commit f24ca36e5a. I'm
guessing that this wasn't intentional, and no test covered the case.
2014-12-13 01:27:14 +01:00
Stein Magnus Jodal
33e3fe9173 mpd: Add browse() helper docs 2014-12-13 01:26:36 +01:00
Stein Magnus Jodal
be341fcd04 docs: Fix references 2014-12-12 22:45:02 +01:00
Thomas Amland
dfd897832a [local] fix modified files not being updated 2014-12-11 14:41:37 +01:00
Stein Magnus Jodal
7acf62723a py3: Use itervalues() for local track database 2014-12-07 21:44:39 +01:00
Stein Magnus Jodal
4f428b8601 py3: Move compat module out of utils 2014-12-07 21:36:15 +01:00
Stein Magnus Jodal
57cdab586a Fix flake8 warnings 2014-12-07 20:39:39 +01:00
Stein Magnus Jodal
e35a066d5e py3: Use explicit float or integer division 2014-12-07 20:25:51 +01:00
Stein Magnus Jodal
7124226fc7 py3: Use renamed function via compat 2014-12-07 20:19:01 +01:00
Stein Magnus Jodal
01c7f12976 py3: Import moved modules via compat 2014-12-07 20:19:01 +01:00
Stein Magnus Jodal
95df66865e py3: Use list comprehensions instead of filter()
This is just a stylistic change, and is not strictly required for Python 3
compat.
2014-12-07 20:19:01 +01:00
Stein Magnus Jodal
1d26c2d63c py3: Use .item() and .values()
As .iteritem() and .itervalues() doesn't exist in Python 3.
2014-12-07 20:19:01 +01:00
Stein Magnus Jodal
58527406c1 py3: Use compat.text_type instead of unicode 2014-12-07 20:17:10 +01:00
Stein Magnus Jodal
b9a5192d5f py3: Add Python 2/3 compat module
Keep all the hacks in a single place. This looks like all we need, so no need
to depend on six.
2014-12-07 20:17:10 +01:00
Stein Magnus Jodal
98ca748996 py3: Use print function instead of print statement 2014-12-07 20:17:10 +01:00
Stein Magnus Jodal
496142c201 py3: Use absolute imports by default 2014-12-07 20:17:10 +01:00
Stein Magnus Jodal
e18fd7d507 Merge branch 'release/v0.19.x' into develop 2014-11-26 23:53:31 +01:00
Stein Magnus Jodal
4a6e7d292c docs: Don't refer to the tracklist as a playlist 2014-11-25 21:37:55 +01:00
Stein Magnus Jodal
680dbffc0c models: Make all fields default to None or empty collection
(cherry picked from commit abed15b9e4)
2014-11-04 21:27:29 +01:00
Stein Magnus Jodal
a4b17a9aa8 models: Fix equality for fields set to the default
Fixes #837

(cherry picked from commit bdd1fb983b)
2014-11-04 20:17:20 +01:00
Stein Magnus Jodal
88d64044de models: Hide empty lists from repr()
(cherry picked from commit 305a76486d)

Conflicts:
	docs/changelog.rst
2014-11-04 20:17:13 +01:00
Thomas Kemmer
1c5b07a374 Make everything that is not a Track browseable 2014-10-24 12:47:58 +02:00
Lukas Vogel
c8bc0afc93 reintroduce generator expression 2014-10-23 12:31:55 +02:00
Lukas Vogel
f0574d1c8e fixed embarassing bug left over from refactoring to meet coding standards 2014-10-23 03:24:18 +02:00
Lukas Vogel
f499dafe13 Escape newline characters when dispatching data 2014-10-23 02:57:57 +02:00
Stein Magnus Jodal
c84ed733ee Merge pull request #874 from adamcik/feature/improve-find-and-scan-code
Feature/improve find and scan code
2014-10-20 14:07:46 +02:00
Thomas Adamcik
b9a7a9d2b6 local: Add follow symlinks setting 2014-10-17 20:08:33 +02:00
Thomas Adamcik
369edab76d utils/path: Make it more clear that we are not following symlinks 2014-10-17 20:08:12 +02:00
Thomas Adamcik
d4f47a34c2 local: Move Hidden file/directory check to excluded extensions check 2014-10-17 16:52:01 +02:00
Thomas Adamcik
43d8062094 util/path: s/os.error/OSError/ 2014-10-17 16:46:33 +02:00
Thomas Adamcik
5bf6b779ac local: Add basic logging of scan errors 2014-10-15 23:56:59 +02:00
Thomas Adamcik
3dc0a06ffe local: Fix skipping of hidden file/directories 2014-10-15 23:54:52 +02:00
Thomas Adamcik
063c757570 utils/path: Add support for handling sym/hardlink loops 2014-10-15 23:46:08 +02:00
Thomas Adamcik
54a89038d3 utils/path: Don't skip hidden files and folders in generic find code
Updates the local scan code to do this instead.
2014-10-15 23:45:49 +02:00
Thomas Adamcik
ebb62885cd util/path: Add basic support for following symlinks 2014-10-15 23:44:48 +02:00
Thomas Adamcik
de5fe5ebab tests: Add test for current find symlink handling 2014-10-15 23:43:13 +02:00
Thomas Adamcik
de4bdbec03 tests: Minor cleanup of the existing find tests 2014-10-15 23:42:15 +02:00
Thomas Adamcik
2447e2fa40 util/path: Expose errors to callers of find helper 2014-10-15 23:42:12 +02:00
Stein Magnus Jodal
c9b0101e76 docs: Make extensiondev example and API docs for validate_environment() match
(cherry picked from commit 31c874b3eb)
2014-10-13 23:19:30 +02:00
Stein Magnus Jodal
31c874b3eb docs: Make extensiondev example and API docs for validate_environment() match 2014-10-12 11:40:59 +02:00
Thomas Adamcik
2665a5521b audio: Add gst.DEBUG_BIN_TO_DOT_FILE pipeline debuging 2014-09-26 23:51:33 +02:00
Stein Magnus Jodal
130b1eb32a docs: Define timestamp type 2014-09-23 20:55:16 +02:00
Stein Magnus Jodal
7b50855908 Merge remote-tracking branch 'mopidy/develop' into feature/history
Conflicts:
	docs/changelog.rst
2014-09-23 20:14:40 +02:00
Thomas Adamcik
a16cac2188 Merge pull request #862 from jodal/fix/clear-current-track
core: Remove clear_current_track argument from stop()
2014-09-23 19:54:59 +02:00
Stein Magnus Jodal
542cd3a3bb http: Add history controller to JSON-RPC API 2014-09-23 19:02:58 +02:00
Stein Magnus Jodal
5317834baf history: Change size property to get_length() method
For consistency with tracklist.get_length() and our goal of aligning Python
and JS APIs by using less properties in the core API.
2014-09-23 18:47:54 +02:00
Stein Magnus Jodal
177f91fb27 history: Tweaking formatting and variable names 2014-09-23 18:45:24 +02:00
Stein Magnus Jodal
1f1e86023b history: Cleanup docstrings 2014-09-23 18:44:17 +02:00
Stein Magnus Jodal
d30cf68efd history: Raise TypeError if non-Tracks are added 2014-09-23 18:42:41 +02:00
Stein Magnus Jodal
ded43039bf history: Keep history in private attribute
So it is not accessible directly from other actors.
2014-09-23 18:38:38 +02:00
Stein Magnus Jodal
f3a6c10188 history: Import entire modules
For concistency with other code.
2014-09-23 18:37:18 +02:00
Stein Magnus Jodal
1f9c5c609a history: Use time.time() to get time since epoch 2014-09-23 18:34:50 +02:00
Stein Magnus Jodal
f8f06f4ec4 playback: Move comment so its next to the line it applies to 2014-09-23 18:33:24 +02:00
Stein Magnus Jodal
718405421d history: Rename class to HistoryController
For consistency with other core controllers.
2014-09-23 18:32:37 +02:00
Arjun Naik
a6370b0a67 Switched track name and artist order in history object. 2014-09-23 18:09:12 +02:00
Arjun Naik
9006968f75 TrackHistory stores Ref instances. Timestamp as epoch in milliseconds also stored. 2014-09-23 18:09:12 +02:00
Arjun Naik
ed87ab8dd1 Added a playback history object to the core. 2014-09-23 18:09:11 +02:00
Stein Magnus Jodal
c629e105d7 docs: Update changelog with PR#840 2014-09-23 14:29:30 +02:00
Stein Magnus Jodal
1fcc75ba1e Merge pull request #840 from tkem/feature/local-library-lookup-multiple
local: Return multiple tracks from lookup()
2014-09-23 14:14:22 +02:00
Stein Magnus Jodal
d5de898b2d core: Remove clear_current_track argument from stop() 2014-09-23 01:10:51 +02:00
Thomas Adamcik
508391cf51 Merge pull request #855 from jodal/feature/emit-none-to-emit-eos
audio: Deprecate emit_end_of_stream
2014-09-22 22:58:32 +02:00
Stein Magnus Jodal
abed15b9e4 models: Make all fields default to None or empty collection 2014-09-22 22:25:42 +02:00
Stein Magnus Jodal
bdd1fb983b models: Fix equality for fields set to the default
Fixes #837
2014-09-22 22:01:50 +02:00
Stein Magnus Jodal
305a76486d models: Hide empty lists from repr() 2014-09-22 21:42:57 +02:00
Stein Magnus Jodal
00c17ae193 audio: Deprecate emit_end_of_stream 2014-09-21 21:01:11 +02:00
Stein Magnus Jodal
f58fe9a192 py3: Replace xrange() with range() 2014-09-17 20:28:07 +02:00
Stein Magnus Jodal
cd3d44ff6d py3: Use '0o' octal literal 2014-09-16 09:48:38 +02:00
Stein Magnus Jodal
c2810d0423 py3: Fix thread import 2014-09-16 09:46:16 +02:00
Stein Magnus Jodal
4c6c7ce016 http: Update Mopidy.js to v0.4.1 2014-09-11 21:50:11 +02:00
Stein Magnus Jodal
37c736533d Remove Pykka version check
This check was made redundant with our move to setuptools. The executables
made by setuptools checks if all our Python dependencies are available in the
required versions before starting Mopidy.
2014-09-09 08:38:14 +02:00
Stein Magnus Jodal
eb97b55d88 Keep gobject check together with the other checks 2014-09-09 08:35:21 +02:00
Stein Magnus Jodal
2050385a5f Update Python and Pykka version check error messages 2014-09-09 08:24:42 +02:00
Stein Magnus Jodal
db4868207c Print friendly error message if gobject isn't found
Fixes #836
2014-09-08 21:15:14 +02:00
Thomas Adamcik
ada7641ee6 audio: Remove visualizer support 2014-09-07 23:48:04 +02:00
Thomas Adamcik
3f699b97d2 audio: Split message/event teardown handler 2014-09-07 22:35:58 +02:00
Thomas Adamcik
d049b07fa9 Merge branch 'develop' into feature/audio-message-handler 2014-09-07 21:38:19 +02:00
Thomas Adamcik
e744a6da87 audio: Resolve review comments 2014-09-07 21:38:13 +02:00
Thomas Adamcik
c129cd4b24 audio: s/Triggering/Audio event/ 2014-09-07 21:36:31 +02:00
Thomas Kemmer
806174916d Change JsonLibrary.lookup to return a list 2014-09-05 05:35:18 +02:00
Stein Magnus Jodal
d41deb1844 Merge branch 'release/v0.19.x' into develop
Conflicts:
	docs/changelog.rst
2014-09-01 23:17:00 +02:00
Stein Magnus Jodal
e1ab70e1e9 Bump version to 0.19.4 2014-09-01 23:08:59 +02:00
Thomas Kemmer
380223bb96 local: Return multiple tracks from lookup() 2014-08-30 14:02:43 +02:00
Stein Magnus Jodal
c6f88feb00 Merge branch 'release/v0.19.x' into develop 2014-08-30 00:27:07 +02:00
Stein Magnus Jodal
83e779eaaf http: Guard against double close of WebSocket 2014-08-30 00:25:43 +02:00
Stein Magnus Jodal
fc94d0789e Merge branch 'release/v0.19.x' into develop 2014-08-29 21:28:58 +02:00
Stein Magnus Jodal
f1096d332c local: Move constant to Library class
Related to #833
2014-08-29 21:28:42 +02:00
Stein Magnus Jodal
c50641230d Merge branch 'release/v0.19.x' into develop 2014-08-29 14:03:11 +02:00
Stein Magnus Jodal
69c3e107a2 local: Add ROOT_DIRECTORY_URI constant
Related to #833
2014-08-29 14:02:08 +02:00
Stein Magnus Jodal
0e60730704 backends: Update browse() signature and docs to match core implementation
Fixes #833
2014-08-29 13:50:12 +02:00
Stein Magnus Jodal
2830784703 Merge pull request #827 from trygveaa/fix/network-thread-issue
network: disable_recv before telling actor to close connection
2014-08-29 13:36:48 +02:00
Stein Magnus Jodal
a244761abc mpd: Replace / with | instead of whitespace in playlist names 2014-08-17 23:25:09 +02:00
Stein Magnus Jodal
1484514224 main: Log uncaught exceptions
(cherry picked from commit 027b7a53fe)
2014-08-16 23:20:43 +02:00
Stein Magnus Jodal
027b7a53fe main: Log uncaught exceptions 2014-08-16 23:04:01 +02:00
Stein Magnus Jodal
3c3fce0187 Merge branch 'release/v0.19.x' into develop 2014-08-15 22:52:11 +02:00
Trygve Aaberge
265951bf00 network: disable_recv before telling actor to close connection
As of d62ad96, when the connection can't receive more data from the
client, it tells the actor to stop the connection and calls
disable_recv(). The actor operates in it's own thread and when it stops
the connection, disable_recv is being called again from a different
thread. Since the actor is told to stop the connection before
disable_recv is called, the two calls to disable_recv may happen
simultaneously.

This causes a race condition issue where both threads can reach past the
check that recv_id is not None before either of them set it to None. If
one of them set it to None before the other one tries to use it, an
error is raised.

This commit calls disable_recv before telling the actor to stop the
connection. Since disable_recv is a blocking call, this ensures that
recv_id is being set to None before the actor thread begins to stop the
connection.

Fixes #781
2014-08-14 01:58:48 +02:00
Trygve Aaberge
f0b66bdfcb main: Ensure that exit_status_code always is assigned
KeyboardInterrupts are not always catched in commands.py. As far as I
have seen, if I/O operations are ongoing, a KeyboardInterrupt may be
raised there instead of in commands.py. In some cases, this may cause
loop.run() to return, which previously resulted in exit_status_code
being referenced before assignment.
2014-08-13 01:21:03 +02:00
Stein Magnus Jodal
ae3a932ed3 Merge branch 'release/v0.19.x' into develop
Conflicts:
	mopidy/config/__init__.py
2014-08-12 23:54:14 +02:00
Thomas Adamcik
ac5bf9af17 audio: Move most of event handling out of audio.
Some of the signal handling still needs to be moved.
2014-08-11 22:33:49 +02:00
Thomas Adamcik
101b2a9817 audio: Make stream-changed correctly handle tee setup
For the purposes of this event we consider the outputs sink the final element.
If we don't do this we would get one event per branch, and we don't want to
track when each of them actually switches any way. So just tracking when the
tee/outputs bin gets the event is good enough for us.

As part of this I've also added 'testoutput' as a special cased output value.
This is now needed as outputs are always synced to the clock, making testing
a lot less practical.
2014-08-11 22:33:49 +02:00
Trygve Aaberge
584484379a config: Only load .conf-files when loading directories 2014-08-11 16:21:34 +02:00
Trygve Aaberge
9e41eff187 config: Support passing directories to mopidy --config 2014-08-11 14:48:04 +02:00
Trygve Aaberge
0863a813fa main: Return status code 1 if {Backend,Frontend,Mixer}Error is raised 2014-08-11 13:43:18 +02:00
Trygve Aaberge
bac3bfb7a2 log: Don't disable loggers when loading fileConfig
The default when loading config for logging from a file is to disable
existing loggers. Since some loggers are created before logging is set
up, these loggers were disabled if logging/config_file is set.

(cherry picked from commit cb0387c46d)

Conflicts:
	docs/changelog.rst
2014-08-11 13:00:01 +02:00
Trygve Aaberge
cb0387c46d log: Don't disable loggers when loading fileConfig
The default when loading config for logging from a file is to disable
existing loggers. Since some loggers are created before logging is set
up, these loggers were disabled if logging/config_file is set.
2014-08-11 01:42:30 +02:00
Stein Magnus Jodal
e1fda35351 config: Only log existing config files 2014-08-07 11:36:25 +02:00
Trygve Aaberge
210e1705e7 mpd: Fix list commands with 3 arguments (fixes #817)
List commands with 3 arguments should return albums, not artists.

(cherry picked from commit ec413126f1)
2014-08-05 23:52:46 +02:00
Trygve Aaberge
ec413126f1 mpd: Fix list commands with 3 arguments (fixes #817)
List commands with 3 arguments should return albums, not artists.
2014-08-05 18:46:16 +02:00
Thomas Adamcik
fd9100a5f3 audio: Annotate code with more TODOs and questions 2014-08-03 23:57:22 +02:00
Thomas Adamcik
6b88b4f685 audio: Group playbin teardown/setup
This makes it possible to see that we setup and teardown the same things. Also
fixes disconnect on a signal we no longer listen to.
2014-08-03 23:57:22 +02:00
Thomas Adamcik
b8a0ca59cd audio: Refactor softwaremixer and audio interactions
This rips the mixer bits and pieces that have been hiding in the audio actor to
it's own class. The software mixer now only knows about this and nothing else
from audio.
2014-08-03 23:57:22 +02:00
Thomas Adamcik
4bfc5e7a80 audio: Split out proxy setup 2014-08-03 23:57:22 +02:00
Thomas Adamcik
72ca1a74c3 audio: Unify source handlers
notify::source and setup-source are the same, just that setup-source is a
convenience wrapper.
2014-08-03 23:57:22 +02:00
Thomas Adamcik
d650c0ba14 audio: Split out ouput handling from audio actor
This also lays some basic ground work for handling multiple outputs.
2014-08-03 23:57:22 +02:00
Thomas Adamcik
b9879ef81e audio: Improve GStreamer logging
This adds an extra mopidy.audio.gst logger and moves the GStreamer logging to
it. Additionally this adds more logging so we can likely get by with just
mopidy logs in more cases.
2014-08-03 23:57:22 +02:00
Thomas Adamcik
88788fddfd audio: Use pbutils to provide usable plugin missing info 2014-08-03 23:57:22 +02:00
Thomas Adamcik
fb8b02cee9 audio: Split out appsrc handling 2014-08-03 23:57:22 +02:00
Thomas Adamcik
f0f19ebc2e audio: Add docs to signal handler helper 2014-08-03 23:57:22 +02:00
Thomas Adamcik
531b312ace audio: Split out the signals tracking 2014-08-03 23:57:21 +02:00
Stein Magnus Jodal
e9822117e5 Merge branch 'master' into develop
Conflicts:
	docs/changelog.rst
2014-08-03 23:40:18 +02:00
Stein Magnus Jodal
dc80f17296 Bump version to 0.19.3 2014-08-03 23:34:25 +02:00
Stein Magnus Jodal
9260ae23a7 Merge branch 'release/v0.19.x' into develop 2014-08-03 23:13:40 +02:00
Stein Magnus Jodal
837fb00fb7 Fail early if extension doesn't implement setup()
Fixes #813
2014-08-03 23:13:14 +02:00
Thomas Adamcik
8376286e7e zeroconf: Fix intermittent dbus/avahi exception
This fixes an issue where I sometimes would get an error from dbus
'Unable to guess signature from an empty list'. After some digging
and checking the avahi dbus specs I found they expect the text list
to have a signature of 'aay' (an array of arrays containing bytes).
So instead of using python lists we now use a 'typed' dbus array.

It is not clear to me why this is a heisenbug, but this fix does
seem to make it go away.

(cherry picked from commit 80f5c9158d)
2014-08-03 15:18:55 +02:00
Thomas Adamcik
80f5c9158d zeroconf: Fix intermittent dbus/avahi exception
This fixes an issue where I sometimes would get an error from dbus
'Unable to guess signature from an empty list'. After some digging
and checking the avahi dbus specs I found they expect the text list
to have a signature of 'aay' (an array of arrays containing bytes).
So instead of using python lists we now use a 'typed' dbus array.

It is not clear to me why this is a heisenbug, but this fix does
seem to make it go away.
2014-08-03 11:43:28 +02:00
Stein Magnus Jodal
4f34f0103d Merge pull request #680 from adamcik/feature/audio-prep-work-for-gapless
audio: Preparation work for gapless playback support
2014-08-02 20:55:54 +02:00
Thomas Adamcik
5d1dd1a355 review-fixes: Mostly typos etc. 2014-08-02 20:45:55 +02:00
Stein Magnus Jodal
514d83636a docs: Add PlaylistsProvider docs 2014-08-02 00:22:38 +02:00
Thomas Adamcik
1b8feefcdc audio: Link to context of why we demote jack sinks
(cherry picked from commit 29019d94af)
2014-07-30 00:30:13 +02:00
Thomas Adamcik
3f6a9acea1 Merge branch 'develop' into feature/audio-prep-work-for-gapless 2014-07-30 00:12:00 +02:00
Thomas Adamcik
29019d94af audio: Link to context of why we demote jack sinks 2014-07-29 23:45:22 +02:00
Thomas Adamcik
1fd455a53c Merge pull request #801 from arjunrn/develop
raspi: Workaround for RasPi selecting jack server.
2014-07-29 23:43:39 +02:00
Thomas Adamcik
e73159dc6c Merge branch 'develop' into feature/audio-prep-work-for-gapless 2014-07-29 23:07:08 +02:00
Ignasi Fosch
13073362f4 Correct if .. is not None 2014-07-27 17:52:14 +02:00
Ignasi Fosch
e9289ca554 Checks for musicbrainz album ID and sets images to a list containing the corresponding URL 2014-07-27 16:34:28 +02:00
Arjun Naik
f4777e50c2 Fixed long line Flake8 warning. 2014-07-27 14:33:34 +00:00
Arjun Naik
4d5f60fd06 Workaround for RasPi selecting jack server. 2014-07-27 11:41:27 +00:00
Stein Magnus Jodal
c3011c132d Merge pull request #796 from ifosch/gh662
Fix negative track lengths on radio streams. Fixes #662.
2014-07-26 16:50:48 +02:00
Ignasi Fosch
b13505ea45 Fix the Line too long lint error 2014-07-26 16:42:42 +02:00
Ignasi Fosch
8459464f34 Fix mopidy/audio/scan.py to avoid negative values in track lengths
The fix is the most elegant I found, but it might pass undetected.
2014-07-26 16:31:37 +02:00
dz0ny
711caa9417 avahi: Service hostname must contain, resolvable fqdn with .local appended to it. 2014-07-26 14:54:21 +02:00
Nick Steel
a2128864e7 Fixed typo in comment 2014-07-26 13:38:28 +01:00
Stein Magnus Jodal
3bc82f82ac Bump version to 0.19.2 2014-07-26 14:18:50 +02:00
Stein Magnus Jodal
93bf3ea918 mpd: Fix crash on wrong number of command args
Fixes #789
2014-07-26 13:56:26 +02:00
Stein Magnus Jodal
e4b54426b4 audio: Set initial volume on software mixer
This must be set after the audio actor has injected itself into the software
mixer, else it will have no effect on the GStreamer software mixer.

Fixes #791
2014-07-25 12:35:01 +02:00
Stein Magnus Jodal
6ed8132f76 http: Allow WebSocket requests from other hosts
This makes Tornado 4.0 behavior consistent with previous Tornado versions.

Fixes #788
2014-07-25 10:52:39 +02:00
Stein Magnus Jodal
c48103f1d2 deps: Remove GStreamer mixers from element list 2014-07-24 14:17:06 +02:00
Stein Magnus Jodal
6ab2ef85d4 deps: Add flump3dec (and mpg123audiodec) to Gst element list 2014-07-24 14:16:16 +02:00
Stein Magnus Jodal
0463b14a6a Revert "Remove 'mad' from 'mopidy deps' listing"
This reverts commit cb6e19c039.

The "mad" element is the only way to decode MP3 with GStreamer 0.10 on OS X.
2014-07-24 14:11:17 +02:00
Stein Magnus Jodal
19dae10575 Bump version to 0.19.1 2014-07-23 18:14:00 +02:00
Stein Magnus Jodal
ae49c4d113 http: Add missing string interpolation placeholder 2014-07-23 17:35:55 +02:00
Thomas Adamcik
2aeb87e003 Merge branch 'develop' into feature/audio-prep-work-for-gapless
Conflict files fixed up to a state where tests pass again before commit.

Conflicts:
	mopidy/audio/actor.py
	mopidy/audio/listener.py
	tests/audio/test_actor.py
	tests/audio/test_listener.py
2014-07-23 00:06:29 +02:00
Stein Magnus Jodal
292cf8f32d Fix Mopidy version when run from another Git repo (related to #706) 2014-07-22 16:26:39 +02:00
Stein Magnus Jodal
f55f3d75c1 http: Fix path to socket object 2014-07-22 14:01:22 +02:00
Stein Magnus Jodal
0c10199632 http: Only require Tornado >= 2.3 2014-07-22 13:43:42 +02:00
Stein Magnus Jodal
0bf7302005 Merge remote-tracking branch 'adamcik/fix/gh-734-cleanup-audio-buffering' into develop
Conflicts:
	mopidy/audio/actor.py
2014-07-20 12:29:49 +02:00
Thomas Adamcik
03f2e0e322 Merge pull request #784 from jodal/feature/http-startup
http: Improve error handling at HTTP server startup
2014-07-17 23:29:04 +02:00
Stein Magnus Jodal
3e074cbddc mixer: Add init method to get signature included in docs 2014-07-17 01:33:23 +02:00
Stein Magnus Jodal
b24835163b docs: Show full exception path 2014-07-17 01:31:46 +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
47c507b8a7 zeroconf: ::ffff:127.* is also loopback addresses 2014-07-17 00:25:16 +02:00
Stein Magnus Jodal
b685f2ae63 mpd: Simplify Zeroconf publishing 2014-07-17 00:22:39 +02:00
Stein Magnus Jodal
ece59f5deb http: Simplify Zeroconf publishing 2014-07-17 00:21:59 +02:00
Stein Magnus Jodal
c098ac961f zeroconf: Improve log messages 2014-07-17 00:19:06 +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
Thomas Adamcik
c6d810a049 Merge pull request #760 from jodal/feature/mixers
New mixer API
2014-07-16 22:32:43 +02:00
Stein Magnus Jodal
c28017c859 mpd: Remove redundant variable 2014-07-16 22:24:35 +02:00
Stein Magnus Jodal
7e6d3de81a Merge branch 'develop' into feature/mixers
Conflicts:
	mopidy/backend/__init__.py
2014-07-16 22:12:07 +02:00
Stein Magnus Jodal
b5fd6a6e9f swmixer: Move attr init to init method 2014-07-16 22:11:17 +02:00
Stein Magnus Jodal
d1f2146b59 mpd: Raise FrontendError instead of sys.exit(1) 2014-07-16 10:36:46 +02:00
Stein Magnus Jodal
a1848aece5 docs: Add {Backend,Frontend,Mixer}Error guidelines to backend/frontend/mixer APIs
(cherry picked from commit 83f1d00944)

Conflicts:
	mopidy/mixer.py
2014-07-16 10:34:53 +02:00
Stein Magnus Jodal
dbecbbcea0 main: Log and exit if {Backend,Frontend,Mixer}Error is raised
(cherry picked from commit 95bddf666b)

Conflicts:
	mopidy/commands.py
2014-07-16 10:34:07 +02:00
Stein Magnus Jodal
44664f2796 exc: Add {Backend,Frontend,Mixer}Error exceptions
(cherry picked from commit bf8307f329)
2014-07-16 10:32:18 +02:00
Stein Magnus Jodal
c234281c7b mixer: Remove trigger_events_for_any_change() helper from API 2014-07-15 10:34:32 +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
dda06dd8de config: Add optional support to Boolean type 2014-07-15 00:33:30 +02:00
Thomas Adamcik
4c666e47ee core: Ignore buffering for now 2014-07-15 00:31:13 +02:00
Stein Magnus Jodal
a981be2292 doc: Fix typos 2014-07-14 23:47:15 +02:00
Stein Magnus Jodal
d1c0d48be6 docs: Fix typo 2014-07-14 23:18:55 +02:00
Thomas Adamcik
d8c41de2f7 audio: Add tests for state changes while buffering 2014-07-14 23:15:40 +02:00
Stein Magnus Jodal
8602ea24f1 docs: Volume use a linear scale 2014-07-14 23:09:57 +02:00
Stein Magnus Jodal
0e826d0086 mixer: Use mangled-private variables to avoid name collisions with subclasses 2014-07-14 22:56:00 +02:00
Stein Magnus Jodal
47b44791a6 log: Colorize logs, unless logging/color is false
Fixes #772
2014-07-14 01:40:48 +02:00
Stein Magnus Jodal
7a08cb69c1 log: Reorder module 2014-07-13 23:43:28 +02:00
Stein Magnus Jodal
d15d66f070 Use 'mute' instead of 'muted', to avoid changing old APIs 2014-07-12 03:14:19 +02:00
Stein Magnus Jodal
16f6527095 swmixer: Listen for volume/mute changes in GStreamer
E.g. when using pulsesink, external changes to the application-volume and
appliction-mute state will now immediately be reflected in the SoftwareMixer.
2014-07-12 02:50:40 +02:00
Stein Magnus Jodal
2c4ba8b6a1 mixer: Add trigger_events_for_any_changes()
Lifted from Mopidy-ALSAMixer, so SoftwareMixer can use it too.
2014-07-12 02:49:35 +02:00
Stein Magnus Jodal
5f091c10c2 mixer: Inject audio into software mixer
Instead of giving all mixers access to the audio actor.
2014-07-12 01:53:43 +02:00
Stein Magnus Jodal
6e226326fd http: Explicitly define template path for this router
Fixes #774
2014-07-12 00:05:55 +02:00
Stein Magnus Jodal
a3dc763b29 core: Forward {volume,mute}_changed events, don't trigger them ourselves 2014-07-10 01:15:44 +02:00
Stein Magnus Jodal
84ad6db546 swmixer: Trigger {volume,mute}_changed on set_{volume,mute}() 2014-07-10 01:00:35 +02:00
Stein Magnus Jodal
b8de7fa75c mixer: Add MixerListener 2014-07-10 01:00:35 +02:00
Stein Magnus Jodal
4d0fa17c85 docs: Describe backend/mixer __init__ args 2014-07-09 23:49:06 +02:00
Stein Magnus Jodal
83f1d00944 docs: Add {Backend,Frontend,Mixer}Error guidelines to backend/frontend/mixer APIs 2014-07-09 23:49:06 +02:00
Stein Magnus Jodal
95bddf666b main: Log and exit if {Backend,Frontend,Mixer}Error is raised 2014-07-09 23:49:06 +02:00
Stein Magnus Jodal
bb269688c6 mixer: Mark methods that may be implemented by subclasses 2014-07-09 22:19:34 +02:00
Stein Magnus Jodal
bf8307f329 exc: Add {Backend,Frontend,Mixer}Error exceptions 2014-07-09 22:17:46 +02:00
Stein Magnus Jodal
395019e857 swmixer: Remove unused attribute 2014-07-09 21:18:20 +02:00
Stein Magnus Jodal
64ecd7643a main: Stop only the mixer actor that we now is running 2014-07-09 21:16:09 +02:00
Stein Magnus Jodal
4807bd275a mixer: Remove 'should' from docstring 2014-07-09 21:09:04 +02:00
Stein Magnus Jodal
3daea856b1 config: Deprecate audio/mixer_track 2014-07-08 01:44:30 +02:00
Stein Magnus Jodal
810429a449 audio: Remove custom GStreamer mixers 2014-07-08 01:34:33 +02:00
Stein Magnus Jodal
9da716935c audio: Only expose GStreamer's software mixer 2014-07-08 01:34:33 +02:00
Stein Magnus Jodal
93ffde39c2 mixer: Use initial volume from audio/mixer_volume 2014-07-08 01:18:38 +02:00
Stein Magnus Jodal
6d6bc4b808 core: Use new mixer API 2014-07-08 01:11:25 +02:00
Stein Magnus Jodal
14d0433aae mixer: Add bundled Mopidy-SoftwareMixer extension 2014-07-08 01:11:25 +02:00
Stein Magnus Jodal
4f53521fea main: Start/stop the selected mixer 2014-07-07 21:03:57 +02:00
Stein Magnus Jodal
50d008ae6a mixer: Add name attr to mixer API 2014-07-07 20:46:56 +02:00
Stein Magnus Jodal
9ca4dae167 mixer: Add mixer API 2014-07-06 21:32:59 +02:00
Stein Magnus Jodal
069ef2ae7d core: Use a set to get unique dirs, and sorted to make the output stable 2014-07-01 23:31:12 +02:00
Stein Magnus Jodal
9ced0f740f Merge 'dz0ny/bug/fix-708-duplicate' into develop 2014-07-01 23:25:49 +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
Stein Magnus Jodal
cb6e19c039 Remove 'mad' from 'mopidy deps' listing
The 'lame' element does the same job, and is preferable since mad is GPL
licensed.
2014-06-30 13:01:29 +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
dz0ny
d871ca9128 Remove duplicates from library root.
Closes #708
2014-06-26 16:27:22 +02:00
Stein Magnus Jodal
420b530164 Merge pull request #762 from trygveaa/fix/mpd-browse-duplicate
mpd: Create unique names for all items in browse
2014-06-24 22:42:34 +02:00
Stein Magnus Jodal
dba6e9b817 http: Fix missing placeholder in log statement
Related to martijnboland/moped#5
2014-06-24 12:46:41 +02:00
Trygve Aaberge
c062dd21c4 mpd: Create unique names for all items in browse
Replace the playlist uri/name mapping with a mapping for all the items
in browse. Check the mapping when browsing a path.

This has the added benefit of serving as a cache for browse, so we don't
need to traverse the path parts and lookup each of them for each call to
browse.
2014-06-24 00:45:49 +02:00
Stein Magnus Jodal
24f9a2ac3b js: Release v0.4.0 2014-06-24 00:44:47 +02:00
Thomas Adamcik
e4d4652c68 Merge pull request #759 from jodal/feature/web-client-selector
Add web client selector
2014-06-23 22:47:14 +02:00
Stein Magnus Jodal
25f41664d7 Bump version number to 0.19 2014-06-23 22:32:43 +02:00
Stein Magnus Jodal
bce817184d audio: Fix pep8 warning 2014-06-23 21:22:00 +02:00
Stein Magnus Jodal
aed8670797 http: Fix flake8 warnings 2014-06-22 09:53:03 +02:00
Stein Magnus Jodal
9b9791ab5b Merge pull request #755 from trygveaa/feature/lsinfo-change-order
mpd: List browse results before playlists in lsinfo
2014-06-22 09:49:00 +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
5861071bb1 http: List installed web clients at /mopidy/ 2014-06-22 00:39:54 +02:00
Stein Magnus Jodal
3fb225233a http: Extract helper for setting common response headers 2014-06-22 00:29:01 +02:00
Stein Magnus Jodal
0e2b396be4 web: Strip down CSS 2014-06-21 23:34:45 +02:00
Stein Magnus Jodal
97efcdc019 web: Remove focus on 'HTTP frontend' 2014-06-21 23:30:13 +02:00
Stein Magnus Jodal
005cb028e7 web: Use font similar to mopidy.com 2014-06-21 23:30:00 +02:00
Stein Magnus Jodal
603da5673e web: Make pages fill mobile viewports 2014-06-21 23:27:42 +02:00
Stein Magnus Jodal
59760bb36c web: Remove WebSocket demo page 2014-06-21 23:27:35 +02:00
Trygve Aaberge
5393f31923 mpd: Ignore parts in query with only whitespace 2014-06-21 19:13:39 +02:00
Trygve Aaberge
acb0e47909 mpd: Ignore empty parts in query
This is to fix e.g. that an empty string can't be parsed as a date,
which may be attempted if the query contains 'Date ""'.
2014-06-21 17:28:54 +02:00
Thomas Adamcik
7975815cde audio: Expand audio state changed with target state 2014-06-21 17:28:25 +02:00
Stein Magnus Jodal
fbcc73004d http: Redirect from /app to /app/ 2014-06-21 16:36:16 +02:00
Thomas Adamcik
168aa432aa audio: Only trigger buffer pause once. 2014-06-21 16:30:12 +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
Thomas Adamcik
e0e6e390bd audio: Refactor message handling to delegate work more.
This should allow for easier testing since we can send the parsed result of the
messages for all message types.
2014-06-21 14:20:56 +02:00
Thomas Adamcik
58976ef52d config: Lists need to handle missing values 2014-06-21 14:11:24 +02:00
Thomas Adamcik
3c196ed645 stream: metadata_blacklist is optional 2014-06-21 14:11:09 +02:00
Trygve Aaberge
21cf0f0337 mpd: List browse results before playlists in lsinfo
This makes directories from extensions appear before playlists in the
result of the lsinfo command, which is desirable in clients that does
not sort the result.
2014-06-21 14:03:05 +02:00
Trygve Aaberge
5b8a9a3fb4 mpd: Support albums in browse
Albums are also containers of tracks, similar to directories and
playlists. Treat them equally when browsing.
2014-06-21 01:51:36 +02:00
Stein Magnus Jodal
715e3e24c2 Merge pull request #747 from jodal/feature/friendly-no-local-library-help
local: Add friendly help if no local library cache found
2014-06-20 23:32:11 +02:00
Thomas Adamcik
6b7665210c mpd: Remove old exception handling.
This is a leftover from the old dispatcher code that was missed in the
refactor. The call() will never raise a LookupError for missing commands.
2014-06-20 23:14:48 +02:00
Thomas Adamcik
69b4a8cad6 mpd: Fix typo in browse handling. 2014-06-20 23:08:03 +02:00
Stein Magnus Jodal
05b993c908 Merge pull request #752 from adamcik/fix/gh-660-stream-metadata-blacklisting
stream: Allow for blacklisting of metadata lookups against URI patterns.
2014-06-20 22:37:10 +02:00
Thomas Adamcik
50467fef78 stream: Allow for blacklisting of metadata lookups against URI patterns. 2014-06-20 22:10:22 +02:00
Thomas Adamcik
e7b39bd051 audio: Handle carriage return in playlist detection 2014-06-20 21:31:12 +02:00
Thomas Adamcik
c87684aa6b audio: Handle all caps ASX tags.
Also add support for simple asx format.
2014-06-20 21:31:03 +02:00
Thomas Adamcik
8f70899855 mpd: Minor code style tweak. 2014-06-20 21:10:34 +02:00
Trygve Aaberge
6c4ecae068 mpd: Support playlists in browse
Playlists are containers similar to directories. Treat them equally to
support playlists when browsing.
2014-06-20 20:31:09 +02:00
Stein Magnus Jodal
4919cae889 local: Add friendly help if no local library cache found
Fixes #711
2014-06-20 00:25:36 +02:00
Stein Magnus Jodal
d9d8d06ff4 js: Release Mopidy.js v0.3.0 2014-06-16 23:11:39 +02:00
Stein Magnus Jodal
05f6b424ef commands: Fix typo 2014-06-05 09:20:41 +02:00
Stein Magnus Jodal
720a403439 http: Remove unused Router class 2014-06-04 21:32:54 +02:00
Stein Magnus Jodal
33228f2528 http: Simplify app registration 2014-06-04 21:32:19 +02:00
Stein Magnus Jodal
d13194dfa4 http: Remove static file serving from the Router 2014-06-04 20:55:28 +02:00
Stein Magnus Jodal
eea6138b3d http: Simplify static files serving 2014-06-04 20:47:49 +02:00
Stein Magnus Jodal
8e4fa48768 http: Fix reference to old config name 2014-06-03 00:42:35 +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
345bf5b418 http: Fix docs links 2014-05-21 00:43:56 +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
b1d9e112fe http: Change registry key to match docs 2014-05-20 23:09:59 +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
a318fd8698 http: Improve router attribute docstrings 2014-05-20 22:28:18 +02:00
Stein Magnus Jodal
1838f10dcf http: Rename 'setup_routes()' to 'get_request_handlers()' 2014-05-20 22:28:18 +02:00
Stein Magnus Jodal
e8291d471e http: Rename 'linkify()' to 'get_root_url()' 2014-05-20 22:16:01 +02:00
Stein Magnus Jodal
c84a3fc349 http: Include registry name in docs 2014-05-20 22:13:14 +02:00
Stein Magnus Jodal
cad0207ef8 http: Rename 'path' to 'static_file_path' 2014-05-20 22:12:06 +02:00
Stein Magnus Jodal
db0d726f3f config: Fix decoding of exception message depending on locale 2014-05-20 20:15:44 +02:00
Stein Magnus Jodal
dcba410d91 audio, local: Fix decoding of exception messages depending on locale 2014-05-20 19:55:12 +02:00
Stein Magnus Jodal
fabb357dc8 http: Formatting 2014-05-14 23:59:20 +02:00
Stein Magnus Jodal
a4a417eb37 http: Fix bad merge that reverted PR#725 2014-05-14 23:53:09 +02:00
Stein Magnus Jodal
83bb891de4 http: Improve Router docstrings, include in API docs 2014-05-14 23:42:55 +02:00
Stein Magnus Jodal
05f23e1108 http: Import modules, not variables 2014-05-14 23:32:06 +02:00
Stein Magnus Jodal
931d487649 http: Use single quotes 2014-05-14 23:31:55 +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