mirror of
https://github.com/misiektoja/spotify_profile_monitor.git
synced 2026-04-25 23:15:57 +03:00
[GH-ISSUE #7] Errant removal and addition of playlists #6
Labels
No labels
Stale
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify_profile_monitor#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tomballgithub on GitHub (Mar 31, 2025).
Original GitHub issue: https://github.com/misiektoja/spotify_profile_monitor/issues/7
It doesn't seem to me that a playlist should be a (-1) due to a network issue, just to get added back later.
Example:
@misiektoja commented on GitHub (Apr 5, 2025):
It is essentially not a network issue, but a Spotify API glitch. I have also observed it a few times on my own account.
What happens is that the Spotify API reports that the number of playlists has decreased. We check if a playlist has been removed or made private, and if not, we try to get information about it, but we get 502.
The next time we check, Spotify returns the original number of playlists.
A very similar issue could be observed in the past with all playlists disappearing for the user only to reappear later, but I put the code to handle it.
Anyway, I have some ideas to address it with a caching mechanism.
@tomballgithub commented on GitHub (Apr 5, 2025):
My simplistic thought was just not trust an observed change until it is
seen X times. In my case, I expect changes so rarely that the delay
wouldn't matter. But false changes would be annoying.
On Sat, Apr 5, 2025, 7:16 AM Michal Szymanski @.***>
wrote:
@misiektoja commented on GitHub (Apr 7, 2025):
Hey, I refactored the playlist processing to handle the erratic behavior of the Spotify API. I'm not sure if it will cover all the corner cases, but I left it running for a couple of hours and it looks promising. Let me know how it is on your side (pushed to dev branch).
@tomballgithub commented on GitHub (Apr 7, 2025):
I'll test this out and try to induce the situation and see what happens