[scrobbles] Fix ntfy formatting
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
from dataclasses import dataclass
|
||||
import logging
|
||||
from typing import Optional
|
||||
from uuid import uuid4
|
||||
@ -16,6 +17,23 @@ BNULL = {"blank": True, "null": True}
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ScrobblableConstants:
|
||||
verb: str
|
||||
tags: str
|
||||
priority: str
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
verb: str = "Scrobbling",
|
||||
tags: str = "green_square",
|
||||
priority: str = "default",
|
||||
):
|
||||
self.verb = verb
|
||||
self.tags = tags
|
||||
self.priority = priority
|
||||
|
||||
|
||||
class Genre(TagBase):
|
||||
source = models.CharField(max_length=255, **BNULL)
|
||||
|
||||
@ -81,8 +99,8 @@ class ScrobblableMixin(TimeStampedModel):
|
||||
return reverse("scrobbles:start", kwargs={"uuid": self.uuid})
|
||||
|
||||
@property
|
||||
def verb(self) -> str:
|
||||
return "Scrobbling"
|
||||
def strings(self) -> ScrobblableConstants:
|
||||
return ScrobblableConstants()
|
||||
|
||||
@property
|
||||
def primary_image_url(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user