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