[music] Fix getting album metadata
This commit is contained in:
@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user