From 49080289853f65cfbfb7d4aebfbf61aed864ede0 Mon Sep 17 00:00:00 2001 From: Guilherme Danno Date: Tue, 30 Jul 2019 16:46:59 -0300 Subject: [PATCH 1/2] Use the 'resource_url' from discogs_client --- beetsplug/discogs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py index 3ba68e2ce..37ff68fa4 100644 --- a/beetsplug/discogs.py +++ b/beetsplug/discogs.py @@ -208,7 +208,8 @@ class DiscogsPlugin(BeetsPlugin): getattr(result, 'title') except DiscogsAPIError as e: if e.status_code != 404: - self._log.debug(u'API Error: {0} (query: {1})', e, result._uri) + self._log.debug(u'API Error: {0} (query: {1})', e, + result.data['resource_url']) if e.status_code == 401: self.reset_auth() return self.album_for_id(album_id) @@ -260,7 +261,8 @@ class DiscogsPlugin(BeetsPlugin): return year except DiscogsAPIError as e: if e.status_code != 404: - self._log.debug(u'API Error: {0} (query: {1})', e, result._uri) + self._log.debug(u'API Error: {0} (query: {1})', e, + result.data['resource_url']) if e.status_code == 401: self.reset_auth() return self.get_master_year(master_id) From 63594386c2ac35c7af1c70f1d1b8850e46b30f78 Mon Sep 17 00:00:00 2001 From: Guilherme Danno Date: Tue, 30 Jul 2019 17:01:55 -0300 Subject: [PATCH 2/2] Add the changelog --- docs/changelog.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index b5a500fda..0252104fe 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -79,6 +79,9 @@ Fixes: :bug:`3301` * :doc:`plugins/replaygain`: Fix the storage format in R128 gain tags. :bug:`3311` :bug:`3314` +* :doc:`/plugins/discogs`: Fixed a crash that occurred when the Master URI + isn't set + :bug:`2965` :bug:`3239` For plugin developers: