From: Chris Fulljames Date: Sun, 24 Aug 2025 16:56:29 +0000 (-0400) Subject: Prevent notifications for hidden songs X-Git-Url: https://littlesong.place/gitweb/?a=commitdiff_plain;h=f0812ac38822de5727ee693babe5d8721094404c;p=littlesongplace.git Prevent notifications for hidden songs --- diff --git a/src/littlesongplace/push_notifications.py b/src/littlesongplace/push_notifications.py index 53cf134..585626b 100644 --- a/src/littlesongplace/push_notifications.py +++ b/src/littlesongplace/push_notifications.py @@ -218,6 +218,7 @@ def notify_new_songs_cmd(): one_day = timedelta(days=1) yesterday = (datetime.now(timezone.utc) - one_day).isoformat() new_songs = songs.get_uploaded_since(yesterday) + new_songs = [s for s in new_songs if not s.hidden] # Filter out hidden songs unique_users = sorted(set(s.username for s in new_songs)) title = None