Thomas Adamcik
ce13e7ae9e
doc: Update with command changes
2013-11-14 23:39:09 +01:00
Thomas Adamcik
37ba3ca01d
Merge branch 'develop' into feature/commands-helper-tmp
...
Conflicts:
mopidy/utils/log.py
2013-11-14 23:36:27 +01:00
Thomas Adamcik
5f5c6a841c
ext/backend: Use utils.command directly.
...
Commands don't "belong" to backends or frontends so just leave it at an ext
level and start using mopidy.utils.command directly.
2013-11-14 23:34:06 +01:00
Thomas Adamcik
63899059be
main: Convert main program flow to command helpers
...
- Moves all startup code from start() into mopidy.commands
- Moves deps and config to mopidy.commands
- Plugs in use of commands parsing provided by new helpers
- Allows commands to override base verbosity level
- Removes defunct bootstrap logging helper.
2013-11-14 23:33:29 +01:00
Thomas Adamcik
a6c3b78a6f
local: Convert local scanning to new commands.
...
Also moves mopidy.backends.local.scan to .command
2013-11-14 23:32:55 +01:00
Thomas Adamcik
da4cfebe05
ext: Add get_command and mopidy.backends.base.Command
2013-11-14 23:31:20 +01:00
Thomas Adamcik
c0f1a1352b
commands: Replace set_defaults with set method
...
For our use case we only need to be able to override a value, not set defaults
so this simplifies everything.
2013-11-14 23:31:20 +01:00
Thomas Adamcik
39f7fd5955
commands: Extend use of exit helper to parser errors
...
This moves all the bad arugment handling into our class and makes sure to mark
all the helpers as internal.
2013-11-14 23:31:20 +01:00
Thomas Adamcik
d82f48a42f
commands: Internalise handling of help action
...
This means help will always be handled by the root command. Additionally this
adds an exit helper.
2013-11-14 23:31:20 +01:00
Thomas Adamcik
0b1b249ae8
commands: Remove trailing newline for command errors
2013-11-14 23:31:20 +01:00
Thomas Adamcik
1394f3929b
commands: Add run method to Commands
2013-11-14 23:31:20 +01:00
Thomas Adamcik
f5a5f9e9b1
commands: Add str method CommandError
2013-11-14 23:31:20 +01:00
Thomas Adamcik
b5360a1360
commands: Add usage to CommandError
2013-11-14 23:31:20 +01:00
Thomas Adamcik
001c8e0bdc
commands: Add set_defaults() to the parser
...
- Removes mock based test that checks delegation, just check commands result
- Allow setting of defaults that propegate down the chain
- Move internal parser args to a _parse helper.
2013-11-14 23:31:20 +01:00
Thomas Adamcik
6bddcb7875
commands: Add help_formatter() with tests.
2013-11-14 23:31:20 +01:00
Thomas Adamcik
88bc046605
commands: Make sure parser errors get translated to correct error type.
2013-11-14 23:31:20 +01:00
Thomas Adamcik
fa7eee3bdf
commands: Add basic format usage helper
2013-11-14 23:31:20 +01:00
Thomas Adamcik
754865d8b6
commands: Set child names upon adding them
2013-11-14 23:31:20 +01:00
Thomas Adamcik
7c82485a07
commands: Start adding commands util helper.
...
This class is intended to be used to contruct a tree of sub-commands. In this
intial version it mainly focuses on exposing `add_argument` to allow for nested
parsers. Next step is to start adding better `--help` that shows the entire tree
and hooking it up to select what code path to really run.
2013-11-14 23:31:20 +01:00
Stein Magnus Jodal
d529202b88
docs: Update changelog
2013-11-14 21:28:27 +01:00
Lasse Bigum
f5e94d8f7c
Address review comments
2013-11-13 00:40:47 +01:00
Lasse Bigum
9ba5f6862f
Merge branch 'develop' of https://github.com/mopidy/mopidy into feature/extra_tags
2013-11-13 00:23:44 +01:00
Thomas Adamcik
c1f182c154
Merge pull request #574 from jodal/feature/filter_improvement
...
tracklist.{filter,remove} with multiple criteria values
2013-11-11 15:11:05 -08:00
Stein Magnus Jodal
04788abaac
core: Change tracklist.{filter,remove} usage
...
The criterias are now a mapping between field names and one or more values.
This aligns tracklist.{filter,remove} with the API of
library.{find_exact,search}, and allows for e.g. batch removals.
An exception is raised immediately if the API is used in the old way to ease
migration and debugging.
2013-11-12 00:00:22 +01:00
Stein Magnus Jodal
4e7c2bab4d
Merge branch 'develop' into feature/filter_improvement
2013-11-11 23:18:23 +01:00
Stein Magnus Jodal
50be4a5316
docs: Update changelog
2013-11-11 23:13:25 +01:00
Stein Magnus Jodal
a289d831d0
Merge pull request #569 from ZenithDK/scan_multiple_artist
...
Fix scan with multiple track artists and add tests
2013-11-11 14:07:36 -08:00
Stein Magnus Jodal
aa7b360d0d
docs: Fix typos
2013-11-11 22:59:45 +01:00
Stein Magnus Jodal
d2280d9a86
docs: Add {mpd,http}/zeroconf descriptions
2013-11-11 22:52:36 +01:00
Stein Magnus Jodal
f7c3272045
docs: Update authors
2013-11-11 22:46:32 +01:00
Stein Magnus Jodal
df4f99cf7b
docs: Update changelog
2013-11-11 22:46:21 +01:00
Stein Magnus Jodal
924553b62e
http: Fix tests
2013-11-11 22:40:45 +01:00
Stein Magnus Jodal
d723db8f41
Merge pull request #573 from adamcik/feature/avahi
...
Cleaned up version of #558 - Add avahi publishing of MPD and HTTP server endpoints.
2013-11-11 13:35:43 -08:00
Thomas Adamcik
660a1b7382
avahi: Remove use of config_section
2013-11-11 22:32:46 +01:00
Thomas Adamcik
f03c049485
avahi: More review comments and some other fixes.
...
- Switched to newstyle class
- Switched to safe values in kwargs
2013-11-11 22:04:13 +01:00
Thomas Adamcik
c964d15ac4
avahi: Simplify config to single value
2013-11-11 21:42:23 +01:00
Thomas Adamcik
e9c2816354
avahi: Add hostname and port template values to names
2013-11-11 21:39:14 +01:00
Thomas Adamcik
fb31193ed0
avahi: Fixes from review comments
2013-11-11 21:26:11 +01:00
Thomas Adamcik
6c6932c374
avahi: Only convert single string at a time in helper
2013-11-11 21:16:05 +01:00
Thomas Adamcik
bcce865ce7
avahi: Convert MPD and HTTP to use cleaned up versions
...
- Move imports to top as they should be.
- Report state based on publish return value.
- Remove overly broad except clauses.
- Unpublish before stopping servers.
2013-11-11 21:15:56 +01:00
Thomas Adamcik
50cfe42ce0
avahi: Improve error handling for dbus errors.
...
- Handle dbus not being installed.
- Handle not finding the system bus.
- Handle not finding the avahi service.
- Return if publish succeeded.
2013-11-11 21:15:47 +01:00
Thomas Adamcik
cf5589b4eb
avahi: Style and code cleanups in zeroconf module.
...
- Prepare for handling missing dbus directly in module.
- Constants should always be all caps.
- Extracted helpers from class to convey intent via their naming.
- Moved imports out of class, imports should always be on the top.
- Made sure calling publish mutiple times does not re-convert text.
- Made sure calling unpublish without publish does not break.
2013-11-11 21:15:35 +01:00
Stein Magnus Jodal
484efab28e
utils: Remove Python 2.6 workaround
2013-11-10 21:37:53 +01:00
Thomas Adamcik
851cf65328
docs: More review fixes
2013-11-10 13:11:01 +01:00
Thomas Adamcik
d839a0d1ba
local: Fix flake mistakes in scan sub-command.
2013-11-10 13:03:53 +01:00
Thomas Adamcik
4e6ebbe955
local/docs: Update based on review comments
...
- Bunch of typos and wording improvements from review.
- Fixed mopidy.backends.local.scan botched merge.
- Document and enforce that sub-command name needs to be bytes.
2013-11-09 18:20:22 +01:00
Thomas Adamcik
df953ea1e6
Merge branch 'develop' into feature/subcommands
...
Conflicts:
mopidy/scanner.py
2013-11-09 13:40:47 +01:00
Thomas Adamcik
5cd0938e0d
docs: Update changelog with sub-commands work
2013-11-09 13:38:09 +01:00
Thomas Adamcik
3945e437de
docs: Fix minor doc issues found during review
...
- Adds autodoc for mopidy.audio.scan
- Updates ``file://`` to ``local:``
- Minor language fix.
2013-11-09 13:30:27 +01:00
Thomas Adamcik
67c028c31e
docs: Update docs with respect to sub-commands
2013-11-09 13:23:52 +01:00