[notifications] Fix finish url being on media

This commit is contained in:
2024-11-24 09:59:18 -05:00
parent 50ec82213c
commit b788cc65d1
2 changed files with 4 additions and 4 deletions

View File

@ -99,10 +99,6 @@ class ScrobblableMixin(TimeStampedModel):
def start_url(self): def start_url(self):
return reverse("scrobbles:start", kwargs={"uuid": self.uuid}) return reverse("scrobbles:start", kwargs={"uuid": self.uuid})
@property
def finish_url(self) -> str:
return reverse("scrobbles:finish", kwargs={"uuid": self.uuid})
@property @property
def strings(self) -> ScrobblableConstants: def strings(self) -> ScrobblableConstants:
return ScrobblableConstants() return ScrobblableConstants()

View File

@ -604,6 +604,10 @@ class Scrobble(TimeStampedModel):
id=self.logdata.serial_scrobble_id id=self.logdata.serial_scrobble_id
).first() ).first()
@property
def finish_url(self) -> str:
return reverse("scrobbles:finish", kwargs={"uuid": self.uuid})
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
if not self.uuid: if not self.uuid:
self.uuid = uuid4() self.uuid = uuid4()