Commit graph

3221 commits

Author SHA1 Message Date
Adrian Sampson
472571a4c6 web: fix typo in albums endpoint 2014-02-26 20:08:22 -08:00
Thomas Scholtes
4228628f84 Force utf8 encoding on new id3_desc tags 2014-02-26 22:48:41 +01:00
Thomas Scholtes
4c00e52455 Completion for filenames with spaces 2014-02-23 23:17:49 +01:00
Thomas Scholtes
fa6f7622e0 Move completion into beets.ui package and use pkg_resources 2014-02-23 22:16:59 +01:00
Adrian Sampson
5606e60e72 changelog/thanks for #554 2014-02-23 12:14:32 -08:00
Adrian Sampson
6ab2dc4940 Merge branch 'master' of https://github.com/jlefley/beets into jlefley-master 2014-02-23 12:11:00 -08: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
Adrian Sampson
58dd5f47f5 use _show_model_changes in mbsync 2014-02-22 14:37:04 -08:00
Adrian Sampson
ace34a8654 _show_model_changes: silence by default
This lets the first line of output be suppressed (as it was previously in
update and write) when no changes at all need to be printed.
2014-02-22 14:32:34 -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
1413a842f7 update: restore "deleted" indication 2014-02-22 00:51:05 -05:00
Adrian Sampson
52682a0777 changelog for better difference formatting 2014-02-22 00:48:27 -05:00
Adrian Sampson
e42fcd973c use _show_model_change in update 2014-02-22 00:41:28 -05:00
Adrian Sampson
f6c19adc55 use _show_model_changes for write command 2014-02-22 00:24:43 -05:00
Adrian Sampson
8303c71b38 robust difference display for modify
This new alternative to _showdiff takes care of formatting and is better at
highlighting differences for non-string fields. This takes care of the issue
where "True -> False" would have everything but the "e" highlighted.
2014-02-22 00:14:18 -05:00
Adrian Sampson
8ddf04e711 refine config location discussion (#513) 2014-02-21 21:22:55 -05:00
Adrian Sampson
b2aee7b805 create BEETSDIR directory (#513)
The directory returned by config_dir() must exist. That was not being enforced
in the BEETSDIR case.
2014-02-21 21:08:49 -05: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
622ca2b244 Unixy location is fallback on OS X
This is mainly for backwards compatibility. It's also an effort to reduce the
support burden; this way, I can say "your config directory is ~/.config/beets"
without needing to ascertain whether someone is on a Mac.
2014-02-21 20:57:06 -05:00
Adrian Sampson
129575178c docstring/style fixups for #513 2014-02-21 20:52:21 -05:00
Adrian Sampson
a630c61340 Merge branch 'geigerzaehler-remove_cascading_config' 2014-02-21 20:31:05 -05:00
Adrian Sampson
a06500fb42 style tweaks in date queries (#551; fixes #542)
The microseconds were being ignored anyway due to the int conversion, so we
might as well not use them here.
2014-02-21 20:17:57 -05:00
Thomas Scholtes
979dcfea98 Front cover type for flac images 2014-02-22 01:32:23 +01:00
Jason Lefley
c0f97bdc06 Set album art type attribute to front cover for FLAC 2014-02-21 16:09:41 -08:00
Adrian Sampson
7b544a2205 Merge branch 'remove_cascading_config' of https://github.com/geigerzaehler/beets into geigerzaehler-remove_cascading_config 2014-02-21 18:14:24 -05:00
Adrian Sampson
6a3ceadc7d Merge branch 'datequery_timezone_fixes' of https://github.com/silb/beets into silb-datequery_timezone_fixes 2014-02-21 18:12:47 -05:00
Thomas Scholtes
c5d3483fc3 Add note for shell support 2014-02-20 13:46:21 +01:00
Thomas Scholtes
c1de721ca1 Remove unused code 2014-02-20 13:43:48 +01: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
Stig Inge Lea Bjørnsen
d65f2b8095 Query date intervals by their numeric epoch time.
SQLite store dates as epoch time offsets in UTC. By converting date
interval endpoints to UTC epoch time in Python, using the SQLite date
functions isn't necessary any more.
2014-02-19 20:50:13 +01:00
Stig Inge Lea Bjørnsen
cf0a10b652 Python 2.6 compatibility for date queries.
The method datetime.timedelta.total_seconds() is only available since 2.7.
2014-02-19 00:30:29 +01:00
Stig Inge Lea Bjørnsen
64fdd174b3 Time zone fix for SQL date clauses (#542).
Query using the SQL function datetime instead of date.
2014-02-19 00:01:11 +01:00
Stig Inge Lea Bjørnsen
fbe3e1a45e Time zone fix for epoch time calculation for SQL based date queries (#542). 2014-02-19 00:01:11 +01:00
Thomas Scholtes
575dc9d0c1 Documentation for config command 2014-02-18 21:29:31 +01:00
Thomas Scholtes
c8e32f6bef Add config command 2014-02-18 20:56:08 +01:00
Thomas Scholtes
d0e5b411cf Documentation for configuration location 2014-02-18 18:24:49 +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
661e82fdec echonest: remove confusing length output (#545) 2014-02-17 22:57:37 -05:00
Adrian Sampson
c196f20dfc fix numeric queries over empty string (fix #547) 2014-02-17 22:51:53 -05:00
Adrian Sampson
5d55312fdb add TOCs to some documentation 2014-02-16 19:25:26 -08:00
Adrian Sampson
a8ee13f16e add some failing tests for date queries 2014-02-14 23:02:51 -08:00
Adrian Sampson
4feccd4712 date queries: light style changes 2014-02-14 22:21:26 -08:00
Adrian Sampson
1d67201290 link to copyartifacts plugin 2014-02-13 21:38:55 -08:00
Adrian Sampson
a2075d31e5 modify: use formatted values in _showdiff()
Perhaps we should use this for other commands also. One outstanding issue is
strange highlighting (e.g., "True -> False" helpfully shows that the "e" did
not change).
2014-02-13 21:33:58 -08:00
Adrian Sampson
be31ac683a Model._parse() class method 2014-02-13 21:29:17 -08:00
Adrian Sampson
b1d70eee39 modify: remove special parsing logic
This could be nicer, but at least we now use standard type-based parsing.
2014-02-13 21:22:23 -08:00