[music] Fix getting album when duplicated name
This commit is contained in:
@ -532,13 +532,15 @@ class Album(TimeStampedModel):
|
||||
logger.info(
|
||||
f"Could not find album {name} with artist {artist.name} on musicbrainz"
|
||||
)
|
||||
album, created = Album.objects.get_or_create(
|
||||
name=name,
|
||||
)
|
||||
if created:
|
||||
# album.fix_metadata()
|
||||
# album.fetch_artwork()
|
||||
...
|
||||
album = Album.objects.filter(name=name).first()
|
||||
if not album:
|
||||
album, created = Album.objects.get_or_create(
|
||||
name=name,
|
||||
)
|
||||
if created:
|
||||
# album.fix_metadata()
|
||||
# album.fetch_artwork()
|
||||
...
|
||||
return album
|
||||
|
||||
if not artist:
|
||||
|
||||
Reference in New Issue
Block a user