Fetchart: Remove hard 500px size limit for CAA cover art.

Using -500 URLs for coverartarchive.org will only ever return images
where the biggest dimension is (width or height) is 500 pixels,
regardless of what fetchart settings are otherwise set.

This commit removes the -500 from the URL entirely rather than using it
conditionally, since a maxwidth of 500 will allow for a 600 high and 500
wide image, but CAA.org/...-500 would return a 500x417 image instead, so
not enforcing a size is the only way to ensure the user's {max,min}width
settings are properly respected.
This commit is contained in:
Frederik “Freso” S. Olesen 2015-04-07 14:54:00 +02:00
parent 5afe2e14aa
commit 0d21e816d4
3 changed files with 5 additions and 3 deletions

View file

@ -57,8 +57,8 @@ class ArtSource(object):
class CoverArtArchive(ArtSource):
"""Cover Art Archive"""
URL = 'http://coverartarchive.org/release/{mbid}/front-500.jpg'
GROUP_URL = 'http://coverartarchive.org/release-group/{mbid}/front-500.jpg'
URL = 'http://coverartarchive.org/release/{mbid}/front'
GROUP_URL = 'http://coverartarchive.org/release-group/{mbid}/front'
def get(self, album):
"""Return the Cover Art Archive and Cover Art Archive release group URLs

View file

@ -11,6 +11,8 @@ Changelog goes here!
* :doc:`/plugins/fetchart`: new settings `minwidth` and `enforce_ratio`
to put restrictions (min width in pixels, and 1:1 image ratio, resp.)
for valid album art candidates. :bug:`1394`
* :dox:`/plugins/fetchart`: Remove hard size limit when fetching from the
CoverArtArchive.
1.3.11 (April 5, 2015)
----------------------

View file

@ -109,7 +109,7 @@ class CombinedTest(UseThePlugin):
.format(ASIN)
AAO_URL = 'http://www.albumart.org/index_detail.php?asin={0}' \
.format(ASIN)
CAA_URL = 'http://coverartarchive.org/release/{0}/front-500.jpg' \
CAA_URL = 'http://coverartarchive.org/release/{0}/front' \
.format(MBID)
def setUp(self):