Add podcasts as new media type

This commit is contained in:
2023-01-12 13:52:30 -05:00
parent f435e60b80
commit 8517212d0e
18 changed files with 599 additions and 38 deletions

View File

@ -32,7 +32,7 @@ class Artist(TimeStampedModel):
class Album(TimeStampedModel):
uuid = models.UUIDField(default=uuid4, editable=False, **BNULL)
name = models.CharField(max_length=255)
artists = models.ManyToManyField(Artist, **BNULL)
artists = models.ManyToManyField(Artist)
year = models.IntegerField(**BNULL)
musicbrainz_id = models.CharField(max_length=255, unique=True, **BNULL)
musicbrainz_releasegroup_id = models.CharField(max_length=255, **BNULL)
@ -124,6 +124,7 @@ class Track(TimeStampedModel):
f"No artist or artist musicbrainz ID found in message from source, not scrobbling"
)
return
artist, artist_created = Artist.objects.get_or_create(**artist_dict)
if artist_created:
logger.debug(f"Created new album {artist}")