Add generalized cover field for scobblable things

This commit is contained in:
2023-03-22 18:27:04 -04:00
parent bc59ff66eb
commit 15be4e0068
11 changed files with 680 additions and 13 deletions

View File

@ -82,6 +82,13 @@ class Book(LongPlayScrobblableMixin):
def subtitle(self):
return f" by {self.author}"
@property
def primary_image_url(self) -> str:
url = ""
if self.cover:
url = self.cover.url
return url
def get_start_url(self):
return reverse("scrobbles:start", kwargs={"uuid": self.uuid})