Commit Graph
2339 Commits
Author SHA1 Message Date
Andrew Rogl 237bd07508 Address feedback from @sampsyo 2021-09-28 18:05:44 +10:00
Andrew Rogl ac6cc2ffa4 Fix up invalid master merges 2021-09-26 17:33:15 +10:00
Andrew Rogl ed07bb5b7e Merge branch 'master' into pyupgrade 2021-09-26 17:22:15 +10:00
Andrew Rogl d9be9a0d9b MIssed another new file 2021-09-26 17:08:57 +10:00
Andrew Rogl 5859d31405 Commit #4036 2021-09-26 16:41:13 +10:00
Andrew Rogl 8205b901db Commits #4048 & #4050 2021-09-26 16:03:00 +10:00
Andrew Rogl f04059bfee Commit #4038 2021-09-26 15:54:13 +10:00
Duncan Overbruck f5e336747a Add permissions test case for set_art event 2021-09-12 16:40:58 +02:00
Edgars Supe d40f0c8860 Fill default config for albumtypes plugin 2021-09-10 14:48:28 +03:00
Edgars Supe 6fdc505798 Add tests for albumtypes plugin 2021-09-09 23:07:11 +03:00
Jack Wilsdon 0ed2fbc7b0 Tidy up plugins in ui config tests
Some of these tests load plugins using beets' normal plugin loader, but
didn't call unload_plugins to tidy up afterwards. This led to any future
plugin loads being ignored until the next unload_plugins call.

This commit changes the config tests so that we always call load_plugins
on setup (to store the default beets state) and unload_plugins on
teardown (to restore the previously stored state).
2021-08-31 21:28:03 +01:00
Andrew Rogl 9106b41a50 Remove as many as possible sys.version tests 2021-08-27 10:24:27 +10:00
Andrew Rogl ee4268dabb Remove unused imports
Fix imports
Fix formatting
2021-08-26 20:59:48 +10:00
Andrew Rogl 0f48ccde78 Final pyupgrade 2021-08-26 20:14:08 +10:00
Andrew Rogl 1ec87a3bdd pyupgrade beetsplug and tests
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
Adrian Sampson ea3a6e5fd7 Skip some more tests on Windows
We should actually fix these, I suppose!
2021-08-21 13:35:28 -04:00
Adrian Sampson f545cd3830 Remove unused import 2021-08-19 17:02:28 -04:00
Adrian Sampson af1eaf5062 Merge remote-tracking branch 'origin/windows-ci' into drop-py2 2021-08-19 16:48:46 -04:00
Adrian Sampson 75c41c0546 Remove most six.PY2 checks 2021-08-19 16:45:11 -04:00
Andrew Sultana 86e11fb582 template: fix ifdef bug #3852 involving non-string fields with missing values 2021-06-16 16:49:16 +01:00
Jack Wilsdon 6a98e5d8db Add missing test data for tekstowo 2021-05-24 18:20:33 +01:00
Benedikt eef26d1886 Merge pull request #3927 from bertbesser/set-fields-persist-to-tracks
persist set_fields to media files
2021-05-14 10:51:34 +02:00
Bert Besser 8dc960b1f6 fix: formatting 2021-05-14 10:19:59 +02:00
Bert Besser e98f78e29b fix: transactions and stricter tests 2021-05-13 15:09:55 +02:00
sandersantema 51b22a41f0 Add tests for new itunes_dateadded function of metasync plugin 2021-05-13 12:42:59 +02:00
bertbesser a25a2a6cbb Merge branch 'master' into set-fields-persist-to-tracks 2021-05-13 07:38:26 +02:00
Andrew Rogl 533559136e Add 7z file support #3906 2021-05-07 22:04:46 +10:00
Bert Besser 9cbbc35a95 persist set_fields to media files 2021-05-06 19:55:12 +02:00
Sam Thursfield 2fa3717731 Optimise FormattedMapping when querying a specific set of fields
This changes greatly improves the speed of `beet export` and `beet info`
when the `--include-keys` option is used. It also removes the globbing
feature of `--include-keys` that was added in #1295. (See #3762 for
discussion).

Listing all fields for an item requires querying the database to find
any flex attributes. This is slow when done for every item being
exported. We already have a way for the user to specify a fixed set
of keys, but we previously queried everything and filtered it afterwards.
The new approach is more efficient.

Code that iterates through all fields now have to handle invalid field
names. The export and info plugins output invalid fields as None.

Timings before:

    > /usr/bin/time beet export -i title,path,artist -l  Bob Dylan
    13.26user 20.22system 0:34.01elapsed 98%CPU (0avgtext+0avgdata 52544maxresident)k

    > /usr/bin/time beet export -l  Bob Dylan
    12.93user 20.15system 0:33.58elapsed 98%CPU (0avgtext+0avgdata 53632maxresident)k

