Commit graph

165 commits

Author SHA1 Message Date
Thomas Scholtes
495c49703c Add pipeline.mutator_stage 2014-04-19 19:04:49 +02:00
Thomas Scholtes
d8362fd03c Add pipeline.stage decorator 2014-04-19 18:54:29 +02:00
Adrian Sampson
a45ac4a9d6 enable unused import checking
The "noqa" marker is for exceptions such as these.
2014-04-13 20:48:30 -07:00
Adrian Sampson
469489e3a7 flake8 cleanup in library and functemplate 2014-04-13 20:39:56 -07:00
Adrian Sampson
9dd4ad96bd syspath: correctly prefix Windows UNC paths
Identified while tackling #670, but this should actually solve some legitimate
problems with cataloging music on a network drive.
2014-04-13 13:19:03 -07:00
Thomas Scholtes
883e3b3bc7 Flake8 fixes 2014-04-10 15:56:50 +02:00
Thomas Scholtes
b7a26811ef Add "shell" keyword for commands and use it in convert
Convert used to split the user command at whitespaces and pass it to `Popen`.
This approach is to naive, it also was not consistent with output from the
logs. Instead we pass the whole command to a subshell.
2014-04-09 20:41:30 +02:00
Thomas Scholtes
bc55747abc More flake fixes 2014-04-09 19:16:38 +02:00
Adrian Sampson
443b8089d5 remove unnecessary IndexableEnum
This is not really critical since list(Type)[i] works just as well. This fixes
a couple other problems from the enum transition:
- The name of TYPES was not really consistent with its new role as an enum
  type. Renamed this ImageType.
- Fix a rather egregious bug in embedart (undefined reference to Image).
2014-04-08 16:59:50 -07:00
Adrian Sampson
1eb6ccf0ab Merge pull request #642 from ktkonrad/enum34
use the new python enum instead of hand-rolled version
2014-04-08 15:24:04 -07:00
Adrian Sampson
b1ae7cb692 whitespace fixes in util 2014-04-03 19:56:59 -07:00
Adrian Sampson
4e2b35f372 avoid use of deprecated os.popen 2014-04-03 19:54:15 -07:00
Adrian Sampson
d407db725f convert: catch OSErrors and display error message
This also adds close_fds (only available on Unixes) to the common subprocess
invocation utility.
2014-04-03 19:47:21 -07:00
Kyle Konrad
142374925f add util test file with tests for enumerations. fix super() bug 2014-04-02 15:31:28 -07:00
Kyle Konrad
c4e6f38963 use the new python enum instead of hand-rolled version 2014-04-02 10:23:48 -07:00
Adrian Sampson
b8af77bdea changelog (& tiny tweak) for #567 2014-03-06 11:03:41 -08:00
Thomas Scholtes
165c28e967 Raise configuration error if BEETSDIR is file 2014-03-04 17:29:14 +01:00
Adrian Sampson
f0c0b5c54b config.dump: new approach to excluding defaults
This uses a lot less code (and actually works).
2014-02-28 10:40:35 -08:00
Adrian Sampson
26d9e0b7b7 config.dump: no filename parameter
It's bad style, in my opinion, to provide a file-writing option when the
client code could just as easily write the string to the file. (It implies
we're doing some sort of streaming, which we're obviously not.)
2014-02-28 09:50:08 -08:00
Adrian Sampson
3b2d51e018 backport YAML dumping from Confit (#552)
We actually added more full-blown YAML dumping to the Confit library a while
back but it looks like it never made it into beets. It offers a few benefits
over the hand-rolled flattening that the `config` command was previously
using, including printing ordered dicts in the right order. But it also
appears to have broken logic when attempting to hide defaults. I'll fix this
right quick.
2014-02-28 09:49:29 -08: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
Adrian Sampson
cd7b74271a avoid repr() on paths in filesystem errors 2014-02-27 19:47:03 -08: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
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
c133302e20 Fix configuration priorities (see #513) 2014-02-03 01:16:35 +01:00
Adrian Sampson
9294140388 log errors, don't crash, when calling convert 2014-02-02 14:12:14 -08:00
Thomas Scholtes
0abf41e2fb Use Pipline.push() in importer stages 2014-02-01 15:01:05 +01:00
Thomas Scholtes
565a284c03 Add pull() generator to Pipeline 2014-02-01 13:43:05 +01:00
Thomas Scholtes
df51aa2d1a Make --config path absolute 2014-01-30 00:11:19 +01:00
Thomas Scholtes
d75f6667e1 Add --config cli option 2014-01-29 23:38:05 +01:00
Adrian Sampson
d72f21d47b catch OSError when checking for convert program
As reported by zeltak on IRC.
2014-01-24 20:33:41 -08:00
Adrian Sampson
925a6178ba expunge pathmod parameter
I started using this a long time ago as a misguided attempt to make
path-related functions more testable. Harnessing is better.
2013-12-25 00:35:01 -08:00
Adrian Sampson
0167f67a96 simplify MPD configuration 2013-11-25 22:45:42 -08:00
Adrian Sampson
3420a36a78 fix ridiculous py26 syntax mismatch 2013-09-30 20:43:19 -07:00
Adrian Sampson
f660d6311c synchronize vendored bluelet 2013-09-30 16:50:21 -07:00
Adrian Sampson
bf78751090 human-readable errors in read() and write() 2013-05-21 15:58:22 -07:00
Adrian Sampson
475228a5e8 fix #281: album art filename respects replace 2013-05-19 10:34:46 -07:00
Adrian Sampson
4d62a83210 simplify materialization in LazyConfig 2013-05-17 19:10:44 -07:00
Adrian Sampson
42624eb745 use lazy config loader in confit
This lets you, for example, import beets in a library or the REPL and use it
immediately without calling "beets.config.read()" first.
2013-05-17 19:05:16 -07:00
Adrian Sampson
ba288ce604 move type conversion to commands module (#265)
This change also uses the existing str2bool utility function.
2013-05-08 22:56:27 -07:00
Adrian Sampson
dd8d4c16cc spell check 2013-04-29 10:23:21 -07:00
Adrian Sampson
2532c03d86 hard limit on guessed filename length 2013-04-08 18:36:27 -07:00
Adrian Sampson
c19fd0e0e6 proceed past os.listdir errors in sorted_walk 2013-02-24 15:47:09 -08:00
Adrian Sampson
d3a00ec443 don't crash when config file is empty 2013-02-21 11:03:22 -08:00
Adrian Sampson
d4ddfd1091 look up max filename length automatically 2013-02-08 11:02:29 -08:00
Adrian Sampson
b9cb3980c2 path_sep_replace config option
I also took this opportunity to move and rename util.santize_for_path to
library.format_for_path, which was long overdue.
2013-02-08 10:51:33 -08:00