From 71af5c04fc62a955712bc732b68c10c562d118c4 Mon Sep 17 00:00:00 2001 From: Mark Trolley Date: Sat, 27 Jun 2020 16:26:05 -0400 Subject: [PATCH 1/3] Revert "Thanks & bug link for #3637" This reverts commit db181d35fb83339f1d24eeacba0a44f1edeb4740. --- docs/changelog.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 112fdf23d..5bc5c59cc 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -217,8 +217,6 @@ Fixes: * :doc:`/plugins/fetchart`: Fetch pre-resized thumbnails from Cover Art Archive if the ``maxwidth`` option matches one of the sizes supported by the Cover Art Archive API. - Thanks to :user:`trolley`. - :bug:`3637` For plugin developers: From 3232a5b8b74134447f5dbaaefa7be5bd05147755 Mon Sep 17 00:00:00 2001 From: Mark Trolley Date: Sat, 27 Jun 2020 16:26:20 -0400 Subject: [PATCH 2/3] Revert "Indentation fix" This reverts commit 1e527ed4e52bad174f56cc2223bbb5ba4dc59ff1. --- beetsplug/fetchart.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index ebe343e82..ad90b380c 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -333,8 +333,7 @@ class CoverArtArchive(RemoteArtSource): if 'release' in self.match_by and album.mb_albumid: yield self._candidate( url=release_url.format(mbid=album.mb_albumid), - match=Candidate.MATCH_EXACT, - ) + match=Candidate.MATCH_EXACT) if 'releasegroup' in self.match_by and album.mb_releasegroupid: yield self._candidate( url=group_url.format(mbid=album.mb_releasegroupid), From a4c647be461b56458a54fc1d7c74376a393cb60f Mon Sep 17 00:00:00 2001 From: Mark Trolley Date: Sat, 27 Jun 2020 16:26:52 -0400 Subject: [PATCH 3/3] Revert "fetchart: Use Cover Art Archive thumbnails" This reverts commit 2131f6f7d95a1c3bee17f878298ba217ea508c39. --- beetsplug/fetchart.py | 20 +++----------------- docs/changelog.rst | 3 --- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index ad90b380c..70477a624 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -317,26 +317,12 @@ class CoverArtArchive(RemoteArtSource): """Return the Cover Art Archive and Cover Art Archive release group URLs using album MusicBrainz release ID and release group ID. """ - - # Cover Art Archive API offers pre-resized thumbnails at several sizes. - # If the maxwidth config matches one of the already available sizes - # fetch it directly intead of fetching the full sized image and - # resizing it. - release_url = self.URL - group_url = self.GROUP_URL - valid_thumbnail_sizes = [250, 500, 1200] - if plugin.maxwidth in valid_thumbnail_sizes: - size_suffix = "-" + str(plugin.maxwidth) - release_url += size_suffix - group_url += size_suffix - if 'release' in self.match_by and album.mb_albumid: - yield self._candidate( - url=release_url.format(mbid=album.mb_albumid), - match=Candidate.MATCH_EXACT) + yield self._candidate(url=self.URL.format(mbid=album.mb_albumid), + match=Candidate.MATCH_EXACT) if 'releasegroup' in self.match_by and album.mb_releasegroupid: yield self._candidate( - url=group_url.format(mbid=album.mb_releasegroupid), + url=self.GROUP_URL.format(mbid=album.mb_releasegroupid), match=Candidate.MATCH_FALLBACK) diff --git a/docs/changelog.rst b/docs/changelog.rst index 5bc5c59cc..453d22305 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -214,9 +214,6 @@ Fixes: results or fetched lyrics :bug:`2805` * Adapt to breaking changes in Python's ``ast`` module in 3.8 -* :doc:`/plugins/fetchart`: Fetch pre-resized thumbnails from Cover Art Archive - if the ``maxwidth`` option matches one of the sizes supported by the Cover - Art Archive API. For plugin developers: