Commit graph

85 commits

Author SHA1 Message Date
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
chipsnblip
30173b7331
update link to current homepage
update link from non-existent page (https://2.python-requests.org/en/latest/) to the plugin's current homepage: https://requests.readthedocs.io/en/master/
2020-07-26 13:50:05 -07:00
Kylie McClain
1c03f58e0d
fetchart: improve description of -q flag 2020-04-19 14:56:15 -04:00
Jack Wilsdon
333d5d1dd3
fetchart: Add Last.fm artwork source 2020-03-30 20:20:59 +01:00
Adrian Sampson
00c6d1439e Docs tweaks for #3493 2020-02-26 19:15:44 -08:00
Daniel Barber
a9e11fcfeb Add some info about valid quality levels 2020-02-26 19:23:59 -05:00
Daniel Barber
fe8ba17ced Add quality setting to fetchart plugin 2020-02-22 13:36:35 -05:00
Mat
7ad3f7f728
Apply suggestions from code review
Fix wording in docs

Co-Authored-By: Adrian Sampson <adrian@radbox.org>
2019-12-26 21:09:26 +00:00
Mat
3570f5cd56 New high_resolution config option in fetchart 2019-12-26 17:36:56 +00:00
FichteFoll
aa31fea037
Update a lot of URLs to use HTTPS
*All* URLs were checked manually, but only once per domain!

I mostly concerned myself with URLs in documentation rather than source
code because the latter may or may not have impactful changes, while the
former should be straight forward.

Changes in addition to simply adding an s:

- changed pip and pypi references as their location has changed
- MPoD (iOS app) url redirects to Regelian, so I replaced those
- updated homebrew references

Notable observations:

- beets.io does have HTTPS set up properly (via gh-pages)
- beatport.py uses the old HTTP url for beatport
- as does lyrics.py for lyrics.wikia.com
- https://tomahawk-player.org/ expired long ago, but the http page
  redirects to https regardless
- none of the sourceforge subdomains have https (in 2019!)
2019-06-05 03:11:49 +02:00
Carl Suster
2e0230789f docs: fix some markup issues and typos 2019-04-27 12:43:13 +10:00
Adrian Sampson
c99bde4786
Fix a typo 2018-08-15 10:31:40 -04:00
nath@home
ff6306b663 Changelog for #2718
Reverts 49e548bd from #2540
Fixes #2371 #2551
2018-08-15 15:21:18 +02:00
Adrian Sampson
1254d48b72 Revise docs for #2739 2018-02-24 10:42:32 -05:00
wisp3rwind
db85c28c7f Advanced fetchart source config: documentation 2018-02-24 11:26:50 +01:00
wisp3rwind
dee2885457 docs/plugins/fetchart: fix internal link target location 2018-02-24 11:26:50 +01:00
translit
abefae12a0
Update fetchart.rst 2017-11-01 08:06:30 +01:00
euri10
25fb2453b4 Modified the name of the fetchart plugin switch from missing to quiet 2017-09-05 18:27:47 +02:00
euri10
b2fd274e2c Added a missing switch to the fetchart command so that only missing albums
are displayed
2017-09-05 16:34:26 +02:00
Fabrice Laporte
e7ea7ab5f2 Update fetchart.rst 2017-05-03 20:04:02 +02:00
Wolf
49e548bdbc Remove mention of python-itunes
The plugin is inactive and has been broken for months: https://github.com/beetbox/beets/issues/2371

Fixes https://github.com/beetbox/beets/issues/1610
2017-05-02 22:36:26 -04:00
Adrian Sampson
3f78578a88 Fix links to pip 2016-12-09 09:26:58 -05:00
Nathan Musoke
0701e66391 Fix rst syntax error in docs 2016-11-29 12:11:12 +13:00
Johnny Robeson
21cfe980ec remove some trailing whitespace 2016-07-27 02:57:04 -04:00
Johnny Robeson
01483f9600 change most googlecode refs to their new locations 2016-07-27 02:57:04 -04:00
wordofglass
e2c6547635 fetchart: Clarify the deprecation of remote_priority in docs and
warning, closes #2092
2016-06-29 19:18:06 +02:00
wordofglass
5fbca32ea4 reuse the 'sources' names from the configuration for art_source 2016-04-19 11:25:03 +02:00
wordofglass
7a9c3e592b document values written to art_source 2016-04-19 11:25:03 +02:00
wordofglass
740efc0a0e small fixes; consistently use 'source' instead of 'origin' 2016-04-19 11:23:57 +02:00
wordofglass
c27907b043 enable fetchart to store the artworks origin in a flexible field; as of now untested 2016-04-19 11:23:42 +02:00
wordofglass
93267639e4 update docs for enforce_ratio 2016-04-18 15:32:09 +02:00
wordofglass
9ce10c2fda Merge branch 'master' into fetchart_unify_sources,
i.e. adapt the fanart.tv source
2016-04-16 13:34:46 +02:00
wordofglass
87aa5dab13 fixes according to feedback by @Kraymer 2016-04-15 14:15:25 +02:00
wordofglass
2dfdc8b90a fix doc formatting 2016-04-15 02:47:56 +02:00
wordofglass
d46b45861b typo, rename project key config option 2016-04-15 02:40:52 +02:00
wordofglass
8a8b8f832a Update Documentation for fanart.tv 2016-04-15 02:29:00 +02:00
wordofglass
1cfd039da4 Update fetchart documentation. 2016-03-22 21:09:05 +01:00
Lachlan Charlick
0d16f764f2 fetchart: Tidier google backend configuration keys 2015-12-30 13:34:58 +10:30
Lachlan Charlick
e771f34dfd fetchart: Add documentation for new google backend 2015-12-29 17:31:40 +10:30
Adrian Sampson
5597313ea0 fetchart: Remove Google backend (fix #1760) 2015-12-12 16:47:00 -08:00
Adrian Sampson
37250ef27b fetchart: Fix #1610: itunes install docs 2015-12-12 16:40:42 -08:00
Kai
61e992fd47 Replace PIL with Pillow 2015-11-15 04:25:42 +01:00
Adrian Sampson
9ce49b7ef0 fetchart: Do not emable Wikipedia by default
Because DBpedia seems to be down (it's responding very slowly with errors),
this seems like a good defensive action. It narrows the default sources to
those that resolve quickly, with only a couple of HTTP requests. We can
re-enable this again in the future if things seem to stabilize over at
DBpedia.
2015-08-29 12:52:57 -07:00
Adrian Sampson
608e4ffbef fetchart: Lots more logging 2015-08-29 11:59:46 -07:00
Adrian Sampson
2b1d7fc3aa fetchart: Logging, naming, remove unused option 2015-08-29 11:31:59 -07:00
Tom Jaspers
a82dee35cb fetchart complains if no imaging backend available
The `enforce_ratio` and `minwidth` options depend on PIL or ImageMagick.
Previously it silently fails. Now it will log a warning, and accept the
image.

Tests concerning these options are skipped when no imaging backend is available.

Fix #1460
2015-05-18 19:44:40 +02:00
Tom Jaspers
b5ec26c949 Fetchart: minwidth & enforce_ratio options
- Minimum image width can be specified via minwidth (default `0`)
- The image ratio can be enforced to 1:1 using `enforce_ratio` (default `no`)

See #1058
2015-04-04 20:52:08 +02:00
Adrian Sampson
b5c4edaaf5 Changelog for Wikipedia fetchart backend (#1194) 2015-01-25 13:00:58 -08:00
Tom Jaspers
1a799bb77f Fetchart: update documentation to reflect that Wikipedia is now also used as a source 2015-01-18 15:13:27 +01:00
Adrian Sampson
d3f0742276 Changelog, tweaks for fetchart sources (#1075) 2014-11-11 10:10:43 -08:00