[scrobbles] Fix ntfy formatting

This commit is contained in:
2024-11-05 16:27:16 -05:00
parent 622a30899f
commit f3c0d20268
16 changed files with 71 additions and 46 deletions

View File

@ -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: