Thomas Adamcik
03c301705d
commands: Move mopidy.utils.command to mopidy.commands
...
- Also adds documenation to Command class.
- Moves scan command to commands to match naming.
2013-11-16 03:02:45 +01:00
Thomas Adamcik
2f6ecd9171
commands: Move to using a help attribute instead of __doc__
2013-11-16 02:26:47 +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
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
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
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
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
924553b62e
http: Fix tests
2013-11-11 22:40:45 +01:00
Lasse Bigum
2bd1f043ce
Updated code with new multiple artist handling and added tests
2013-11-09 03:01:53 +01:00
Lasse Bigum
8b7621c3e3
Merge branch 'develop' of https://github.com/mopidy/mopidy into feature/extra_tags
2013-11-09 02:37:44 +01:00
Lasse Bigum
c776565f65
Another round of review comments
2013-11-09 01:22:27 +01:00
Lasse Bigum
093c0400a9
Fix review comments
2013-11-08 21:43:31 +01:00
Lasse Bigum
03750a8bf2
Fix scan with multiple track artists and add tests
2013-11-08 21:25:21 +01:00
Thomas Adamcik
9539c2ac35
main: Switch to subcommands
...
- show-deps replaced with 'mopidy deps'
- show-config replaced with 'mopidy config'
- Just running mopidy now displays help, run 'mopidy run' to start server.
2013-11-08 19:53:00 +01:00
Javier Domingo Cansino
6721a59b26
tests: Fixing self confusion mistake
...
docs: Documenting tracklist's new filter() feature
2013-11-07 09:46:34 +01:00
Javier Domingo Cansino
8b5f30e5ff
Adding test case
2013-11-07 09:34:40 +01:00
Thomas Adamcik
469f414c4c
audio: Don't do duration conversion to ms in scanner
2013-11-06 19:10:49 +01:00
Thomas Adamcik
20b0602842
audio/scanner: Move translator into audio.
...
Tries to move more of the gst bits and pieces we are leaking into audio.
2013-11-06 19:10:49 +01:00
Thomas Adamcik
0a2d74eff1
scanner: Update to use new mopidy.audio.scan
...
Also adds the check less than 100ms check back to the scanner.
2013-11-06 19:10:49 +01:00
Lasse Bigum
af6225538d
Add more tests
2013-11-05 23:17:15 +01:00
Lasse Bigum
9d7db4cf4f
Add frontend MPD tests for 'search comment "foo"'
2013-11-03 01:52:34 +01:00
Lasse Bigum
a516d2051d
Added a ton of extra tests and expanded a few to include new tags
2013-11-03 01:01:42 +01:00
Lasse Bigum
f90f5f608e
Fix testcases after merging mopidy/develop
2013-11-02 23:44:33 +01:00
Lasse Bigum
e12a75c880
Merge branch 'develop' of https://github.com/mopidy/mopidy into feature/extra_tags
2013-11-02 23:39:19 +01:00
Lasse Bigum
9593da08b6
Rename track in MPD to track_name to avoid confusion
2013-11-02 22:34:26 +01:00
Stein Magnus Jodal
838f584e2b
local: Formatting
2013-11-02 22:18:37 +01:00
Stein Magnus Jodal
b0d43444c2
local: Remove debug logging in tests
2013-11-02 22:18:26 +01:00
Lasse Bigum
f295cbd3cb
Fix flake8 issues
2013-11-02 22:14:25 +01:00
Lasse Bigum
24944bd8e3
Split artist and albumartist dependency, update tests based on this
2013-11-02 22:13:54 +01:00
Lasse Bigum
86f18935fe
Fix flake8 errors and add a few more tests
2013-11-02 21:57:53 +01:00
Lasse Bigum
fd213f2d78
Add tests for albumartist
2013-11-02 21:57:53 +01:00
Lasse Bigum
e7746dac1b
Remove debug, make track_no more robust
2013-11-02 21:54:46 +01:00
Lasse Bigum
efc9fc75b5
Fix track_no
2013-11-02 21:49:44 +01:00
Stein Magnus Jodal
04d9fa667b
deps: Don't strip last dir from dependency path
2013-11-02 19:25:06 +01:00
Lasse Bigum
2bbd9003a2
Date is not mandatory AFAICT
2013-11-02 03:07:13 +01:00
Lasse Bigum
df1820f0a7
Add genre, composer, and performer tags and use them
2013-11-02 02:29:37 +01:00