[notifications] Fixes missing title
This commit is contained in:
@ -8,6 +8,7 @@ class Notification(ABC):
|
|||||||
scrobble: "Scrobble"
|
scrobble: "Scrobble"
|
||||||
ntfy_headers: dict = {}
|
ntfy_headers: dict = {}
|
||||||
ntfy_url: str = ""
|
ntfy_url: str = ""
|
||||||
|
title: str = ""
|
||||||
|
|
||||||
def __init__(self, scrobble: "Scrobble"):
|
def __init__(self, scrobble: "Scrobble"):
|
||||||
self.scrobble = scrobble
|
self.scrobble = scrobble
|
||||||
@ -29,6 +30,7 @@ class NtfyNotification(Notification):
|
|||||||
super().__init__(scrobble)
|
super().__init__(scrobble)
|
||||||
self.ntfy_str: str = f"{self.scrobble.media_obj}"
|
self.ntfy_str: str = f"{self.scrobble.media_obj}"
|
||||||
self.click_url = self.url_tmpl.format(path=self.media_obj.get_absolute_url())
|
self.click_url = self.url_tmpl.format(path=self.media_obj.get_absolute_url())
|
||||||
|
self.title = self.media_obj.strings.verb
|
||||||
if kwargs.get("end", False):
|
if kwargs.get("end", False):
|
||||||
self.click_url = self.url_tmpl.format(path=self.scrobble.finish_url)
|
self.click_url = self.url_tmpl.format(path=self.scrobble.finish_url)
|
||||||
self.title = "Finish " + self.media_obj.strings.verb.lower() + "?"
|
self.title = "Finish " + self.media_obj.strings.verb.lower() + "?"
|
||||||
|
|||||||
Reference in New Issue
Block a user