From 811e9c1ce973af48adbd33cafb074657e91fc281 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Thu, 4 Jun 2026 10:44:21 -0400 Subject: [PATCH] [notfications] Dont send ntfy on non-titled geolocations --- PROJECT.org | 39 ++++++++++++++++++++++++++++++- vrobbler/apps/scrobbles/models.py | 7 +++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/PROJECT.org b/PROJECT.org index ced09a9..f0a1d90 100644 --- a/PROJECT.org +++ b/PROJECT.org @@ -93,7 +93,7 @@ fetching and simple saving. :LOGBOOK: CLOCK: [2025-07-09 Wed 09:55]--[2025-07-09 Wed 10:15] => 0:20 :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: :PROPERTIES: :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 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: :PROPERTIES: :ID: 622e354a-8e66-4ecd-9e1c-a53f0a2ec362 diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py index 3e4c70c..1800396 100644 --- a/vrobbler/apps/scrobbles/models.py +++ b/vrobbler/apps/scrobbles/models.py @@ -1529,7 +1529,12 @@ class Scrobble(TimeStampedModel): scrobble_data: dict, ) -> "Scrobble": 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 def stop(self, timestamp=None, force_finish=False) -> None: