discogs: remove redundant check for required fields

This commit is contained in:
Šarūnas Nejus
2026-05-16 07:41:49 +01:00
parent 26b26c4baf
commit 69cdd58240
2 changed files with 0 additions and 25 deletions

View File

@@ -345,20 +345,6 @@ class DiscogsPlugin(SearchApiMetadataSourcePlugin[IDResponse]):
)
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
# lacking some of these fields. This function expects at least:
# `artists` (>0), `title`, `id`, `tracklist` (>0)
# https://www.discogs.com/help/doc/submission-guidelines-general-rules
if not all(
[
result.data.get(k)
for k in ["artists", "title", "id", "tracklist"]
]
):
self._log.warning("Release does not contain the required fields")
return None
artist_data = [a.data for a in result.artists]
# Information for the album artist
albumartist = ArtistState.from_config(

View File

@@ -329,17 +329,6 @@ class TestDGAlbumInfo(TestHelper):
assert d.album == "TITLE"
assert len(d.tracks) == 1
def test_parse_release_without_required_fields(self, caplog):
"""Test parsing of a release that does not have the required fields."""
release = Bag(data={}, refresh=lambda *args: None)
with caplog.at_level("DEBUG"):
d = DiscogsPlugin().get_album_info(release)
assert d is None
assert (
"Release does not contain the required fields" in caplog.messages[0]
)
def test_default_genre_style_settings(self):
"""Test genre default settings, genres to genre, styles to style"""
release = self._make_release_from_positions(["1", "2"])