Commit graph

4336 commits

Author SHA1 Message Date
Adrian Sampson
3ab8107adf Release script: larger prep command 2014-05-07 20:04:20 -07:00
Adrian Sampson
dd11795cbd Release script: datestamp and version commands 2014-05-07 19:46:04 -07:00
Fabrice Laporte
4add189608 Add option to extrapolate year buckets names
- spans are now tracked via a list of dicts instead of 2 lists
previously (simpler code)
- extend_year_spans() pregenerates all possible ranges at plugin setup
stage
- a BucketError is now raised if declared bucket format not accepted
2014-05-08 01:28:17 +02:00
Adrian Sampson
6ecf4ef6ed Release script: upload command 2014-05-06 22:16:19 -07:00
Adrian Sampson
611be7b4b5 Release script: convert changelog to Markdown 2014-05-06 22:06:28 -07:00
Adrian Sampson
d641927ad8 Fix formatted.get calls 2014-05-06 15:57:04 -07:00
Pierre Rust
60160c38a0 Shortcut some tests in Model initialization
When Model objects (Albums and Items) are loaded from the database a lot of time is wasted checking if the object is dirty and if fields are fixed or flexattr.

This change alow bypassing these checks when we know that the data is correct ; it should only be used when loading Model from the database.

With this, listing all tracks in my test database (8200 items) takes 4 seconds while it took 31 seconds previously.
2014-05-07 00:30:39 +02:00
Adrian Sampson
6b3bea99a0 Changelog for faster queries (lazy formatting) 2014-05-06 12:01:13 -07:00
Adrian Sampson
c08e07d31b Property for easy FormattedMapping access 2014-05-06 11:54:56 -07:00
Adrian Sampson
e800b46a5d Make FormattedMapping behave more like a dict
The collections.Mapping abstract base class provides all the nice dict-like
functionality we need.
2014-05-06 11:32:20 -07:00
Adrian Sampson
d30e2f597f Merge pull request #751 from sampsyo/lazy-formatted-mapping
Make _formatted_mapping lazy and an object
2014-05-06 11:16:58 -07:00
Thomas Scholtes
335247481f Make _formatted_mapping lazy and an instance
The motivation for this is to increase the performance of template evalutation.

Previously, the `model._formatted_mapping()` method returned a dictionary that
served as the environment (mapping of variable names to values) when evaluating
a template. To populate the dictionary, we iterated over all keys in the model,
formatted the values, and assigned it to the dictionary. This meant we
formatted every field, even if the template did not require it.

With this commit `_formatted_mapping()` does not return a populated dictionary
but a proxy (or view) instance. The object only knows about the model and the
keys it provides the formatted view for. If a variable is requested by the
template it computes the formatted value on the fly.

The class-based approach has one additional advantage: In the future, we can
separate the formatting logic from the database logic.
2014-05-06 11:24:51 +02:00
Fabrice Laporte
509af59d4e cleanup docstrings and add tests 2014-05-04 08:51:11 +02:00
Fabrice L.
1e7e456f21 Update index.rst
indent line
2014-05-04 08:33:04 +02:00
Fabrice Laporte
a138c4989e include bucket.rst in toc tree 2014-05-04 07:41:02 +02:00
Fabrice L.
8a7f82f354 Update bucket.rst 2014-05-04 07:09:36 +02:00
Fabrice L.
67b3d78b72 Update bucket.rst 2014-05-04 00:04:18 +02:00
Fabrice Laporte
b1d10ed5f9 add bucket plugin doc 2014-05-03 23:48:23 +02:00
Fabrice Laporte
31569baba7 fix range upper bound + tests added 2014-05-03 23:46:31 +02:00
udiboy1209
07b791dbd3 improve detail display and scrollbar in web plugin
Moved track, format, lyrics, etc. to separate div with id 'extra-detail'
so that theses can scroll independent of the main details(Title, Album, Artist).
Split the templates and javascript rendering objects accordingly.

