Commit graph

1925 commits

Author SHA1 Message Date
Adrian Sampson
45baa6efe1 first stab at "advanced guide" 2013-05-19 17:35:23 -07:00
Adrian Sampson
6f2c1d81bd random -e (#263): fix some short responses
This slight modification to the selection algorithm avoids the situation in
which too many objects are chosen for a given artist and fewer than N objects
are eventually returned. We do this by implementing "selection without
replacement" literally: we choose objects one at a time and pop them from the
population when they are selected.
2013-05-19 11:00:52 -07:00
Adrian Sampson
90b4092e4f changelog & docs typo fixes for #263 2013-05-19 10:44:35 -07:00
Adrian Sampson
748d8caa64 Merge pull request #263 from madjar/master
Added a -e option to random that makes the distribution even among artists
2013-05-19 10:41:39 -07:00
Adrian Sampson
475228a5e8 fix #281: album art filename respects replace 2013-05-19 10:34:46 -07:00
Adrian Sampson
3e740b7d24 remove timeout Library field 2013-05-19 10:19:52 -07:00
Adrian Sampson
c56ef31da0 remove art_filename Library field
This is the first of a handful of refactorings that take advantage of the new
confit system to simplify parameter passing boilerplate.
2013-05-19 10:18:41 -07:00
Adrian Sampson
71666c7ac2 fix #280: unicode error when formatting artpath
The `artpath` field for Albums is a bytestring, not a Unicode string, and this
was causing a UnicodeDecodeError in `format_for_path`.
2013-05-19 10:05:23 -07:00
Georges Dubus
5dbff4a8eb Fixed the randomness of the equal change to have more than one song by artist 2013-05-19 17:22:19 +02: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
cee3b20630 duplicates: refactoring and empty-ID fix (#278)
The main change here, aside from documentation/naming updates, is that we skip
"duplicates" that arise from albums/tracks that are missing their MBIDs.
2013-05-17 12:35:35 -07:00
Adrian Sampson
0bb51e9f1b thanks and doc tweaks for duplicates (#278) 2013-05-17 12:20:27 -07:00
Adrian Sampson
cef245eb05 merge 2013-05-17 12:15:36 -07:00
Adrian Sampson
2f442b5677 Merge pull request #278 from pedros/duplicates
Duplicates plugin
2013-05-17 12:15:06 -07:00
Adrian Sampson
1898a79d4f fix inline for album plugin fields (#274) 2013-05-17 12:13:01 -07:00
Adrian Sampson
1ffc56b85a doc correction and refactoring for #275
Plugin-provided template fields are not available for queries. (Perhaps they
should be, though!)
2013-05-17 12:07:53 -07:00
Adrian Sampson
a6a0256bf9 Merge pull request #276 from pedros/missing
Use newly defined '$missing' template field instead of hardcoded format (-c)
2013-05-17 11:57:12 -07:00
Adrian Sampson
916ceb4b15 changelog and tweaks for #275
I've removed the -p option. The command now always shows plugin-provided
template fields if any are available. We also avoid printing out blank lines
for plugins that don't provide fields.
2013-05-17 11:55:17 -07:00
Adrian Sampson
22044eacac Merge pull request #275 from pedros/show_plugin_fields
Append plugin template fields to 'beet fields' output with -p, --plugins
2013-05-17 11:46:17 -07:00
Adrian Sampson
b8f651fa1a changelog/API docs for #274 2013-05-17 11:44:35 -07:00
Adrian Sampson
05cfbdcd0b Merge pull request #274 from pedros/album_template_fields
Perform template field substitution on albums
2013-05-17 11:40:46 -07:00
Pedro Silva
7031c15418 Initial import of 'duplicates' plugin 2013-05-17 12:47:34 +01:00
Adrian Sampson
3126ce697c require py-mb-ngs 0.4
The MusicBrainz search API changed. This version fixes compatibility with
that, so changing our dependency version will make users upgrade automatically
when upgrading to 1.1.1.
2013-05-15 15:02:54 -07:00
Pedro Silva
a48fde9f2c Use newly defined '$missing' template field instead of hardcoded format (-c) 2013-05-15 15:09:00 +01:00
Pedro Silva
4f5faeccac Append plugin template fields to 'beet fields' output with -p, --plugins 2013-05-15 13:41:54 +01:00
Pedro Silva
106ad99556 Perform template field substitution on albums
- adds another traversal through all plugins' template_fields for each
  'evaluate_template' call.
- requires the following idiom (or equivalent):

    @Plugin.template_field(field')
    def _tmpl_field(album):
        """Return stuff.
        """
        if isinstance(album, Album):
            return stuff
2013-05-15 13:05:55 +01:00
Adrian Sampson
9dd5e84c60 ^C dumps a stack trace in verbose mode 2013-05-12 13:06:41 -07:00
Adrian Sampson
a0ef886801 lyrics: substitute more punctuation (fixes #270) 2013-05-12 12:45:49 -07:00
Adrian Sampson
a5cb34360d lyrics: fix encoding for Lyrics.com 2013-05-12 12:38:48 -07:00
Adrian Sampson
c1815a5d72 FIELDS lists use real types instead of SQL strings
This should enable some useful simplifications down the road.
2013-05-11 16:41:04 -07:00
Adrian Sampson
056cf932d8 docs/changelog for date added (#264) 2013-05-11 13:31:42 -07:00
Adrian Sampson
6f77169ad2 itime (#264): name change
I changed the "itime" field to "added" and the %format function to %time.
2013-05-11 13:24:23 -07:00
Adrian Sampson
4704c4a3c8 simplify album-adding by marking itime as album
Since both albums and items have an itime field, I'm putting itime into
ALBUM_KEYS_ITEM. This simplifies a lot of handling code. It also will make the
item and album itimes synchronize at some points, which is probably fine -- I
can't see a major use case for maintaining separate added dates for an album
and its tracks.
2013-05-11 13:20:04 -07:00
Adrian Sampson
8806f2d02b remove a stray constant 2013-05-11 13:11:42 -07:00
Adrian Sampson
4904106a72 config option for time format string 2013-05-11 13:10:31 -07:00
Adrian Sampson
24c90b565a move time formatting to format_for_path
This is where field value transformations belong.
2013-05-11 13:06:24 -07:00
Adrian Sampson
dd00fe0cff fix stray character and tweak whitespace 2013-05-11 12:54:53 -07:00
Adrian Sampson
cb8195fe2b Merge pull request #264 from duailibe/master
Adding support for the "Date added field"
2013-05-11 12:52:18 -07:00
Lucas Duailibe
c7c2b266cd correcting identation 2013-05-11 10:58:19 -03:00
Lucas Duailibe
4d5773c195 Support for date/time fields 2013-05-11 10:53:43 -03:00
Lucas Duailibe
5c31d3ac15 Formatting the import time in the view and paths
Added the %format{} template function to output the time to any format supported by time.strftime()
2013-05-11 10:53:43 -03:00
Lucas Duailibe
0a631bcda2 Using time.time() to store the import time 2013-05-11 10:53:43 -03:00
Lucas Duailibe
d907dd6b40 Preliminary support for "date added" fields
This isn't yet finished, it needs some input on how to organize the data, and actually where to implement the use of this data, but it already works in setting the date
2013-05-11 10:53:43 -03:00
Adrian Sampson
f086fb6fd7 changelog, little style tweak for #272
Changed single-triple quotes to double-triple quotes, just for consistency
with the rest of the codebase.
2013-05-10 22:23:24 -07:00
Adrian Sampson
e1f7027abc Merge branch 'missing' of https://github.com/pedros/beets
Conflicts:
	docs/plugins/index.rst
2013-05-10 22:08:15 -07:00
Pedro Silva
b2d8f04f05 Modify "not part of beets" to "part of beets" 2013-05-10 16:50:34 +01:00
Pedro Silva
99355e60d4 Synchronize documentation with new parameters and respective behavior 2013-05-10 16:43:36 +01:00
Pedro Silva
763cfa06b4 Don't check for item.paths == None as that can't happen 2013-05-10 16:43:17 +01:00
Pedro Silva
d32a3ef9b5 Implement logic for displaying missing track counts 2013-05-10 16:42:45 +01:00