Thomas Scholtes
79d1203541
Remove unnecessary method on ImportTask
2014-09-18 19:32:29 +02:00
Adrian Sampson
9aa05bdb00
Version bump: 1.3.9
2014-09-17 19:19:22 -07:00
Thomas Scholtes
0bf7c06f7d
Media file tags can be customized with the `write` event
2014-09-17 12:05:17 +02:00
Thomas Scholtes
a38a6b2de9
Decode bytestring paths to unicode when logging
...
Fixes #964 .
2014-09-17 11:25:29 +02:00
Thomas Scholtes
ad71af2c3d
Add NoneQuery
...
This makes fast SQL queries for singletons possible
2014-09-17 11:23:00 +02:00
Thomas Scholtes
89d7c5d896
Extend the documentation of the ImportTask
2014-09-17 11:21:06 +02:00
Adrian Sampson
5f2ca0b75b
Rename smartartist to artist/albumartist ( #953 )
...
This is basically always what you want, so now you can just use the name of
the field without "smart".
2014-09-16 14:53:16 -07:00
Adrian Sampson
2795a01e28
Default sort configuration is global ( #953 )
...
It would be nice to cache the Sort object so we didn't have to re-parse this
every time...
2014-09-16 14:34:21 -07:00
Thomas Scholtes
e579db6f0a
Hide task specific code from importer stage
2014-09-16 12:52:15 +02:00
Adrian Sampson
f5e1846ff0
Add slow sort to SmartArtistSort
2014-09-15 19:49:05 -07:00
Adrian Sampson
f9c6dd6d67
Move SmartArtistSort to library ( #953 )
...
Models can now have a dict of special sort classes.
2014-09-15 19:43:22 -07:00
Adrian Sampson
e2b3fafefa
Remove SortedQuery ( #953 )
...
This turned out to be less useful than I was hoping.
2014-09-15 18:39:49 -07:00
Adrian Sampson
eb89d3a850
The demise of get_query_sort ( #953 )
...
The type tests now live where they ought to live.
2014-09-15 18:37:09 -07:00
Adrian Sampson
80116ccc9e
Introduce parse_query_string for the common case
...
Most clients other than Library._fetch know what type they have!
2014-09-15 18:21:22 -07:00
Adrian Sampson
9c93c0656a
Factor out parse_query from get_query_sort
2014-09-15 18:10:17 -07:00
Adrian Sampson
0f37737168
dbcore: parse_sorted_query ( #953 )
2014-09-15 17:52:52 -07:00
Thomas Scholtes
a17e8b54be
Flexible SQL columns have TEXT affinity
...
Reverts 2314f0f9ff
Also implements handling of text values for the base `Type` and
overwrites in the blob-based `PathType`
2014-09-15 01:14:06 +02:00
Thomas Scholtes
e864c2ff43
Document from/to SQL serialization of types
2014-09-15 00:30:34 +02:00
Adrian Sampson
72436644a6
Merge pull request #909 from arogl/master
...
Clean up of logging messages as described here
2014-09-14 13:14:35 -07:00
Adrian Sampson
cc49c8cc18
Miniscule tweaks for #959
2014-09-14 13:11:47 -07:00
Adrian Sampson
c38d45e273
Merge pull request #959 from geigerzaehler/dbcore-refactor
...
Refactor DBcore without changing behaviour
2014-09-14 13:10:36 -07:00
Adrian Sampson
67c043532c
More docstrings for try_sync ( #958 )
2014-09-14 12:22:56 -07:00
Thomas Scholtes
fafc56c95b
Unify similar code from Type subclasses in base class
...
Instead of implementing the `parse()` and `format()` methods and
setting the `null` attribute in subclasses, we set the `model_type`
field and the generic implementations of the two methods take care of
the rest.
Again: No change in behaviour!
2014-09-14 17:11:02 +02:00
Thomas Scholtes
30addc12b4
Do not use abstract base class instance
...
We want to move common code into the base class with out changing the
behaviour of the default type.
2014-09-14 16:47:21 +02:00
Thomas Scholtes
629fc0087d
DateType inherits from Float type
2014-09-14 16:17:12 +02:00
Thomas Scholtes
492cf38927
Use item[field] instead of getattr(item, field)
2014-09-14 16:13:35 +02:00
Thomas Scholtes
19d3ca822e
Minor simplifications in Model class
2014-09-14 16:13:35 +02:00
Thomas Scholtes
4cfb59bfba
Add Type.to_sql() and simplify model code
...
Instead of encoding the conversion behaviour in the model class (via
the `_bytes_keys` attribute) we define it on the type. This gives us
a more extensible interface and separates logic.
This should not change any behaviour (as one can see by closely staring
at the code).
2014-09-14 16:13:33 +02:00
Thomas Scholtes
4134a5173a
Split Type.normalize() responsibilities into normalize() and from_sql()
...
Previously `normalize()` was used to convert values set by the model API
consumer and values received from the database. These are two
orthogonal uses.
The commit does not change behaviour since the `from_sql()` method uses
the `normalize()` implementation.
2014-09-14 16:13:33 +02:00
Thomas Scholtes
1613a199fa
Combine try_write() and store() as try_sync()
...
This makes sure we store the updated file `mtime`. By providing the
same interface on `Album` and `item` we can also reduce some code
duplication in the `modify` command.
2014-09-14 14:44:32 +02:00
Adrian Sampson
2314f0f9ff
Use NONE type affinity for flexattr value column
...
This is what we should have been using all along---since it allows any type to
appear---but we didn't. 😢
2014-09-14 12:34:46 +02:00
Adrian Sampson
044dbfcd38
NumericQuery: Check that the field exists
2014-09-14 12:34:46 +02:00
Thomas Scholtes
f112c9610c
Add 'types' plugin for flexible field types
...
Conflicts:
beets/library.py
2014-09-14 12:34:46 +02:00
Thomas Scholtes
475d4899ee
Add tests for plugins providing flexible field types
2014-09-14 12:34:45 +02:00
Thomas Scholtes
3cbe9cbd10
Plugins can define types of flexible fields
...
This partially solves #647 .
2014-09-14 12:34:45 +02:00
Adrian Sampson
c57439770b
Collapse build_sql into _fetch ( #953 )
...
This was getting so short that it made sense to go back from whence it came.
2014-09-13 21:35:19 -07:00
Adrian Sampson
85de214399
Remove SQL ORDER BY sorting option
...
I don't think anything uses this anymore.
2014-09-13 21:19:32 -07:00
Adrian Sampson
2b921b19fd
NullSort instead of None
...
A more descriptive placeholder for "don't sort".
2014-09-13 20:38:31 -07:00
Adrian Sampson
369533d46f
Remove special_sorts
...
These are not extensible anyway; we'll need another mechanism for that.
2014-09-13 19:47:20 -07:00
Adrian Sampson
76c831a1cd
Merge branch 'master' of github.com:sampsyo/beets
2014-09-13 17:19:04 -07:00
Adrian Sampson
4870d7e0fa
Roll back fast flexible field sorts ( #953 )
...
Sad to see them go, but happy be rid of the SQL injection.
2014-09-13 17:16:12 -07:00
Thomas Scholtes
89c82dc63d
fetchart: correctly handle path encoding
...
* Ensure that `config.as_str_seq()` returns a list of unicode objects.
* Map these to bytestring paths so we can compare them to other paths.
Fixes #887
2014-09-13 16:49:34 +02:00
Adrian Sampson
395be1a0f6
Fix missing super-constructor call
2014-09-12 21:40:00 -07:00
Adrian Sampson
cfb929223e
Collapse some duplication in Confit templates
2014-09-12 21:28:32 -07:00
Adrian Sampson
f5b6431488
Flake8 fix
2014-09-12 21:12:44 -07:00
Adrian Sampson
db4e74fd57
Fix mistaken removals
2014-09-12 21:11:53 -07:00
Adrian Sampson
03d0f9dfb3
Fix namedtuple call
2014-09-12 20:59:19 -07:00
Adrian Sampson
bb4082fbfc
Style cleanup in sorting
2014-09-12 20:58:25 -07:00
Adrian Sampson
d572bde13b
Tiny docs typos
...
Conflicts:
docs/plugins/index.rst
2014-09-12 20:58:24 -07:00
Adrian Sampson
ba93d6b176
Move flags back to _raw_main
...
SubcommandsOptionParser is supposed to be generic.
2014-09-12 20:57:48 -07:00