This has a better scrollbar display than the previous commit.
2014-05-03 21:08:07 +05:30
Fabrice Laporte
581bf768ca add buckets plugin + tests
Add a new template functions %bucket(text, field) for path formatting.
2014-05-03 13:55:21 +02:00
udiboy1209
35eb60c393 More elegant fix to line break display problem for lyrics in web plugin
The javascript `replace` method was previously being used, which worked in a hacky way.
But the more elegant way to do it, as suggested by minitech on this question http://stackoverflow.com/questions/23440298 ,
is to use CSS, and make the browser automatically display white-spaces using `white-space: pre-wrap`
2014-05-03 10:31:02 +05:30
Adrian Sampson
066c4e1655 Release script: extract changelog 2014-05-02 14:09:59 -07:00
Adrian Sampson
1613f9b773 Release script: build command 2014-05-02 14:09:59 -07:00
udiboy1209
756f4c4d29 Fix web plugin scroll and lyrics newline bug 2014-05-02 20:54:57 +05:30
Adrian Sampson
064013605a Changelog for #742 2014-05-01 21:16:48 -07:00
Adrian Sampson
27804ce68b Merge pull request #742 from tsigo/rs-before_item_moved-event
Add before_item_moved event
2014-05-01 21:14:37 -07:00
Adrian Sampson
5b671a0465 Start version-number-bumping utility 2014-05-01 17:38:31 -07:00
Robert Speicher
a7c996d3af Add before_item_moved event
This event gets called just before `util.move` with the same arguments
as the `item_moved` event.
2014-05-01 20:38:07 -04:00
Adrian Sampson
6cc643520d Merge branch 'KraYmer-lyrics-integration-sources' 2014-05-01 08:58:07 -07:00
Adrian Sampson
9b160bb81d Travis: YAML syntax
I feel incredibly dumb.
2014-04-29 22:35:34 -07:00
Adrian Sampson
de2b2ad407 Travis: use explicit $COVERAGE variable
This makes the conditionals a little easier to read.
2014-04-29 22:34:09 -07:00
Adrian Sampson
534c57a78c Travis: one more try
This is horrible. Apparently, I need to *only* use `matrix.include`, none of
the other options (which fill out the matrix automatically).
2014-04-29 22:28:19 -07:00
Adrian Sampson
e29cb67c89 Travis: hopefully fix Travis matrix
The documentation here is completely unclear (does "include" exclude
everything else?). I hope this works.
2014-04-29 22:27:13 -07:00
Adrian Sampson
7f69f90462 Travis: deal with new build environments
The latest Travis updates seem to only install the requested Python.
Previously, we assumed we had all Pythons even when the requested Python was
the default.
2014-04-29 22:21:14 -07:00
Adrian Sampson
9101b88499 Slightly shorter description of autotag
Brevity is the soul of documentation.
2014-04-29 21:57:39 -07:00
Adrian Sampson
78dc45c44c Merge pull request #734 from EvanPurkhiser/doc/import.autotag
Document 'import.autotag' configuration
2014-04-29 21:54:37 -07:00
Evan Purkhiser
63fc7e04e6 docs: Document 'import.autotag' configuration 2014-04-30 00:14:49 -04:00
Adrian Sampson
e19632c11d Merge branch 'master' of github.com:sampsyo/beets 2014-04-29 10:23:30 -07:00
Adrian Sampson
54445882d8 replaygain: Log when files are unsupported 2014-04-29 10:23:07 -07:00
Adrian Sampson
362db8f22f Merge pull request #728 from sampsyo/lastgenre-tests-new
Tests for lastgenre (cleaned up)
2014-04-29 08:38:56 -07:00
Adrian Sampson
2fac1567ec Remove redundant quotes in exception
Indicated in #731.
2014-04-29 08:34:56 -07:00
Adrian Sampson
233f71a457 Use real booleans for whitelist/canonical options
As opposed to the strings "true" and "false".
2014-04-28 23:00:00 -07:00
Adrian Sampson
add309b57d Isolate lastgenre tests
We now appropriately set up and tear down the fixture for the lastgenre tests.
(This was causing unpredictable failures elsewhere before.)
2014-04-28 22:35:32 -07:00
Fabrice L.
f6337d2d1f Update lastgenre.rst 2014-04-28 10:44:53 +02:00
Fabrice L.
5a0a97c7e0 undo previous commit (wrong branch) 2014-04-28 10:43:21 +02:00
Fabrice L.
6fff2a5097 Update lastgenre.rst 2014-04-28 10:38:17 +02:00
Fabrice Laporte
ef3c1cd1ff use booleans for whitelist and c14n options
homogenise options setup using booleans, while keeping the empty string
(synonym of ‘true’) for backward compatibility.
2014-04-28 10:31:22 +02:00
Adrian Sampson
d5dbaeff7a lastgenre: Restore default whitelist 2014-04-27 13:54:32 -07:00
Adrian Sampson
dfd9a4c397 Merge branch 'KraYmer-lastgenre-tests-new' into lastgenre-tests-new
Conflicts:
	test/test_lastgenre.py
2014-04-27 13:52:06 -07:00