The library mode was slow due to use of item.formatted(), which
runs multiple database queries per item. The --include-keys option
didn't help because it filtered the after the queries had already
happened.
This commit reworks filtering so that we only query the fields
that the user requests. In many cases this can dramatically speed up
execution.
Before:
> /usr/bin/time beet export -l Bob Dylan > /dev/null
13.42user 21.56system 0:35.71elapsed 97%CPU (0avgtext+0avgdata 52396maxresident)k
> /usr/bin/time beet export -l -i artist,title,path Bob Dylan > /dev/null
13.25user 21.17system 0:35.14elapsed 97%CPU (0avgtext+0avgdata 52112maxresident)k
After:
> /usr/bin/time beet export -l Bob Dylan > /dev/null
1.46user 0.09system 0:01.60elapsed 97%CPU (0avgtext+0avgdata 51188maxresident)k
> /usr/bin/time beet export -l -i artist,title,path Bob Dylan > /dev/null
0.50user 0.07system 0:00.58elapsed 97%CPU (0avgtext+0avgdata 50632maxresident)k
This adds support for the JSON Lines format as documented at
https://jsonlines.org/.
In this mode the data is output incrementally, whereas the other
modes load every item into memory and don't produce output until
the end.
* fetchart: Improve Cover Art Archive source.
Instead of blindly selecting the first image, we now treat all "front"
images as candidates.
This is useful where some digital releases have both an animated cover
and a still image and the animated image is the first image returned
from the API.
The previous test worked (on my machine, and on Github CI and AppVeyor),
but it is not obvious whether the order is really guaranteed (given that
the full beets database stack and sqlite are involved). Thus, to prevent
this from exploding at some point, only verify the number of deletions
for now.
MPD keeps the current track in the queue when stopping, so it's not
really like a skip, and I use it so that I can stop the music, and later
start at the beginning of a track.
I do this by keeping track of the current song id, and then comparing
them when we receive a stop signal.
* If import move is true, files will be deleted after converting.
Fixes#2947
* Removed trailing whitespace to comply with W293, fixing build
* Add period to the end of the comment
Co-Authored-By: Adrian Sampson <adrian@radbox.org>
* Added changelog entry for this fix.
* Added delete_originals option to remove source files after transcode
* Added unit test, removed redundant syspath call
Co-authored-by: Logan Arens <logan-arens@users.noreply.github.com>
Co-authored-by: Logan Arens <heresmygithub@protonmail.com>
Co-authored-by: Adrian Sampson <adrian@radbox.org>
Co-authored-by: Logan Arens <logan.arens@protonmail.com>
I think the basics sections is fairly self explanatory at this point especially with the copious amounts of examples we have. Also, if we kept it, we'd have to expand on pytest basics as well. I'd rather just point to the docs/getting started guides for each.