Thomas Scholtes
a11bae9386
Implement ImageListField for FLAC
2014-03-09 00:11:46 +01:00
Thomas Scholtes
4e6643a41b
Remove picture from full flac fixture
2014-03-09 00:08:30 +01:00
Thomas Scholtes
ae18ea52cf
Add flac fixture with images
2014-03-09 00:07:29 +01:00
Thomas Scholtes
c5c87ac46c
Implement extended image lists for mediafiles.
...
Makes the test of 80eded77b1 work.
2014-03-08 17:27:01 +01:00
Thomas Scholtes
a9257ae57b
Add image mediafile fixture
2014-03-08 17:03:43 +01:00
Thomas Scholtes
c9fc36b02e
Fix mediafile image tests
2014-03-08 17:03:16 +01:00
Thomas Scholtes
80eded77b1
Add API tests for images in tags
2014-03-08 16:12:24 +01:00
Adrian Sampson
fc8325753c
skip completion test if script not found
2014-03-07 14:46:09 -08:00
Thomas Scholtes
0832b9b346
Move mediafile cast logic to storage style
...
StorageStyle.get should return a python builtin type.
This amends 5716cd1024
2014-03-07 16:32:21 +01:00
geigerzaehler
c654df9422
Merge pull request #564 from geigerzaehler/mediafile-date
...
Remove date packing and invert date dependency
2014-03-07 12:11:21 +01:00
geigerzaehler
69cb44003e
Merge pull request #579 from johtso/fix-safe-case-asfunicodeattribute
...
Fix _safe_cast of ASFUnicodeAttribute
2014-03-06 11:20:16 +01:00
Thomas Scholtes
a47f3f0a2e
Add suite function to config command test module
...
This makes `python setup.py test` work again and fixes #576
2014-03-06 11:13:24 +01:00
Johannes
5716cd1024
Fix _safe_cast of ASFUnicodeAttribute
...
Fixes #578
2014-03-06 00:21:33 +00:00
Thomas Scholtes
165c28e967
Raise configuration error if BEETSDIR is file
2014-03-04 17:29:14 +01:00
Thomas Scholtes
e916609eee
Save import history only when path associated
...
Fixes #570
2014-03-04 17:12:42 +01:00
Thomas Scholtes
f33c0bceff
Remove date packing and invert date dependency
...
Before, each year, month, and day field used packing to store its values in the
same tag but at different positions. We then instantiated a
`CompositeDateField` to combine the different values. This lead to code
duplication in the storage styles for these fields. It also inverted the data
dependency. It's more natural to think of year, month, and day as part of a
date then as of a date as composed of these.
Now, only `DateField` class stores data in the files tag. This makes sense: One
tag, one field that accesses it. To obtain access to the year, month, and day
parts, the DateField is equipped with factories that create `DateItemField`
instances associated to a `DateField`. These descriptor allow us to get and set
parts of a date field.
2014-03-03 00:02:42 +01:00
Thomas Scholtes
8a5a2fcebf
Merge branch 'completion'
...
Conflicts:
beets/ui/commands.py
docs/reference/cli.rst
2014-03-02 23:06:05 +01:00
Thomas Scholtes
44c843793b
Add completion of plugin commands
2014-03-02 16:18:16 +01:00
Thomas Scholtes
c345df9155
Merge branch 'config_command'
...
Conflicts:
beets/ui/commands.py
docs/reference/config.rst
test/_common.py
2014-02-28 16:50:06 +01:00
Thomas Scholtes
4ca3c8764e
Test mediafile with unicode strings
2014-02-28 14:04:41 +01:00
Adrian Sampson
5ccd9674a6
Merge branch 'mediafile_multiple_values' of https://github.com/geigerzaehler/beets into geigerzaehler-mediafile_multiple_values
...
Conflicts:
beets/mediafile.py
2014-02-27 19:12:53 -08:00
Thomas Scholtes
2b0929b71b
Complete queries
2014-02-27 22:13:09 +01:00
Thomas Scholtes
8450d51bab
bash-completion package can be set by environment
2014-02-27 17:57:02 +01:00
Thomas Scholtes
996a1d6c90
Use bash-completion package
2014-02-27 17:52:23 +01:00
Thomas Scholtes
211d3ac1cb
Do not evaluate in subshell
2014-02-27 15:28:16 +01:00
Thomas Scholtes
81a28198aa
Test completion with clean bash instance
2014-02-27 15:09:02 +01:00
Thomas Scholtes
c73ada92c8
Ensure we go back to default path implementation
...
If an error is raised within the mock path context and catched upstream the
rest of the tests will run with the mocked path and fail horribly.
2014-02-23 16:38:41 +01:00
Adrian Sampson
1253cb695d
move show_model_changes to ui package
...
This makes it more naturally reusable for plugins.
2014-02-22 15:06:16 -08:00
Adrian Sampson
b383ce3450
comment out some skipped tests
...
The *only reason* I'm doing this is so that the unittest output looks
prettier. I am pretty sure I have actual OCD. 😳
2014-02-22 14:59:22 -08:00
Adrian Sampson
645279e022
remove old _showdiff
...
Totally replaced now, including tests! Woohoo.
2014-02-22 14:52:33 -08:00
Thomas Scholtes
e8e0682aae
Add completion support for bash 3.2
...
Bash 3.2 does not have associative arrays, so we hack around that by using
generic varibale names like `opts__$cmd`. We also don't support the "?" alias
anymore.
2014-02-22 17:59:23 +01:00
Adrian Sampson
0ead6ee8cc
don't relativize command-line paths ( #513 )
...
Paths given on the command line (e.g., with the --library option) need to be
relative to the working directory, not the config file.
2014-02-21 21:04:03 -05:00
Adrian Sampson
129575178c
docstring/style fixups for #513
2014-02-21 20:52:21 -05:00
Thomas Scholtes
14ece207c9
Add completion command
...
The command prints a shell script that provides completion for the `beet`
command. To test it run `eval "$(beet completion)"` in your shell.
I also included some crude testing for this. The `test/test_completion.sh`
script runs tests in a shell and exit with a non-zero status code if the tests
fail. It assumes that the completion script is already loaded in the executing
shell.
As of now the completion only works for bash 4.1 and newer.
2014-02-20 01:15:03 +01:00
Thomas Scholtes
c8e32f6bef
Add config command
2014-02-18 20:56:08 +01:00
Thomas Scholtes
f1f6adcb0d
Implement new configuration behaviour
2014-02-18 16:48:35 +01:00
Thomas Scholtes
d900b594be
Specify configuration behaviour with tests
...
Beets stores all its data in the `BEETSDIR` directory. The default is
determined by the system:
* `%APPDATA%\beets` on Windows. If the `APPDATA` environment variable is
not set it falls back to `~\AppData\Roaming\beets`.
* `$XDG_CONFIG_DIR/beets` on UNIX. If the `XDG_CONFIG_DIR` environment
variable is not set it falls back to `~/.config/beets`
* `~/Library/Application Support/beets` on OSX
The default can be overwritten using the `BEETSDIR` environment variable.
The user configuration is read from `$BEETSDIR/config.yaml`. Additional
configuration files that overwrite options from the user configuration may
be specified using the `--config` command line options.
All relative paths in any configuration are resolved relative to `BEETSDIR`.
2014-02-18 16:48:35 +01:00
Adrian Sampson
c196f20dfc
fix numeric queries over empty string ( fix #547 )
2014-02-17 22:51:53 -05:00
Adrian Sampson
a8ee13f16e
add some failing tests for date queries
2014-02-14 23:02:51 -08:00
Adrian Sampson
be31ac683a
Model._parse() class method
2014-02-13 21:29:17 -08:00
Adrian Sampson
4bb2622b9b
fix testability of main entry point
2014-02-13 13:56:26 -08:00
Adrian Sampson
23fb5da1dc
Revert "Replace path separators from config"
...
This reverts commit c82b31e750 .
Conflicts:
docs/changelog.rst
2014-02-13 13:22:45 -08:00
Thomas Scholtes
a825f8465f
Remove feature for separate review
2014-02-13 15:31:08 +01:00
Thomas Scholtes
9f59592a88
Basic test cases should come first
2014-02-13 14:24:49 +01:00
Thomas Scholtes
45921cac9e
StorageStyle specifies which format it can handle
2014-02-13 14:15:36 +01:00
Thomas Scholtes
1f01997141
Only write mediafiles when tags have changed
2014-02-11 15:20:44 +01:00
Thomas Scholtes
52c0e93f07
JPG image data returns correctly
2014-02-11 14:54:33 +01:00
Thomas Scholtes
49bce6276e
Fix test run with setuptools
2014-02-11 13:24:47 +01:00
Thomas Scholtes
dcbf7ecc36
Fix album retrieval
2014-02-10 17:26:26 +01:00
Thomas Scholtes
a363d9672f
Load plugins from cli config
2014-02-10 17:26:26 +01:00
Thomas Scholtes
5f79c54cb3
Rewrite config test to be more transparent
2014-02-10 17:26:26 +01:00
Thomas Scholtes
a43af01b6b
Add storage style for MP4 images
2014-02-10 16:28:48 +01:00
Thomas Scholtes
3f988d4699
Add StorageStyle for mp3 images
2014-02-10 16:10:40 +01:00
Thomas Scholtes
581241006d
Add mediafile art test
2014-02-10 15:24:57 +01:00
Thomas Scholtes
5e61db4b88
Genre list tests for more formats
2014-02-10 15:07:10 +01:00
Thomas Scholtes
1f8710f993
Genre lists for MP4 files
2014-02-10 14:34:29 +01:00
Adrian Sampson
8556de8d3a
dbcore: flexattr deletion ( fix #530 )
2014-02-08 12:31:50 -08:00
Adrian Sampson
e609319b3d
fix ihate tests
2014-02-08 12:20:25 -08:00
Adrian Sampson
fe5c175cc3
style fixes for ihate ( #486 )
2014-02-08 12:00:23 -08:00
BrainDamage
6836e9c725
updated iHate plugin to replace hardcoded regex system in favour of more flexible queries
...
changed config layout of iHate plugin to a simpler system
updated unit test for ihate plugin accordingly
updated docs for ihate plugin accordingly
2014-02-07 21:37:33 +01:00
Thomas Scholtes
c82b31e750
Replace path separators from config
2014-02-06 14:22:40 +01:00
Stig Inge Lea Bjørnsen
58924375d3
Merge pull request #521 from silb/datequery_plugin
...
Add a plugin for querying date fields against date intervals or instants...
2014-02-04 13:03:39 -08:00
Thomas Scholtes
6901cc96db
Fix white space
2014-02-04 20:10:55 +01:00
Thomas Scholtes
b490ed7d4b
Remove superfluous code
2014-02-04 20:10:55 +01:00
Thomas Scholtes
813510a50d
Implement Genre list
2014-02-04 20:10:55 +01:00
Thomas Scholtes
fcf438c759
Remove duplicate tests
2014-02-04 20:10:55 +01:00
Thomas Scholtes
0411f818af
Fix packaging
2014-02-04 20:10:54 +01:00
Thomas Scholtes
8e1c5e88da
Include key in error message when tags do not match
2014-02-04 20:10:54 +01:00
Thomas Scholtes
9055754476
Refactor MP3TextStorageStyle
2014-02-04 20:10:54 +01:00
Thomas Scholtes
052f38e891
Use tempdir for mediafile tests
2014-02-04 20:10:54 +01:00
Thomas Scholtes
3beac05e53
Test empty mediafiles
2014-02-04 20:10:54 +01:00
Thomas Scholtes
131da9eae3
Add UFID storage style
2014-02-04 20:10:53 +01:00
Thomas Scholtes
0dd8d81e4d
Tests include all file formats
2014-02-04 20:10:53 +01:00
Thomas Scholtes
f52085e994
Refactor StorageStyle packing
2014-02-04 20:10:53 +01:00
Thomas Scholtes
65e4a0f505
Add unpack method for storage style
2014-02-04 20:10:53 +01:00
Thomas Scholtes
508be8e2c6
Add MP3 StorageStyle class
2014-02-04 20:10:53 +01:00
Thomas Scholtes
da13cb1825
Refactor get/set into StorageStyle
2014-02-04 20:10:53 +01:00
Thomas Scholtes
a9ccf84b72
Extract assertTags method
2014-02-04 20:10:53 +01:00
Thomas Scholtes
484616482d
Rewrite mediafile tests
2014-02-04 20:10:53 +01:00
Thomas Scholtes
2c8b435cd0
Add empty test audio files
2014-02-04 20:10:53 +01:00
Stig Inge Lea Bjørnsen
a27d83a4bf
Refactor the date query from being a plugin to being part of Beets core.
...
Fields of the type DateType will now automatically be queried by DateQuery.
2014-02-03 18:21:23 +01:00
Thomas Scholtes
c133302e20
Fix configuration priorities (see #513 )
2014-02-03 01:16:35 +01:00
Thomas Scholtes
75c3b82d88
Test and fix web /item/query/<query>
2014-02-02 19:12:10 +01:00
Thomas Scholtes
f706e58409
Web API handles multiple ids
2014-02-02 19:04:04 +01:00
Stig Inge Lea Bjørnsen
be3bcbafe6
Add a plugin for querying date fields against date intervals or instants.
...
The interval syntax is similar to that of NumericQuery.
Example: beet ls 'added:T2008..2010'
2014-02-02 17:17:11 +01:00
Thomas Scholtes
3361d32a76
Add AutotagStub
2014-02-01 22:55:35 +01:00
Thomas Scholtes
50e384d48a
Test choosing candidates during import
2014-02-01 22:55:35 +01:00
Thomas Scholtes
ba49675252
More tests and test documentation for Importer
2014-02-01 20:05:36 +01:00
Thomas Scholtes
9e105bd09b
Add tests for TerminalImportSession
2014-02-01 19:19:48 +01:00
Thomas Scholtes
fb46571bf7
Set importer choices with add_choice
...
We can hook into this method in the next commit
2014-02-01 19:04:24 +01:00
Thomas Scholtes
24ffd0982e
Add group albums stage and configuration
2014-02-01 15:02:00 +01:00
Thomas Scholtes
565a284c03
Add pull() generator to Pipeline
2014-02-01 13:43:05 +01:00
Thomas Scholtes
a3c1b15198
Fix #514 : add distance between string and None
2014-01-30 15:23:58 +01:00
Thomas Scholtes
d75f6667e1
Add --config cli option
2014-01-29 23:38:05 +01:00
Thomas Scholtes
d12a4b20da
Import multiple albums from single directory
...
If a directory contains multiple albums we can select the ALBUMS action to group
the tracks by album artist and album name and import those seperately.
2014-01-28 23:22:00 +01:00
Thomas Scholtes
432d6f4437
Removed akward tests
2014-01-28 20:51:00 +01:00
Thomas Scholtes
81b8d44814
Migrate outside file tests
2014-01-28 20:49:02 +01:00
Thomas Scholtes
9a3963b58e
Remove duplicate test
...
This is already tested by `ImportExistingTest.test_asis_updated_moves_file`
2014-01-28 20:28:38 +01:00
Thomas Scholtes
ae208f5f53
Use ImportSession sublass for tests
2014-01-28 20:13:02 +01:00
Thomas Scholtes
bb6adbfa11
add compilation tests
2014-01-28 20:08:42 +01:00
Thomas Scholtes
f8b899091b
Migrate ApplyExistingItemsTest
2014-01-28 20:08:42 +01:00
Thomas Scholtes
aaefd023eb
Extract choose tracks function
2014-01-28 20:08:42 +01:00
Thomas Scholtes
96e2d128c0
Revert old test cases
2014-01-28 20:08:42 +01:00
Thomas Scholtes
2a4c6d5bca
Fixed typo makes tests pass
2014-01-28 20:08:42 +01:00
Thomas Scholtes
69a40593a0
Remove duplicate tests
2014-01-28 20:08:42 +01:00
Thomas Scholtes
910dc6a647
Add ImportCompliationTest
2014-01-28 20:08:42 +01:00
Thomas Scholtes
39f1b8c3d8
Refactor MusicBrainz stubs into helper class
2014-01-28 20:08:42 +01:00
Thomas Scholtes
9f4e227f96
More ImportTest refactoring
2014-01-28 20:08:41 +01:00
Thomas Scholtes
5535eddfaa
Refactor Import Test
2014-01-28 20:08:41 +01:00
Thomas Scholtes
9b12d488e2
New Import test case
2014-01-28 20:07:20 +01:00
Thomas Scholtes
d302081cca
...and some refactoring again
2014-01-28 20:07:20 +01:00
Thomas Scholtes
bfaa56e5bd
Stupid typo
2014-01-28 20:07:20 +01:00
Thomas Scholtes
42f54e36bd
These tests are already in ImportNonAutotaggedTest
2014-01-28 20:07:20 +01:00
Thomas Scholtes
0cdb896003
Move prune and file tasks
2014-01-28 20:07:20 +01:00
Thomas Scholtes
33edb9a878
So this is how python works! ;)
2014-01-28 20:07:20 +01:00
Thomas Scholtes
c6654c5acf
Make test strings more verbose
2014-01-28 20:07:19 +01:00
Thomas Scholtes
03f1879980
Extract library file assertions
2014-01-28 20:07:19 +01:00
Thomas Scholtes
49693f715c
Use _setup_library() helper
2014-01-28 20:07:19 +01:00
Thomas Scholtes
e63ac27d1c
Extract _run_import and expose config in tests
2014-01-28 20:07:19 +01:00
Thomas Scholtes
d65595c70b
Extract ImportHelper for tests
2014-01-28 20:07:19 +01:00
Thomas Scholtes
f900f1e0c8
Refactor import test
2014-01-28 20:07:19 +01:00
Thomas Scholtes
117a331091
Should infer *album artist* for albums from tag
2014-01-28 15:42:50 +01:00
Adrian Sampson
f29fbe47da
DBCore types: no functional-style Type constructor
...
This was getting more and more awkward. Also added a `parse` method (in
progress).
2014-01-26 21:12:48 -08:00
Adrian Sampson
83f981762c
fix #508 : crash when parsing empty query part
...
This is a regression created by my endeavor to have parse_query_part never
return None. Now the regular expression should really always match.
2014-01-26 10:51:58 -08:00
Adrian Sampson
f1a4ba815d
fix #503 : format untyped fields with bytes values
2014-01-23 15:06:24 -08:00
Thomas Scholtes
00e0664a94
Merge branch 'embedded_items_generators'
2014-01-22 12:04:41 +01:00
Adrian Sampson
7361e6b114
adjust tests to type-based formatting
2014-01-21 21:16:32 -08:00
Adrian Sampson
7aa4d1e5ba
begin type-based formatting
2014-01-21 21:02:40 -08:00
Adrian Sampson
342d5e1f8b
whitespace cleanup
2014-01-21 20:14:36 -08:00
Adrian Sampson
7d0dbf705a
fix tests for dbcore module reorg
2014-01-21 20:04:29 -08:00
Adrian Sampson
56bb642fe8
undo dumb file renaming mistake
2014-01-21 19:40:00 -08:00
Adrian Sampson
74d0dc8352
further paramaterize parse_query_part
2014-01-21 19:09:34 -08:00
Thomas Scholtes
aa07eb9551
Load development beetsplug in tests
...
See also a4b6976755
2014-01-21 22:45:51 +01:00
Thomas Scholtes
83e86241b8
Add JSON-API tests
2014-01-21 22:39:48 +01:00
Adrian Sampson
28d4b9320c
Merge pull request #499 from geigerzaehler/master
...
Make pluginpath configuration useable
2014-01-20 18:55:20 -08:00
Adrian Sampson
1cdb30fd56
remove superfluous py_type field from Type
2014-01-20 18:06:42 -08:00
Adrian Sampson
00829c1a6c
use PathQueries declaratively
...
Now PathQuery is just another type-based query, just like NumericQuery.
2014-01-20 18:01:29 -08:00
Adrian Sampson
4026c4b707
add query field to types
...
This is starting to get at the heart of the matter: now each type gets to
declare which Query subclass it wants to use, starting with NumericQuery.
2014-01-20 17:47:02 -08:00
Adrian Sampson
9ee4adc5e1
move remaining generic Query types to dbcore.query
...
NumericQuery is still broken. This, of course, is the whole reason for the
change.
2014-01-20 16:40:50 -08:00
Adrian Sampson
61b6f04036
tests: silence logging output
2014-01-20 15:58:33 -08:00
Thomas Scholtes
a4b6976755
Make plugin path configuration useable
2014-01-20 17:39:46 +01:00
Thomas Scholtes
3b39e0f193
Test plugin commands from plugin paths
2014-01-20 17:39:46 +01:00
Thomas Scholtes
34f113bbcf
Running ./setup.py test works again
2014-01-20 14:33:40 +01:00
Adrian Sampson
a0ffde7114
a bit more dbcore testing
2014-01-18 16:49:22 -08:00
Adrian Sampson
dcee7b6219
dbcore: terminology
...
Replace "library" and "lib" references in dbcore with "database" and "db" for
short.
2014-01-18 16:36:04 -08:00
Adrian Sampson
236de2be86
give test_db a better name: test_library
2014-01-18 16:28:17 -08:00
Adrian Sampson
72a1b9bafb
add tests for dbcore
...
Based on the old migration tests for Library.
2014-01-18 16:27:43 -08:00
Adrian Sampson
faa66dba0d
dbcore: subsume schema setup, add Type class
...
Type will also include fields for parsing, emitting, and querying a given
type.
2014-01-13 17:11:50 -08:00
Adrian Sampson
a9ef11c311
begin database refactor: move Model to new module
2014-01-13 14:37:04 -08:00
Adrian Sampson
cc5e3d489c
item templates can use album flexattrs ( fix #461 )
2013-12-25 15:49:51 -08:00