[notfications] Dont send ntfy on non-titled geolocations
All checks were successful
build / test (push) Successful in 2m7s
All checks were successful
build / test (push) Successful in 2m7s
This commit is contained in:
39
PROJECT.org
39
PROJECT.org
@ -93,7 +93,7 @@ fetching and simple saving.
|
|||||||
:LOGBOOK:
|
:LOGBOOK:
|
||||||
CLOCK: [2025-07-09 Wed 09:55]--[2025-07-09 Wed 10:15] => 0:20
|
CLOCK: [2025-07-09 Wed 09:55]--[2025-07-09 Wed 10:15] => 0:20
|
||||||
:END:
|
:END:
|
||||||
* Backlog [1/15] :vrobbler:project:personal:
|
* Backlog [2/18] :vrobbler:project:personal:
|
||||||
** TODO [#C] Add sentiment parsing for Scrobbles with notes :vrobbler:project:scrobbles:sentiment:
|
** TODO [#C] Add sentiment parsing for Scrobbles with notes :vrobbler:project:scrobbles:sentiment:
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: 37781d6a-f3b0-48b2-bf98-33c2c791cf85
|
:ID: 37781d6a-f3b0-48b2-bf98-33c2c791cf85
|
||||||
@ -505,6 +505,43 @@ different. And the same for comments. If a comment (by timestamp key) is
|
|||||||
different in the webhook than what's in the scrobble.log, update the comment in
|
different in the webhook than what's in the scrobble.log, update the comment in
|
||||||
the scrobble.log
|
the scrobble.log
|
||||||
|
|
||||||
|
** TODO [#B] For any scrobble detail page with notes display them better :templates:notes:scrobbles:
|
||||||
|
|
||||||
|
*** Description
|
||||||
|
|
||||||
|
Currently notes are displayed as little post-it notes. This is cute, but not terribly useful.
|
||||||
|
|
||||||
|
We should update note rendering to be a simple newest to oldest display in a
|
||||||
|
single column with the timestamp has a small header, and the content rendered as
|
||||||
|
markdown with a small bar or horizontal divider marking them from the next note.
|
||||||
|
|
||||||
|
** TODO [#A] Board game imports send duplicate ntfy message :bug:notifications:boardgames:
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: 8f067432-0399-4b79-9e93-727edcccedbd
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Description
|
||||||
|
|
||||||
|
When a board game scrobble is created via a bgstats import, ntfy messages are
|
||||||
|
sent.
|
||||||
|
|
||||||
|
But right now they are duplicated (two are sent at the same time). Can we review
|
||||||
|
the code to see why this is happening and fix it?
|
||||||
|
|
||||||
|
** DONE [#A] Too many geolocation notifications go out :bug:notifications:geolocations:
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: 6357ad7a-fe4e-49dd-a063-55d87e459c17
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Description
|
||||||
|
|
||||||
|
Currently ntfy gets overwhelemed when there's more than a hundred or so messages left in a queue on a client.
|
||||||
|
|
||||||
|
It would be nice if we could not spam ntfy, and this is especially true with Geolocations, where we really
|
||||||
|
don't need to alert folks unless they have a named Geolocation (has a title). Can we adjust the ntfy
|
||||||
|
sending for Geolocations to only send if the scrobbled location has a title?
|
||||||
|
|
||||||
|
|
||||||
** DONE [#C] Fix bug where Weigh-in imports do not set title :bug:tasks:scale:
|
** DONE [#C] Fix bug where Weigh-in imports do not set title :bug:tasks:scale:
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: 622e354a-8e66-4ecd-9e1c-a53f0a2ec362
|
:ID: 622e354a-8e66-4ecd-9e1c-a53f0a2ec362
|
||||||
|
|||||||
@ -1529,7 +1529,12 @@ class Scrobble(TimeStampedModel):
|
|||||||
scrobble_data: dict,
|
scrobble_data: dict,
|
||||||
) -> "Scrobble":
|
) -> "Scrobble":
|
||||||
scrobble = cls.objects.create(**scrobble_data)
|
scrobble = cls.objects.create(**scrobble_data)
|
||||||
ScrobbleNtfyNotification(scrobble).send()
|
if not (
|
||||||
|
scrobble.media_type == cls.MediaType.GEO_LOCATION
|
||||||
|
and scrobble.media_obj
|
||||||
|
and not scrobble.media_obj.title
|
||||||
|
):
|
||||||
|
ScrobbleNtfyNotification(scrobble).send()
|
||||||
return scrobble
|
return scrobble
|
||||||
|
|
||||||
def stop(self, timestamp=None, force_finish=False) -> None:
|
def stop(self, timestamp=None, force_finish=False) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user