diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py index 9765f317f..ac7421c5f 100644 --- a/beetsplug/discogs.py +++ b/beetsplug/discogs.py @@ -305,7 +305,14 @@ class DiscogsPlugin(MetadataSourcePlugin): # Explicitly reload the `Release` fields, as they might not be yet # present if the result is from a `discogs_client.search()`. if not result.data.get("artists"): - result.refresh() + try: + result.refresh() + except CONNECTION_ERRORS: + self._log.debug( + "Connection error in release lookup: {0}", + result, + ) + return None # Sanity check for required fields. The list of required fields is # defined at Guideline 1.3.1.a, but in practice some releases might be diff --git a/docs/changelog.rst b/docs/changelog.rst index 24938a391..12454d154 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -55,6 +55,8 @@ Bug fixes: e.g. non latin characters as 盗作. If you want to keep the legacy behavior set the config option ``spotify.search_query_ascii: yes``. :bug:`5699` +* :doc:`plugins/discogs`: Beets will no longer crash if a release has been + deleted, and returns a 404. For packagers: