Adrian Sampson
c3f9b083d7
More on sorting in the changelog
2014-09-16 14:55:56 -07: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
Adrian Sampson
0bdd0c7159
Fix mocking in Spotify tests
...
The mock wasn't being triggered; these tests were going to the network. Now we
don't match on the query string and instead test that it was correct by
actually parsing it.
2014-09-16 10:43:53 -07:00
Thomas Scholtes
9a382eb581
Test importing unmatched tracks
2014-09-16 13:44:33 +02: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
Adrian Sampson
08b9b90f74
convert: Fix #962 , extensions in auto mode
2014-09-15 17:00:59 -07:00
Adrian Sampson
84c0f909b6
replaygain: Check for bad mp3gain output ( #961 )
2014-09-15 10:25:57 -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
a92493cf12
Test queries on boolean fields
2014-09-15 00:48:18 +02:00
Thomas Scholtes
e5da5757c0
Preserve state in query tests
2014-09-15 00:36:24 +02:00
Thomas Scholtes
e864c2ff43
Document from/to SQL serialization of types
2014-09-15 00:30:34 +02:00
Adrian Sampson
77f7d18c00
Remove stray comment from #909
...
Yes, it is necessary.
2014-09-14 13:15:42 -07: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
67b1ac46d7
Changelog for importfeeds echo ( #955 )
2014-09-14 13:06:25 -07:00
Adrian Sampson
20968a92ee
Merge pull request #955 from robotanarchy/master
...
importfeeds: add new 'echo' type that writes to stdout
2014-09-14 13:03:59 -07:00
Adrian Sampson
67c043532c
More docstrings for try_sync ( #958 )
2014-09-14 12:22:56 -07:00
Adrian Sampson
5ba3d98631
More docs/changelog for flex types ( #951 )
2014-09-14 12:10:47 -07:00
Adrian Sampson
8ec4f8bc24
Merge pull request #958 from geigerzaehler/item-sync
...
Update database mtimes in modify and write commands
2014-09-14 12:09:55 -07:00
robotanarchy
2039d2effe
don't use the _write_m3u function for stdout stuff
2014-09-14 20:17:53 +02: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
Lucas Duailibe
b1a5189f68
Add default value for relative_to in play plugin
2014-09-14 12:07:08 -03: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
b86669fe05
Add integer query tests
2014-09-14 16:11:13 +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
Thomas Scholtes
84acf17855
Test that mtimes are updated when writing files
...
Follows the discussion in #937 and the wiki [1].
[1]: https://github.com/sampsyo/beets/wiki/Architecture#modification-times-mtime
2014-09-14 14:19:11 +02:00
Thomas Scholtes
3fe52a7694
Add test helpers to create database fixtures
2014-09-14 14:16:34 +02:00
Thomas Scholtes
bd871cbc03
Don’t interact with files in TypePluginTest
2014-09-14 14:00:34 +02:00
Thomas Scholtes
ffc75c333d
Merge branch 'flextypes'
2014-09-14 13:16:43 +02:00
Thomas Scholtes
80f3ec1ed7
Document flexible field types in plugins
2014-09-14 13:15:47 +02:00
Adrian Sampson
d081b6a220
Docs for types plugin
2014-09-14 12:35:47 +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
5dec867ab3
mpdstats: set types for flexible fields
2014-09-14 12:34:46 +02:00
Thomas Scholtes
d4f72f62eb
echonest: set types for flexible fields
...
Conflicts:
beetsplug/echonest.py
2014-09-14 12:34:46 +02:00
Thomas Scholtes
aa24fa7c1b
Fix tests on python2.6
2014-09-14 12:34:46 +02:00