diff --git a/vrobbler/apps/music/models.py b/vrobbler/apps/music/models.py index 6ceaf56..9903bc2 100644 --- a/vrobbler/apps/music/models.py +++ b/vrobbler/apps/music/models.py @@ -307,8 +307,15 @@ class Album(TimeStampedModel): self.save(update_fields=["album_artist"]) def scrape_allmusic(self, force=False) -> None: + if not self.name: + logger.warning( + "Album without a name cannot be scraped", + extra={"album_id": self.id}, + ) + return + if not self.allmusic_id or force: - slug = get_allmusic_slug(self.name, self.album_artist.name) + slug = get_allmusic_slug(self.album_artist.name, self.name) if not slug: logger.info( f"No allmsuic link for {self} by {self.album_artist}"