Commit graph

418 commits

Author SHA1 Message Date
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
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
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
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
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
ea0928c845 generalize YearQuery to NumericQuery 2013-05-09 15:47:25 -07:00
Adrian Sampson
0f06c79991 Merge pull request #261 from mschuerig/master
Support for year queries with ranges
2013-05-09 15:00:49 -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
Lucas Duailibe
e72fcc4b68 Changing to some more meaningful names 2013-05-05 20:32:33 -03:00
Lucas Duailibe
c7f4b8a095 "Modify" for non-string values
Added the possibility to modify float, integer e bool values (using explicitly true/false)
2013-05-05 20:22:38 -03:00
Michael Schuerig
42b5060fb7 Well, really add it... 2013-04-25 00:45:56 +02:00
Michael Schuerig
fe41bba380 Add a query class for years with support for ranges. 2013-04-25 00:36:21 +02:00
Adrian Sampson
2a22e6eae8 sort Album.items() output
This closes #181 and #255, which fixed the problem in one usage (importfeeds).
2013-04-20 13:37:29 -07:00
Adrian Sampson
d41fb7f0ea merge with master
We should work off the latest changes because of the recent changes to the
Query class hierarchy.
2013-03-16 12:50:55 -07:00
Adrian Sampson
4c85dc8f72 reduce redundancy in item queries
Now the SELECT query for items only appears in Library.items(). All other
functions that retrieve items go through this method. This should make it
easier to change the way flexattrs are picked up.
2013-03-16 12:50:24 -07:00
Adrian Sampson
fe8092139b fix construction of conditional path queries
I broke this in the last flurry of refactors but, as is usually the case, I
have no idea why it ever worked before.
2013-03-14 11:05:35 -07:00
Adrian Sampson
d0e9e3db1e initial support for non-field queries
With this change, we can get slightly closer to letting plugins extend the
query syntax with queries that don't pertain to a specific field. This will
likely need some more tweaking in the future, but it should allow for
some very interesting things.
2013-03-14 10:20:31 -07:00
Adrian Sampson
79c79bfcc3 refactor query parsing
It's long overdue that the parsing of individual query components was moved
out of classes and into top-level functions, where it belongs.
2013-03-14 10:12:20 -07:00
Adrian Sampson
f474f3aed2 split FieldQuery into base and registered versions 2013-03-14 10:00:30 -07:00
Adrian Sampson
a4fb44ab1b refactor RegexpQuery to use new FieldQuery (#214) 2013-03-13 23:03:21 -07:00
Adrian Sampson
f005ec2de0 refactor: everything is like a plugin query (#214)
The initial idea for this refactor was motivated by the need to make
PluginQuery.match() have the same method signature as the match() methods on
other queries. That is, it needed to take an *item*, not the pattern and
value. (The pattern is supplied when the query is constructed.) So it made
sense to move the value-to-pattern code to a class method.

But then I realized that all the other FieldQuery subclasses needed to do
essentially the same thing. So I eliminated PluginQuery altogether and
refactored FieldQuery to subsume its functionality. I then changed all the
other FieldQuery subclasses to conform to the same pattern.

This has the side effect of allowing different kinds of queries (even
non-field queries) down the road.
2013-03-13 22:57:20 -07:00
Adrian Sampson
40b49ac786 some low-level tweaks to extensible queries (#214) 2013-03-13 21:59:03 -07:00
Philippe Mongeau
9bae47f8ab update the docstrings and cleanup the new PluginQuery system 2013-03-13 00:39:35 -04:00
Philippe Mongeau
685972bbc5 update query tests
fix escape colons in the query term
2013-03-10 20:26:45 -04:00
Philippe Mongeau
5d5b52629d fix wrong indentation Oooops! 2013-03-10 20:13:56 -04:00
Philippe Mongeau
ca8af62e9c change queries() function to returns a dict
of {prefix: PluginQuery}

use the class __name__ as sqlite function name

make RegexpQuery use the AnyPluginQuery
2013-03-10 20:11:42 -04:00
Philippe Mongeau
c9c57cbb29 fix param odrder for match function of PluginQuery 2013-03-10 19:06:27 -04:00
Philippe Mongeau
7bc0b3a518 expclude prefix from query term 2013-03-10 18:51:43 -04:00
Philippe Mongeau
f7ced33b8e add support for extending the query syntax with plugins 2013-03-10 16:43:34 -04:00
Philippe Mongeau
a5f1357a94 use fuzzy threshold from config file 2013-03-09 22:14:12 -05:00
Philippe Mongeau
40dca74390 add AnyFuzzyQuery to match on any fields using fuzzy matching 2013-03-09 22:14:02 -05:00
Philippe Mongeau
da81c7e596 add internal FuzzyQuery using ~ as prefix 2013-03-09 22:13:48 -05:00
Adrian Sampson
3e05d6614c get and set flexattrs with hyphen keys
Here's another little experiment: to make flexattrs a little easier to use for
end users, you can now get and set them by using 'namespace-key' as the
argument to __getattr__ or __setattr__.

For example, try:
$ beet mod foo-bar=baz
$ beet ls -f '${foo-bar}'
baz
baz
baz
...
2013-03-09 13:16:24 -08:00
Adrian Sampson
4fe91b342b experiments with "un-registered" flexattrs 2013-03-09 12:54:55 -08:00
steini
410bdf6ddd Code for reading attributes from concatenated flex columns into dicts moved to an outside methods to make it usable for both BaseAlbum and Item objects. 2013-03-06 23:25:31 +00:00
steini
7d1f67881e ironing out some kinks 2013-03-06 18:29:22 +00:00
steini
8e342a16a1 Fixed up a couple of query classes for flex attr support. 2013-03-06 14:38:17 +00:00
steini
fbd85ef6ba Started hacking CollectionQuery to search flexible attribute fields. 2013-03-05 05:20:03 +00:00
steini
f5d658c58f An attempt at flexible attributes with plugin namespaces.
Mostly untested.
2013-03-04 05:55:43 +00:00
Adrian Sampson
54e070d06b mbsync: use SingletonQuery for item updates 2013-03-03 16:29:31 -08:00
Adrian Sampson
d71737114a format None values as the empty string
Fix due to @pscn. Includes test. Closes #108.
2013-02-28 10:00:26 -08:00
Adrian Sampson
0d762cd269 first half-attempt at a flexible attribute schema
This uses two tables, item_attributes and album_attributes, as key/value
tables for the respective entities. Plugins register fields, at which point
they are magically materialized as properties on Items (Albums are not done).
This currently supports adding and modifying these fields but not retrieving
them (which will need some sort of join).
2013-02-26 13:35:26 -08:00
Adrian Sampson
e0bb3b5cd0 original_{year,month,day,date} fields (GC-441) 2013-02-08 13:28:51 -08:00
Adrian Sampson
d4ddfd1091 look up max filename length automatically 2013-02-08 11:02:29 -08:00
Adrian Sampson
f652662d5b configurable max filename length 2013-02-08 10:54:19 -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
Adrian Sampson
1fe36057b0 Python style and legibility cleanup for #92 2013-02-05 11:34:17 -08:00
root
e730e18b62 reverted de-couling of album.genre and item.genre 2013-02-05 08:30:10 +01:00
Peter Schnebel
bd7303459e removed debug messages (i should really use git more) 2013-02-04 21:47:09 +01:00
Peter Schnebel
4df9521007 experimental track / album / artist based genre stuff per item 2013-02-04 20:24:22 +01:00
Dang Mai
5debf9f1f4 Add lib param to database_change event 2013-01-29 22:06:54 -05:00
Dang Mai
afae030477 Add database_change event 2013-01-29 20:49:57 -05:00
Adrian Sampson
7a410f636b happy new year
For future reference, this command did the trick:
ack -l 'Copyright 201' | xargs perl -pi -E 's/Copyright 201./Copyright 2013/'
2013-01-11 10:43:41 -08:00
Adrian Sampson
e17cd6beba merge lots of work on the stable branch 2012-12-12 19:14:30 -08:00
Adrian Sampson
128a881bb4 GH-69/GC-450: docs, changelog, simplification 2012-12-05 09:10:07 -08:00
jizz
fe1b40f7d2 minor tweak 2012-12-05 11:58:10 +11:00
jizz
12aaa2ee34 updated art_destination
art_filename now acceptable as a string or a Template
2012-12-05 11:05:12 +11:00
jizz
6b7b54062f Update beets/library.py
Fix for Issue 450: Expand templates in art_filename config option
2012-12-04 16:25:18 +11:00
Adrian Sampson
a8cf42d05b echonest_tempo: changelog + doc fixes + print fix 2012-12-02 16:25:45 -08:00
Adrian Sampson
eef87c2189 truncation incorporates extension length (GC-461) 2012-11-27 16:54:50 -08:00
Adrian Sampson
953291f736 truncate bytes instead of unicode (GC-422) 2012-11-27 16:43:57 -08:00
Adrian Sampson
7158c01ff8 clean up outdated FIXMEs 2012-10-27 18:47:04 -07:00
Adrian Sampson
99e36d870e send "failed reading file" message to debug
This message was being logged as an error every time MediaFile failed to parse a
file. But this is not actually an error -- the importer uses FileTypeErrors to
determine whether a file is music or not. This resulted in error logs for every
album art file, .m3u, etc. in the imported directory. Verbose output is a better
home for this message.
2012-10-26 21:04:18 -07:00
Adrian Sampson
dcb9ad7373 fix several non-unicode logging statements
A user reported a problem with one of the logging statements where .format()
tried to convert a Unicode string to bytes because the log message was '', not
u''. As a rule, we should ensure that all logging statements use Unicode
literals.
2012-10-24 15:14:33 -07:00
Adrian Sampson
91ad913399 #62: simplify list (and random) code
With the new centralized print_obj function, we can greatly simplify the code
for the list command. This necessitated a couple of additional tweaks:

- For performance reasons, print_obj can now take a compiled template. (There's
  still an issue with using the default/configured template, but we can cross
  that bridge later).
- When listing albums, $path now expands to the album's item dir. So the format
  string '$path' now exactly corresponds to passing the -p switch.

As an added bonus, we can now also reduce copypasta in the random plugin (which
behaves almost exactly the same as list).
2012-10-20 21:10:39 -07:00
Adrian Sampson
b58e0ed7fc Merge pull request #60 from mk-fg/dont_update_mtime_for_different_path
library: don't set/update item mtime if read-path is passed to read()
2012-10-20 17:05:34 -07:00
Adrian Sampson
b9cc206093 changelog & cleanup for pull request #59 2012-10-20 16:57:56 -07:00
Mike Kazantsev
609e57f0a0 library: don't set/update item mtime if read-path is passed to read() 2012-10-20 20:10:29 +06:00
Mike Kazantsev
12cae9ee93 library: log path, reading of which has raised an exception 2012-10-20 20:07:27 +06:00
Adrian Sampson
3a4e1ca4f7 replaygain: add fields to Item
This has been a long time coming, but we now finally keep track of ReplayGain
values in the database. This is an intermediate step toward a refactoring of the
RG plugin; at the moment, these values are not actually saved!
2012-10-17 20:28:24 -07:00
Jakob Schnitzer
e273f9dfa9 Fix a UnicodeDecodeError when using path in templates 2012-10-09 19:11:09 +02:00
Adrian Sampson
c056467c5d friendly error message in Item.write (GC-437) 2012-09-17 10:36:48 -07:00
Adrian Sampson
ef248576f0 bpd: fix crash w/ unicode extensions (GC-439) 2012-09-17 10:24:34 -07:00
Adrian Sampson
dc054907d5 fix non-string value matching in SubstringQuery 2012-09-09 12:17:13 -07:00
Adrian Sampson
90b3dba085 fix match() on RegexpQuery for non-string values 2012-09-08 16:24:39 -07:00
Adrian Sampson
6200f0a4c8 scrub: remove all types of tags 2012-08-24 15:39:13 -07:00
Adrian Sampson
269a77c9e1 fix matching Unicode pathnames in queries 2012-08-23 18:08:31 -07:00
Adrian Sampson
07d00da825 album-only field queries; ^$ match empty string 2012-08-17 10:54:30 -07:00
Adrian Sampson
30ac59f3d2 allow $path in "beet list -f" templates 2012-08-16 09:00:55 -07:00
Adrian Sampson
1f5ae6600b warning when using unrecognized fields in queries 2012-07-25 15:41:22 -07:00
Adrian Sampson
3661f261b6 tiny operator simplification 2012-07-24 16:29:23 -07:00
Adrian Sampson
70000ec4e4 move MBCS check to bytestring_path
This should be used in *every* filename conversion, not just the destination
generation. Also required a change to sorted_walk (erroneously didn't use
syspath).
2012-07-17 11:45:44 -07:00
Adrian Sampson
44459f88d0 Windows: represent paths as UTF-8 internally
When we store paths in the database, we always use bytestrings for consistency.
But on Windows, these paths are converted back to Unicode before they reach the
FS API. This means that the codec used internally is immaterial.

However, we were naively using sys.getfilesystemencoding() for this internal
representation. On Windows, this is MBCS, a broken encoding that can't represent
all of Unicode. This change replaces that with UTF-8, a "real" codec.

The decoding bit now tries UTF-8 and falls back to MBCS for compatibility with
existing databases. The reality, however, is that existing databases may not
work with this change -- a byte string may represent something different in
UTF-8 from what it represents in MBCS. So users should recreated their DBs if
anything goes wrong.
2012-07-17 10:54:47 -07:00
Adrian Sampson
d97f13a899 pypy-compatible sqlite3 invocation 2012-06-24 13:30:36 -07:00
Adrian Sampson
073ee14e56 fix broken matching of path format queries (#405)
A bug in the shlex module with Unicode strings made these queries unparseable
and thus match every track.
2012-06-23 17:18:28 -07:00
Adrian Sampson
b487001c9b exclusive database access (GC-399)
This is the crux of the matter. This new lock synchronizes accesses to the
database itself, allowing only one thread to have transactions active at a time.
In effect, this makes sure that beets only has one SQLite transaction active at
a time (and is very conservative in this effort; no read sharing is allowed
either). This prevents all contention in SQLite and hides the pathological
HAVE_SLEEP=0 behavior.
2012-06-08 11:34:54 -07:00
Adrian Sampson
5d6e9b387a synchronize access to mutable shared maps (GC-399)
We now properly synchronize access to _tx_stacks and _connections, which can be
concurrently mutated by different threads. This way I don't have to worry about
GIL semantics: DRF => SC!
2012-06-08 11:24:16 -07:00
Adrian Sampson
00c47b6811 library has per-thread transaction stacks (GC-399)
The Library object is now (almost) safe to share across threads. Per-thread
resources are now automatically managed internally. There is no longer any need
for the _reopen_lib hack to get multiple copies of the Library object.
2012-06-08 11:09:45 -07:00
Adrian Sampson
d88afbad11 library maintains per-thread DB conns. (GC-399) 2012-06-08 10:49:47 -07:00
Adrian Sampson
711a1c1113 apply artist credits & add to database (GC-286) 2012-05-19 16:13:15 -07:00
Adrian Sampson
13995201a1 human-readable filesystem errors (#387) 2012-05-18 15:16:38 -07:00
Adrian Sampson
f6b37d2c8c remove with_statement __future__ imports
This is the first of several commits that will modernize the beets codebase for
Python 2.6 conventions. (Compatibility with Python 2.5 is hereby abandoned.)
2012-05-13 20:39:07 -07:00
Adrian Sampson
6ce08c4ce6 merge 2012-05-08 11:59:41 -07:00
Adrian Sampson
8b25a86ee3 use 2.6-compatible format strings 2012-05-08 11:46:08 -07:00
Adrian Sampson
a28f930c52 transaction objects to control DB access
In an attempt to finally address the longstanding SQLite locking issues, I'm
introducing a way to explicitly, lexically scope transactions. The Transaction
class is a context manager that always fully fetches after SELECTs and
automatically commits on exit. No direct access to the library is allowed, so
all changes will eventually be committed and all queries will be completed. This
will also provide a debugging mechanism to show where concurrent transactions
are beginning and ending.

To support composition (transaction reentrancy), an internal, per-Library stack
of transactions is maintained. Commits only happen when the outermost
transaction exits. This means that, while it's possible to introduce atomicity
bugs by invoking Library methods outside of a transaction, you can conveniently
call them *without* a currently-active transaction to get a single atomic
action.

Note that this "transaction stack" concepts assumes a single Library object per
thread. Because we need to duplicate Library objects for concurrent access due
to sqlite3 limitation already, this is fine for now. Later, the interface should
provide one transaction stack per thread for shared Library objects.
2012-05-06 23:24:05 -07:00
Adrian Sampson
5ebb61bab7 moving import (#266): move album art files 2012-05-03 17:08:52 -07:00
Adrian Sampson
104aec3c2f cleanup and docs for regular expression queries 2012-05-01 20:03:01 -07:00
Adrian Sampson
a6e6da245a Merge branch 'upstream' of https://github.com/djrtl/beets-dj
Conflicts:
	beets/library.py
2012-05-01 19:17:05 -07:00
Adrian Sampson
1ee07e116e flexible -f templates for album listings (and rdm) 2012-04-30 22:59:17 -07:00
Adrian Sampson
ef45461cf9 evaluate_template is now a method on Item 2012-04-30 21:40:02 -07:00
Adrian Sampson
792c5b5e5d cleanup and docs for -f option flexibility 2012-04-30 21:26:49 -07:00
Adrian Sampson
928730e0ed merge GH-33: more flexibility for -f arguments 2012-04-30 21:17:20 -07:00
Adrian Sampson
6d7cbd6d2f get list of tmpl_* functions only once 2012-04-29 19:55:34 -07:00
Adrian Sampson
e85fe2d834 fix memoization presence check 2012-04-29 18:20:37 -07:00
Adrian Sampson
de87fb7489 memoize %aunique results (share among tracks) 2012-04-29 18:07:29 -07:00
Adrian Sampson
d042bed27c pre-parse path format templates
Instead of parsing the template at each call to destination(), it's now possible
to parse them *once*, a priori, and re-use the resulting template object. This
is analogous to the re module's compiled expressions.
2012-04-29 15:30:43 -07:00
Adrian Sampson
2087ff6e41 add items to DB before moving/copying (#190)
Previously, all files would be moved/copied/deleted before the corresponding
Items and Albums were added to the database. Now, the in-place items are added
to the database; the files are moved; and then the new paths are saved to the
DB. The apply_choices coroutine now executes two database transactions per task.
This has a couple of benefits:
- %aunique{} requires album structures to be in place before the destination()
  call, so this now works as expected.
- As an added bonus, the "in_album" parameter to move() and destination() --
  along with its associated ugly hacks -- is no longer required.
2012-04-29 14:14:11 -07:00
Steve Dougherty
c93e7e443e Run functions and substitute fields in list format strings. 2012-04-29 11:11:57 -04:00
Adrian Sampson
4b253df48c ensure album art path is unique when moving
Avoid filename collisions on cover art when running a "beet move". (This is
already covered for adding new art and for moving audio files.)
2012-04-28 21:14:11 -07:00
Matteo Mecucci
f4a0595b32 Fixed the regexp function used with sqlite3. 2012-04-28 15:24:42 +02:00
Matteo Mecucci
10a4e14045 Added regexps to queries, use with additional column before pattern eg 'title::^Quiet' or ':^Quiet'. 2012-04-28 15:24:17 +02:00
Adrian Sampson
8f128876e2 %aunique: use a single field instead of a sequence
For a less cumbersome uniquifying string, only a single field value is now used
instead of a prefix of a list of fields. The old semantics had two problems that
made it both unnecessary and insufficient:
- In the vast majority of cases, a single field suffices (year OR label OR
  catalog number, for example) and forcing the string to include many identical
  fields is unnecessary.
- If the albums are very similar, a prefix may be insufficient; a better
  solution may be found with an arbitrary subset. (Of course, we can't afford to
  search the whole power set.)
So we're going with a single field for now. This should cause far less
confusion.
2012-04-24 21:15:50 -07:00
Adrian Sampson
8fe3738710 default arguments to %aunique{} (#190) 2012-04-24 20:34:51 -07:00
Adrian Sampson
938a9b2f96 catalognum is an album-level field 2012-04-24 20:03:11 -07:00
Adrian Sampson
f20fbede5e sanitize output of %unique 2012-04-20 10:17:19 -07:00
Adrian Sampson
251026b759 add a new batch of metadata fields
The new fields are:
ALBUM: mb_releasegroupid asin catalognum script language country albumstatus
media albumdisambig
TRACK: disctitle encoder
These are not yet parsed from MusicBrainz responses (just added to MediaFile
and the database).
2012-04-04 00:52:57 -07:00
Adrian Sampson
ffa2402ff4 revamp default character substitutions
There's no longer a distinction between Unix and Windows substitutions. Enough
users reported problems with Windows-forbidden characters on Samba shares that
it seems appropriate to make all filenames Windows-safe, even on Unix. Users who
really want those additional characters (<>:"?*|\) can re-enable them via the
"replace" option. Nobody has complained about beets being *too* conservative.

This also adds sanitization of control characters, which is an all-around good
idea, and the substitution now runs in the Unicode (rather than byte) domain.
2012-04-03 14:22:38 -07:00
Adrian Sampson
de6530f4a5 acoustid ID and fingerprint stored/tracked (#332) 2012-04-01 18:22:42 -07:00
Adrian Sampson
781c26ffd0 normalize to NFC on non-Mac platforms (#367) 2012-03-27 10:44:11 -07:00
Adrian Sampson
823e36ad01 normalize new filenames to with NFD 2012-03-26 12:14:30 -07:00
Adrian Sampson
3c4d8500e5 sort by sort names 2012-03-25 17:35:07 -07:00
Adrian Sampson
12998de8ee mark album artist sort as an album field 2012-03-25 17:13:12 -07:00
Adrian Sampson
2f1ac61d4f track and album artist sort names (GH-25, GC-77)
Previously, there was just an "artist sort name" field -- now there's a
corresponding sort name for both track artists and album artists. I also made
the names shorter (artist_sort and albumartist_sort).
2012-03-25 17:02:52 -07:00
Paul Provost
1e4f2d555f Merge branch 'master' of https://github.com/sampsyo/beets 2012-03-24 17:25:26 -04:00
Adrian Sampson
06f137bff9 %unique path function
Generates disambiguating strings to distinguish albums from one another. To be
used as the basis for a simpler path field, $unique, as a default disambiguator.
2012-03-22 18:04:06 -07:00
Adrian Sampson
8fad15263b reorganize default template functions into class
Using a class wrapper allows additional context to be provided to the functions.
Namely, we can now provide the Item itself to the function, so %foo{} could
conceivably do something useful even without arguments. This will be used for
the upcoming %unique function.
2012-03-22 17:08:22 -07:00
Paul Provost
68952209d5 Added artist sort name
- MP3 tag saved
- Available template field as $artist_sort_name
2012-03-10 18:51:48 -05:00
Adrian Sampson
bb4be3a303 lower case extensions in destination (#331) 2012-01-31 15:11:19 -08:00
Adrian Sampson
337e2556a6 sanitize path components from plugins (#315) 2012-01-30 16:53:05 -08:00
Adrian Sampson
fe33926038 add new audio properties to library/DB
$samplerate now expands to "##kHz" in path formats.
2012-01-27 16:04:51 -08:00
Adrian Sampson
979c33a0b1 fix substring pattern match when value is None 2012-01-06 10:36:34 -08:00
Adrian Sampson
9920cc482c add "scrub" plugin (#280)
--HG--
rename : beetsplug/embedart.py => beetsplug/scrub.py
rename : docs/plugins/embedart.rst => docs/plugins/scrub.rst
2012-01-02 14:03:28 -08:00
Adrian Sampson
d73c133a53 query-conditioned path formats (#210)
Also, Library.path_formats is now a list of pairs instead of a dictionary. (I
would have used an OrderedDict, but that was added in 2.7.)
2011-12-28 19:01:13 -08:00
Adrian Sampson
112d0f5452 uniquify conflicting filenames (#182) 2011-12-19 22:52:13 -08:00
Adrian Sampson
8fde981b1d add asciify function 2011-12-19 19:41:09 -08:00
Adrian Sampson
b493bc7004 configurable pathname substitution (#115) 2011-12-19 18:37:35 -08:00
Adrian Sampson
91901fc379 plugin-extensible path format fields (#169) 2011-12-17 21:29:15 -08:00
Adrian Sampson
f1ebc82a55 plugin hooks for template functions (#231) 2011-12-16 11:56:40 -08:00
Adrian Sampson
255fbf6c41 add a small set of default path functions (#231) 2011-12-15 14:27:59 -08:00
Adrian Sampson
3c99e54174 switch out string.Template with new template parser (#231) 2011-12-15 11:53:58 -08:00
Adrian Sampson
6eaf3f96ae don't include path queries when querying albums 2011-12-07 16:52:38 -08:00