Timings after:

    > /usr/bin/time beet export -l  Bob Dylan
    13.33user 20.17system 0:34.02elapsed 98%CPU (0avgtext+0avgdata 53500maxresident)k

    > /usr/bin/time beet export -i title,path,artist -l  Bob Dylan
    0.49user 0.07system 0:00.56elapsed 98%CPU (0avgtext+0avgdata 50496maxresident)k

Notice the dramatic speedup in the last example!
2021-05-01 23:41:09 +02:00
Xavier Hocquet 8c6530369d Merge branch 'master' into tekstowo-lyrics 2021-03-28 12:05:42 -06:00
wisp3rwind 9a6b65351b Merge pull request #3560 from davidswarbrick/master
Album Art Resize to filesize
2021-03-23 12:15:51 +01:00
David Swarbrick 07b5e69f40 fetchart/artresizer: add max_filesize support (#3560)
Squashed from the PR, relevant commit messages follow below:

Added file size option to artresizer

 - In line with comments on PR, adjusted the ArtResizer API to add
   functionality to "resize to X bytes" through `max_filesize` arg

 - Adjustment to changelog.rst to include max_filesize change to ArtResizer
   and addition of new plugin.

Added explicit tests for PIL & Imagemagick Methods

 - Checks new resizing functions do reduce the filesize of images

Expose max_filesize logic to fetchart plugin

- Add syspath escaping for OS cross compatibility
- Return smaller PIL image even if max filesize not reached.
- Test resize logic against known smaller filesize (//2)
- Pass integer (not float) quality argument to PIL
- Remove Pillow from dependencies
- Implement "max_filesize" fetchart option, including
  logic to resize and rescale if maxwidth is also set.

Added tests & documentation for fetchart additions.

Tests now check that a target filesize is reached with a
higher initial quality (a difficult check to pass).

With a starting quality of 95% PIL takes 4 iterations to succeed
in lowering the example cover image to 90% its original size.
To cover all bases, the PIL loop has been changed to 5 iterations
in the worst case, and the documentation altered to reflect the
50% loss in quality this implies. This seems reasonable as users
concerned about performance would most likely be persuaded to
install ImageMagick, or remove the maximum filesize constraint.
The previous 30% figure was arbitrary.
2021-03-23 12:00:14 +01:00
Graham R. Cobb c3485b5b04 Remove unnecessary call to format.
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-16 22:36:42 +00:00
Graham R. Cobb d1ec7b4b70 Add `bareasc` command to display entries with the unidecode transformation
applied.

Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-16 11:57:52 +00:00
Graham R. Cobb fab7a27e9f Add a couple more tests and make lint happy.
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-15 12:43:58 +00:00
Graham R. Cobb dcbe622b76 Oops, use in for matching! (It was late last night!)
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-15 10:25:19 +00:00
Graham R. Cobb 80048e7153 Specify unicode, for python2
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-15 09:11:17 +00:00
Graham R. Cobb 0c612f408b Create plugin for "bare-ASCII" matching query
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-15 00:55:14 +00:00
Graham R. Cobb 4ffe9a2c45 Fixed bug where readonly value was not being read from config file.
Also simplified the setup of the `readonly` value in the tests which
fixes a test ordering issue found using --random-order.

Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-12 17:58:35 +00:00
Graham R. Cobb 23c8d61104 Add tests for patch operations
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-11 22:55:42 +00:00
Graham R. Cobb 51d22b765e Add tests for delete operations
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-11 18:02:38 +00:00
Adrian Sampson 84f6d374c4 Merge pull request #3869 from GrahamCobb/web-regex-fix
Web regex fix
2021-03-10 20:36:03 -05:00
Graham R. Cobb 45cf9d00c7 Improve handling of paths for Windows tests
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-09 18:58:05 +00:00
Graham R. Cobb ab2e858bce Aaargh! Forgot to run lint again
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-09 12:10:40 +00:00
Graham R. Cobb f19faae1dc Attempt to make path-related tests portable to Windows
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-09 11:19:54 +00:00
Graham R. Cobb 4d5c5c02ae Lint fixes
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-08 17:26:04 +00:00
Graham R. Cobb 38fb1b5f08 Add tests for several web queries, including the regex queries fixed in
bugfix #3867.

Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-08 17:00:41 +00:00
Adrian Sampson 09a6ec4f74 Merge branch 'master' into pr/item-album-fallback 2021-03-07 09:20:50 -05:00
Graham R. Cobb 9986b9892c Fix bug where album artpath not returned when INCLUDE_PATHS is set
Track item paths and album artpaths should be removed from results unless
INCLUDE_PATHS is set. This works for items but for albums the artpath is always
removed.

This patch makes the artpath removal conditional on INCLUDE_PATHS not being set
and includes a regression test. Note: the default value for INCLUDE_PATHS is
False so no changes will be seen by users unless they already have
INCLUDE_PATHS set.

Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-06 15:25:48 +00:00
Graham R. Cobb 7d3fb0d7ec Fix lint errors
Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
2021-03-05 16:52:21 +00:00