mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-06-21 12:38:23 +02:00
Import 45 RPM vinyles
This commit is contained in:
@ -34,14 +34,15 @@ class Command(BaseCommand):
|
||||
continue
|
||||
|
||||
side = vinyle[0]
|
||||
title = vinyle[1]
|
||||
authors_str = vinyle[2].split('|')
|
||||
title = vinyle[1 if rpm == 33 else 2]
|
||||
authors_str = vinyle[2 if rpm == 33 else 1]\
|
||||
.split('|' if rpm == 33 else ';')
|
||||
authors = [Auteur.objects.get_or_create(name=author)[0]
|
||||
for author in authors_str]
|
||||
vinyle, created = Vinyle.objects.get_or_create(
|
||||
title=title,
|
||||
side_identifier=side,
|
||||
rp=rpm,
|
||||
rpm=rpm,
|
||||
)
|
||||
vinyle.authors.set(authors)
|
||||
vinyle.save()
|
||||
|
Reference in New Issue
Block a user