[scrobbles] Start cleaning up logdata
This commit is contained in:
@ -65,6 +65,10 @@ class ScrobblableMixin(TimeStampedModel):
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
@classmethod
|
||||
def is_long_play_media(cls) -> bool:
|
||||
return False
|
||||
|
||||
def scrobble_for_user(
|
||||
self,
|
||||
user_id,
|
||||
@ -136,6 +140,15 @@ class LongPlayScrobblableMixin(ScrobblableMixin):
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
@classmethod
|
||||
def is_long_play_media(cls) -> bool:
|
||||
return True
|
||||
|
||||
def is_complete(self) -> bool:
|
||||
if self.log:
|
||||
return bool(self.log.get("long_play_complete", None))
|
||||
return False
|
||||
|
||||
def get_longplay_finish_url(self):
|
||||
return reverse("scrobbles:longplay-finish", kwargs={"uuid": self.uuid})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user