beets/beetsplug
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
..
bpd Increment playlist_version when a track is consumed. 2019-11-24 19:27:09 -08:00
lastgenre lastgenre: Make TitleCasing optional 2020-12-15 23:37:16 +00:00
metasync feat: added github actions 2020-05-25 19:35:15 -04:00
web Fix lint errors 2020-09-20 11:30:12 +10:00
__init__.py
absubmit.py util.command_output: return stderr, too 2019-07-14 18:32:59 +02:00
acousticbrainz.py Issue #2860 Fetch more acousticbrainz fields 2019-07-23 20:25:26 -04:00
badfiles.py confit: replace with confuse in plugins 2019-06-01 10:03:41 +10:00
beatport.py add the extra_tags option to all required plugins 2020-03-28 17:36:02 +10:00
bench.py
bpm.py
bpsync.py Improve documentation 2019-10-05 15:07:20 -07:00
bucket.py Resolve W605: invalid escape sequence 2018-08-13 10:41:01 -04:00
chroma.py Fixes #3834: 2021-01-19 22:05:34 +00:00
convert.py convert: uses new par_map to work in parallel (#3830) 2021-01-19 18:47:02 +01:00
cue.py reintroduce default arguments, adapt all occurences of TrackInfo and AlbumInfo to the absence of positional arguments 2020-04-27 11:21:13 +02:00
deezer.py Guard against "empty" albums 2019-10-05 23:12:53 -07:00
discogs.py Cosmetic fix 2021-01-05 16:15:50 +01:00
duplicates.py util.command_output: return stderr, too 2019-07-14 18:32:59 +02:00
edit.py Replace more instances of unsafe calls to yaml.load 2019-04-20 01:14:15 +02:00
embedart.py Default quality to 0 which means don't specify 2020-02-18 14:50:57 -05:00
embyupdate.py
export.py export: Add --format=jsonlines option 2020-10-02 12:41:29 +02:00
fetchart.py fetchart/artresizer: add max_filesize support (#3560) 2021-03-23 12:00:14 +01:00
filefilter.py Fix incorrect indentation 2019-01-31 00:15:42 +00:00
fish.py Fix escape helper in fish completion plugin 2020-12-16 02:15:26 -05:00
freedesktop.py
fromfilename.py
ftintitle.py Fix #2817: drop in configuration was ignored 2018-02-23 18:18:32 -05:00
fuzzy.py
gmusic.py gmusic: Fix compatibility with gmusicapi>=12.0.0 2019-05-18 16:32:56 -04:00
hook.py Switch to using check_call for hooks 2019-10-17 11:00:59 +01:00
ihate.py
importadded.py beetsplug/importadded: Add missing path kwarg to update_after_write_time() 2019-06-07 14:17:39 +02:00
importfeeds.py
info.py mediafile: import from standalone module 2019-05-29 09:35:14 +10:00
inline.py inline: Fix a ridiculously subtle flexattr bug 2019-06-01 12:28:47 -04:00
ipfs.py Merge pull request #2554 from musoke/python3-plugin-ipfs 2020-07-14 06:58:20 -04:00
keyfinder.py Fix line length 2020-12-07 22:11:08 -05:00
kodiupdate.py
lastimport.py Update a lot of URLs to use HTTPS 2019-06-05 03:11:49 +02:00
loadext.py Add loadext plugin 2019-04-21 15:10:28 +01:00
lyrics.py Adjust comment to pass lint test 2020-11-07 21:48:21 +00:00
mbcollection.py mbcollection: Make sure missing albums are removed from collections correctly. 2018-02-23 12:34:33 +00:00
mbsubmit.py Update a lot of URLs to use HTTPS 2019-06-05 03:11:49 +02:00
mbsync.py Improve documentation 2019-10-05 15:07:20 -07:00
missing.py
mpdstats.py Add python version check 2021-01-06 10:33:50 -05:00
mpdupdate.py mpdupdate: use MPD_PORT env variable 2019-04-19 17:35:42 +10:00
parentwork.py small problem with parent composer 2020-08-09 18:56:52 +02:00
permissions.py
play.py Add ability for play plugin to emit utf8 BOM 2018-06-08 23:26:48 -06:00
playlist.py un-ignore E221 2020-07-11 18:33:08 -07:00
plexupdate.py Rename use_secure to secure and add to changelog 2020-06-08 20:19:19 -04:00
random.py random: beets.util.random -> beets.random 2019-04-07 18:46:11 +10:00
replaygain.py Removes support for bs1770gain. 2021-01-27 17:42:18 -08:00
rewrite.py
scrub.py mediafile: import from standalone module 2019-05-29 09:35:14 +10:00
smartplaylist.py fix: revert flake8 change 2020-06-04 02:09:04 -04:00
sonosupdate.py Remove unused import. 2018-04-20 08:25:08 +02:00
spotify.py Integrate MetadataSourcePlugin 2019-09-15 15:59:24 -07:00
subsonicplaylist.py style: flake8 linting 2020-05-25 20:06:43 -04:00
subsonicupdate.py style: whitespace fix, remove unnecessary parenthesis 2021-01-19 19:09:30 +01:00
the.py fix regex, add test and changelog entry 2020-07-30 22:42:31 +02:00
thumbnails.py Fix thumbnail plugin pathlib bug (#3360) 2020-07-15 21:00:50 -05:00
types.py confit: replace with confuse in plugins 2019-06-01 10:03:41 +10:00
unimported.py improvements from review #2 2019-10-15 21:54:35 +02:00
zero.py confit: replace with confuse in plugins 2019-06-01 10:03:41 +10:00