Finally get to resolve scrobbling music from Jellyfin. This may lead to other issues, in fact now videos seem to sometimes create duplicate scrobbles. But music can be scrobbled now from Jellyfin web or Finamp successfully.
20 lines
586 B
Python
20 lines
586 B
Python
from uuid import uuid4
|
|
|
|
from django.db import models
|
|
from django_extensions.db.models import TimeStampedModel
|
|
|
|
BNULL = {"blank": True, "null": True}
|
|
|
|
|
|
class ScrobblableMixin(TimeStampedModel):
|
|
SECONDS_TO_STALE = 1600
|
|
|
|
uuid = models.UUIDField(default=uuid4, editable=False, **BNULL)
|
|
title = models.CharField(max_length=255, **BNULL)
|
|
run_time = models.CharField(max_length=8, **BNULL)
|
|
run_time_ticks = models.PositiveBigIntegerField(**BNULL)
|
|
# thumbs = models.IntegerField(default=Opinion.NEUTRAL, choices=Opinion.choices)
|
|
|
|
class Meta:
|
|
abstract = True
|