[GH-ISSUE #31] Errant removal/addition of playlists #20

Closed
opened 2026-02-27 20:07:43 +03:00 by kerem · 1 comment
Owner

Originally created by @tomballgithub on GitHub (Jan 16, 2026).
Original GitHub issue: https://github.com/misiektoja/spotify_profile_monitor/issues/31

It would be great to have the option to put all changes behind a retry mechanism like you recently did for the collaborator changes.

But I'll limit the 'issue' to the one I've observed many times, which is for # of playlists attributed to monitored account. In this case, I suspect it's going to '1' instead of '0' playlists because I have one manually added via the ADD_PLAYLISTS_TO_MONITOR configuration option.

In this case, all playlists are removed but then added back 30 minutes later at the next check. The removal may be due to Spotify nonsense or network problems executing the NPI, but it's incorrect.

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
* Playlists number changed for user YYY from 28 to 1 (-27)

Removed playlists from profile:

[redacted]

Sending email notification to XXX
Check interval:			30 minutes (Thu 15 Jan 16:17 - 16:47)
Timestamp:			Thu 15 Jan 2026, 16:47:30
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
* Playlists number changed for user YYY from 1 to 28 (+27)

Added playlists to profile:

[redacted]

Sending email notification to XXX
Check interval:			30 minutes (Thu 15 Jan 16:48 - 17:18)
Timestamp:			Thu 15 Jan 2026, 17:18:02
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────


Originally created by @tomballgithub on GitHub (Jan 16, 2026). Original GitHub issue: https://github.com/misiektoja/spotify_profile_monitor/issues/31 It would be great to have the option to put all changes behind a retry mechanism like you recently did for the collaborator changes. But I'll limit the 'issue' to the one I've observed many times, which is for # of playlists attributed to monitored account. In this case, I suspect it's going to '1' instead of '0' playlists because I have one manually added via the `ADD_PLAYLISTS_TO_MONITOR` configuration option. In this case, all playlists are removed but then added back 30 minutes later at the next check. The removal may be due to Spotify nonsense or network problems executing the NPI, but it's incorrect. ``` ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── * Playlists number changed for user YYY from 28 to 1 (-27) Removed playlists from profile: [redacted] Sending email notification to XXX Check interval: 30 minutes (Thu 15 Jan 16:17 - 16:47) Timestamp: Thu 15 Jan 2026, 16:47:30 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── * Playlists number changed for user YYY from 1 to 28 (+27) Added playlists to profile: [redacted] Sending email notification to XXX Check interval: 30 minutes (Thu 15 Jan 16:48 - 17:18) Timestamp: Thu 15 Jan 2026, 17:18:02 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── ```
kerem closed this issue 2026-02-27 20:07:44 +03:00
Author
Owner

@misiektoja commented on GitHub (Jan 31, 2026):

I've implemented a new config option, PLAYLISTS_CHANGE_COUNTER, which works similarly to COLLABORATORS_CHANGE_COUNTER:

# Occasionally, the Spotify API glitches and returns incomplete/empty playlists list
# (e.g. network issues, API transient failures or playlists temporarily not visible)
# To avoid false alarms, we delay playlist change notifications until the same change is seen
# PLAYLISTS_CHANGE_COUNTER times in a row (set to 0 to disable this protection)
PLAYLISTS_CHANGE_COUNTER = 2

Let me know your feedback.

<!-- gh-comment-id:3828494348 --> @misiektoja commented on GitHub (Jan 31, 2026): I've implemented a new config option, `PLAYLISTS_CHANGE_COUNTER`, which works similarly to `COLLABORATORS_CHANGE_COUNTER`: ``` # Occasionally, the Spotify API glitches and returns incomplete/empty playlists list # (e.g. network issues, API transient failures or playlists temporarily not visible) # To avoid false alarms, we delay playlist change notifications until the same change is seen # PLAYLISTS_CHANGE_COUNTER times in a row (set to 0 to disable this protection) PLAYLISTS_CHANGE_COUNTER = 2 ``` Let me know your feedback.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify_profile_monitor#20
No description provided.